Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* GDB interaction with sigwait under Redhat 9.0
@ 2004-05-12  8:33 Paul Hilfinger
  2004-05-12 13:55 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Hilfinger @ 2004-05-12  8:33 UTC (permalink / raw)
  To: gdb


I recently submitted PR threads/1641 concerning a problem we seem to
be having with Redhat 9.0 (Linux ... 2.4.21-9.ELsmp #1 SMP Thu Jan 8
17:08:56 EST 2004 i686 i686 i386 GNU/Linux).  It appears that on that
system, there is a new, malign interaction of sigwait in the inferior
with ptrace.  First, GDB (head version from about mid-April), no
longer sees signals sent to an inferior that is waiting on sigwait.  Second,
GDB's manipulation with the inferior causes sigwaits (at least on 
pthreaded programs) to continue with a non-zero status code (EINTR to 
be precise).  Does anyone know anything about this rather drastic change
in sigwait's behavior?   I intend to submit a GNU/Linux bug report, unless 
someone knows a good reason for this new (apparently undocumented) spec.

Thanks.

Paul Hilfinger
Ada Core Technologies, Inc.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GDB interaction with sigwait under Redhat 9.0
  2004-05-12  8:33 GDB interaction with sigwait under Redhat 9.0 Paul Hilfinger
@ 2004-05-12 13:55 ` Daniel Jacobowitz
  2004-05-13  9:33   ` Paul Hilfinger
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2004-05-12 13:55 UTC (permalink / raw)
  To: Paul Hilfinger; +Cc: gdb

On Wed, May 12, 2004 at 04:33:48AM -0400, Paul Hilfinger wrote:
> 
> I recently submitted PR threads/1641 concerning a problem we seem to
> be having with Redhat 9.0 (Linux ... 2.4.21-9.ELsmp #1 SMP Thu Jan 8
> 17:08:56 EST 2004 i686 i686 i386 GNU/Linux).  It appears that on that
> system, there is a new, malign interaction of sigwait in the inferior
> with ptrace.  First, GDB (head version from about mid-April), no
> longer sees signals sent to an inferior that is waiting on sigwait.  Second,
> GDB's manipulation with the inferior causes sigwaits (at least on 
> pthreaded programs) to continue with a non-zero status code (EINTR to 
> be precise).  Does anyone know anything about this rather drastic change
> in sigwait's behavior?   I intend to submit a GNU/Linux bug report, unless 
> someone knows a good reason for this new (apparently undocumented) spec.

The EINTR bit is fairly typical; it is probably the C library's
obligation to hide it from you, or else the kernel's to not deliver it
in the first place, but that's a little tricky.  However, you never
said what version of the Linux kernel you were using - it does not look
like 2.6 can produce this result.  But then I don't see how an
unmodified 2.4 can either.

The inability to see signals received during sigwait is also a kernel
bug.  Looking at the code, it replicates a portion of the path from
do_signal without duplicating the ptrace-related bits.

-- 
Daniel Jacobowitz


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GDB interaction with sigwait under Redhat 9.0
  2004-05-12 13:55 ` Daniel Jacobowitz
@ 2004-05-13  9:33   ` Paul Hilfinger
  2004-05-13 13:30     ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Hilfinger @ 2004-05-13  9:33 UTC (permalink / raw)
  To: drow; +Cc: gdb


> On Wed, May 12, 2004 at 04:33:48AM -0400, Paul Hilfinger wrote:
> > 
> > I recently submitted PR threads/1641 concerning a problem we seem to
> > be having with Redhat 9.0 (Linux ... 2.4.21-9.ELsmp #1 SMP Thu Jan 8
> > 17:08:56 EST 2004 i686 i686 i386 GNU/Linux).  It appears that on that
> > system, there is a new, malign interaction of sigwait in the inferior
> > with ptrace.  First, GDB (head version from about mid-April), no
> > longer sees signals sent to an inferior that is waiting on sigwait.  Second,
> > GDB's manipulation with the inferior causes sigwaits (at least on 
> > pthreaded programs) to continue with a non-zero status code (EINTR to 
> > be precise).  Does anyone know anything about this rather drastic change
> > in sigwait's behavior?   I intend to submit a GNU/Linux bug report, unless 
> > someone knows a good reason for this new (apparently undocumented) spec.
> 
> However, you never
> said what version of the Linux kernel you were using - it does not look
> like 2.6 can produce this result.  But then I don't see how an
> unmodified 2.4 can either.

Sorry; I thought the 2.4.21-9.ELsmp part of the uname -a line was 
sufficient.  In fact, not being a kernel hacker myself, I'm not sure what
information you're looking for here.

Paul Hilfinger


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GDB interaction with sigwait under Redhat 9.0
  2004-05-13  9:33   ` Paul Hilfinger
@ 2004-05-13 13:30     ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2004-05-13 13:30 UTC (permalink / raw)
  To: Paul Hilfinger; +Cc: gdb

On Thu, May 13, 2004 at 05:33:18AM -0400, Paul Hilfinger wrote:
> 
> > On Wed, May 12, 2004 at 04:33:48AM -0400, Paul Hilfinger wrote:
> > > 
> > > I recently submitted PR threads/1641 concerning a problem we seem to
> > > be having with Redhat 9.0 (Linux ... 2.4.21-9.ELsmp #1 SMP Thu Jan 8
> > > 17:08:56 EST 2004 i686 i686 i386 GNU/Linux).  It appears that on that
> > > system, there is a new, malign interaction of sigwait in the inferior
> > > with ptrace.  First, GDB (head version from about mid-April), no
> > > longer sees signals sent to an inferior that is waiting on sigwait.  Second,
> > > GDB's manipulation with the inferior causes sigwaits (at least on 
> > > pthreaded programs) to continue with a non-zero status code (EINTR to 
> > > be precise).  Does anyone know anything about this rather drastic change
> > > in sigwait's behavior?   I intend to submit a GNU/Linux bug report, unless 
> > > someone knows a good reason for this new (apparently undocumented) spec.
> > 
> > However, you never
> > said what version of the Linux kernel you were using - it does not look
> > like 2.6 can produce this result.  But then I don't see how an
> > unmodified 2.4 can either.
> 
> Sorry; I thought the 2.4.21-9.ELsmp part of the uname -a line was 
> sufficient.  In fact, not being a kernel hacker myself, I'm not sure what
> information you're looking for here.

Oh, it is - I just missed it.  Sounds like you want to talk to your
kernel vendor.

-- 
Daniel Jacobowitz


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-05-13 13:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-12  8:33 GDB interaction with sigwait under Redhat 9.0 Paul Hilfinger
2004-05-12 13:55 ` Daniel Jacobowitz
2004-05-13  9:33   ` Paul Hilfinger
2004-05-13 13:30     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox