This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: threads/2383: internal-error: linux_nat_wait: Assertion`iterate_over_lwps (running_callback, NULL)' failed.


The following reply was made to PR threads/2383; it has been noted by GNATS.

From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: gdb-gnats@sources.redhat.com, nobody@sources.redhat.com
Cc:  
Subject: Re: threads/2383: internal-error: linux_nat_wait: Assertion
 `iterate_over_lwps (running_callback, NULL)' failed.
Date: Sun, 27 Jan 2008 00:45:54 +0900 (JST)

 I did some more debugging with gdb-6.7.50.20080126.
 
 --- gdb session log begin ---
 (gdb) break func
 Breakpoint 1 at 0x8048417: file foo.c, line 5.
 (gdb) run
 Starting program: /work/rpms/foo
 Failed to read a valid object file image from memory.
 [Thread debugging using libthread_db enabled]
 [New Thread 0xb7da96c0 (LWP 17440)]
 [New Thread 0xb7da8bb0 (LWP 17443)]
 [Switching to Thread 0xb7da8bb0 (LWP 17443)]
 
 Breakpoint 1, func (arg=0x0) at foo.c:5
 5               return NULL;
 (gdb) set scheduler-locking step
 (gdb) s
 6       }
 (gdb) s
 0xb7ee1240 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
 (gdb) s
 Single stepping until exit from function start_thread,
 which has no line number information.
 [Thread 0xb7da8bb0 (LWP 17443) exited]
 ../../gdb-6.7.50.20080126/gdb/linux-nat.c:2142: internal-error: linux_nat_wait: Assertion `iterate_over_lwps (running_callback, NULL)' failed.
 --- gdb session log end ---
 
 I use another gdb to debug the gdb.  At the linux-nat.c:2142, lwp_list
 only have one entry (lwp 17440, main thread) with stopped=1,
 resumed=0, status=0.  So running_callback() returns NULL.
 
 Breakpoint 1, linux_nat_wait (ptid={pid = -1, lwp = 0, tid = 0},
     ourstatus=0xbfbb9694) at ../../gdb-6.7.50.20080126/gdb/linux-nat.c:2142
 2142                      gdb_assert (iterate_over_lwps (running_callback, NULL));
 (gdb) p num_lwps
 $1 = 1
 (gdb) p *lwp_list
 $2 = {ptid = {pid = 17440, lwp = 17440, tid = 0}, cloned = 0, signalled = 0,
   stopped = 1, resumed = 0, status = 0, step = 0, siginfo = {si_signo = 0,
     si_errno = 0, si_code = 0, _sifields = {_pad = {0 <repeats 29 times>},
       _kill = {si_pid = 0, si_uid = 0}, _timer = {si_tid = 0, si_overrun = 0,
         si_sigval = {sival_int = 0, sival_ptr = 0x0}}, _rt = {si_pid = 0,
         si_uid = 0, si_sigval = {sival_int = 0, sival_ptr = 0x0}}, _sigchld = {
         si_pid = 0, si_uid = 0, si_status = 0, si_utime = 0, si_stime = 0},
       _sigfault = {si_addr = 0x0}, _sigpoll = {si_band = 0, si_fd = 0}}},
   waitstatus = {kind = TARGET_WAITKIND_IGNORE, value = {integer = 17443,
       sig = 17443, related_pid = 17443,
       execd_pathname = 0x4423 <Address 0x4423 out of bounds>,
       syscall_id = 17443}}, next = 0x0}
 
 Unfortunately I do not understand gdb's internal enough to fix it.
 Any advices?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]