From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Snyder To: Mark Kettenis Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH RFA] Clean up spurious SIGSTOPS in lin-lwp Date: Wed, 30 May 2001 16:03:00 -0000 Message-id: <3B157C3F.A8439E2E@cygnus.com> References: <3B0EE363.DA047C1B@cygnus.com> <200105260915.f4Q9Fik00295@delius.kettenis.local> X-SW-Source: 2001-05/msg00492.html Mark Kettenis wrote: > > Date: Fri, 25 May 2001 15:57:39 -0700 > From: Michael Snyder > > Mark, > > This patch will get rid of most of those "Delayed SIGSTOP" messages, > so that lin_lwp_wait will rarely if ever get a SIGSTOP that was generated > by gdb. It entails three basic changes: > > * In lin_lwp_attach_lwp, consume the SIGSTOP that is generated by > PTHREAD_ATTACH. > * In stop_wait_callback, try again to consume the SIGSTOP after > "pushing back" a SIGTRAP for a thread other than the event thread. > * Similarly try again to consume a SIGSTOP after tossing away a > redundant SIGINT. > > In principle the current approach saves us a few system calls, at the > risk of a GDB-generated SIGSTOP colliding with a SIGSTOP that wasn't > generated by GDB. > > I assume you're trying to make GDB behave a little better when some > outside agency is generating SIGSTOPs. No, I'm working on a bug, and trying to simplify parts of the event handling in order to clear the way. The bug that I'm really aiming for is a scheduling issue -- gdb can cause some threads to starve. Don't worry, it isn't your fault, it's been in all of the linux thread debugging implementations so far. It causes a couple of failures in the testcase "pthreads.exp". I know in principal what to do, but in practice it's proving to be tricky. I've checked in this part of the change. Michael