Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Weird debugging problem
@ 2006-10-19 19:48 Joshua D. Boyd
  2006-10-19 19:56 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Joshua D. Boyd @ 2006-10-19 19:48 UTC (permalink / raw)
  To: gdb

I am working on GNU/Linux 2.6.15 with GNU gdb 6.4-debian and gcc version
4.0.3.  I am trying to debug a threaded program that stops mysteriously
without stating a  particular fault.  My intention is that threads are
created during the programs start-up faze, then the same dozen or so
threads remain there the entire run time.  Prior to every
pthread_create, I print something to identify what thread is being
created at that time.

When I run the program in gdb, eventually (usually after running for 12+
hours), I get the following:
[New Thread -1734661200 (LWP 67296)]
Can't attach LWP 67296: No such process
(gdb) 
Now, if I'm not mistaken, that is not a valid process ID for Linux or
most other Unix type operating systems.

If I do a back trace at that point, it reports the current thread is the
main parent, which is currently in a nanosleep (and that thread's normal
behavior after start-up is to sleep most of the time and do house
keeping tasks when it wakes up).

At this point I am at a complete loss about what could be happening or
what to try next, so after scanning through archives and a short period
of lurking, I decided to hope that someone here could provide some
advice.


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

* Re: Weird debugging problem
  2006-10-19 19:48 Weird debugging problem Joshua D. Boyd
@ 2006-10-19 19:56 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2006-10-19 19:56 UTC (permalink / raw)
  To: Joshua D. Boyd; +Cc: gdb

On Thu, Oct 19, 2006 at 03:49:28PM -0400, Joshua D. Boyd wrote:
> When I run the program in gdb, eventually (usually after running for 12+
> hours), I get the following:
> [New Thread -1734661200 (LWP 67296)]
> Can't attach LWP 67296: No such process
> (gdb) 
> Now, if I'm not mistaken, that is not a valid process ID for Linux or
> most other Unix type operating systems.
> 
> If I do a back trace at that point, it reports the current thread is the
> main parent, which is currently in a nanosleep (and that thread's normal
> behavior after start-up is to sleep most of the time and do house
> keeping tasks when it wakes up).
> 
> At this point I am at a complete loss about what could be happening or
> what to try next, so after scanning through archives and a short period
> of lurking, I decided to hope that someone here could provide some
> advice.

The error itself is fairly common and can have many causes, but I admit
the >32k PID is odd and suggests that something different is happening
here.  I'm afraid I can't offer you much advice.  When this happens,
you might want to check which threads actually exist, by looking in
/proc/PID/task.

-- 
Daniel Jacobowitz
CodeSourcery


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

end of thread, other threads:[~2006-10-19 19:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-19 19:48 Weird debugging problem Joshua D. Boyd
2006-10-19 19:56 ` Daniel Jacobowitz

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