This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: backtrace/1505: [regression] gdb prints a bad backtrace for a thread
- From: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 12 Jan 2004 12:18:00 -0000
- Subject: Re: backtrace/1505: [regression] gdb prints a bad backtrace for a thread
- Reply-to: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
The following reply was made to PR backtrace/1505; it has been noted by GNATS.
From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: kettenis@chello.nl
Cc: gdb-gnats@sources.redhat.com
Subject: Re: backtrace/1505: [regression] gdb prints a bad backtrace for a thread
Date: Mon, 12 Jan 2004 07:10:53 -0500 (EST)
The HP test drive cluster has a bunch of Linux systems. After getting
all of them to build gdb (some of them don't have ncurses installed!),
here are the results for backtracing the three threads:
gcc -g -o pthreads.$machine pthreads.c -lpthread
gdb pthreads.$machine
(gdb) break common_routine
(gdb) run
(gdb) thread apply all backtrace
This is with gdb HEAD 2004-01-09 22:05:53 UTC.
These platforms worked:
debian woody, red hat 2.1 es, red hat 2.1 as, slackware 9.1.0, suse 8.1
some stop at "clone"
some stop at "thread_start"
This platform had an unrelated problem:
mandrake 9.2
So I would ask, check once more on red hat linux 9, because my
original problem was on red hat linux 8. Then close the bug.
===
Details
===
Debian Woody
Thread 3 (Thread 1026 (LWP 11897)):
#0 common_routine (arg=1) at pthreads.c:53
#1 0x08048711 in thread1 (arg=0xfeedface) at pthreads.c:82
#2 0x4001f0ba in pthread_start_thread () from /lib/libpthread.so.0
#3 0x4001f101 in pthread_start_thread_event () from /lib/libpthread.so.0
#4 0x400fcd6a in clone () from /lib/libc.so.6
Thread 2 (Thread 2049 (LWP 11896)):
#0 0x400f5bb0 in poll () from /lib/libc.so.6
#1 0x4001ed96 in __pthread_manager () from /lib/libpthread.so.0
#2 0x4001efc0 in __pthread_manager_event () from /lib/libpthread.so.0
#3 0x400fcd6a in clone () from /lib/libc.so.6
Thread 1 (Thread 1024 (LWP 11894)):
#0 0x400cdde1 in nanosleep () from /lib/libc.so.6
#1 0x400cdd78 in sleep () from /lib/libc.so.6
#2 0x08048917 in main (argc=1, argv=0xbffffb74) at pthreads.c:151
53 if (verbose) printf("common_routine (%d)\n", arg);
Mandrake 9.2
*** gdb on threaded program does not work ***
(gdb) break common_routine
Breakpoint 1 at 0x80485a2: file pthreads.c, line 53.
(gdb) run
Starting program:
/house/chastain/gdb/pthread.i686-pc-linux-gnu.mandrake-9.2.exe
Program received signal SIG32, Real-time event 32.
0x40028714 in pthread_getconcurrency () from /lib/i686/libpthread.so.0
(gdb) cont
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
0x40027de0 in pthread_yield () from /lib/i686/libpthread.so.0
Red Hat 2.1 Enterprise Server
Thread 3 (Thread 8194 (LWP 10657)):
#0 common_routine (arg=1) at pthreads.c:53
#1 0x08048781 in thread1 (arg=0xfeedface) at pthreads.c:82
#2 0x40029c6f in pthread_start_thread (arg=0x4038fbe0) at manager.c:279
#3 0x40029d5f in pthread_start_thread_event (arg=0x4038fbe0) at manager.c:303
#4 0x40141cca in thread_start () from /lib/i686/libc.so.6
Thread 2 (Thread 16385 (LWP 10656)):
#0 0x4013a467 in __poll (fds=0x804bb74, nfds=1, timeout=2000)
at ../sysdeps/unix/sysv/linux/poll.c:63
#1 0x40029920 in __pthread_manager (arg=0x5) at manager.c:135
#2 0x4002a509 in __pthread_manager_event (arg=0x5) at manager.c:226
#3 0x40141cca in thread_start () from /lib/i686/libc.so.6
Thread 1 (Thread 8192 (LWP 10654)):
#0 0x40082be5 in __sigsuspend (set=0xbffec5b0)
at ../sysdeps/unix/sysv/linux/sigsuspend.c:45
#1 0x4002c2b9 in __pthread_wait_for_restart_signal (self=0x40031020) at pthread.c:1027
#2 0x4002c38c in __pthread_create_2_1 (thread=0xbffec76c, attr=0xbffec720, start_routine=0x80486fc <thread1>, arg=0xfeedface) at restart.h:34
#3 0x08048933 in main (argc=1, argv=0xbffec7e4) at pthreads.c:145
53 if (verbose) printf("common_routine (%d)\n", arg);
Red Hat 2.1 Advanced Server
Thread 3 (Thread 8194 (LWP 11402)):
#0 common_routine (arg=1) at pthreads.c:53
#1 0x08048781 in thread1 (arg=0xfeedface) at pthreads.c:82
#2 0x40029c6f in pthread_start_thread (arg=0x4038fbe0) at manager.c:279
#3 0x40029d5f in pthread_start_thread_event (arg=0x4038fbe0) at manager.c:303
#4 0x40141cca in thread_start () from /lib/i686/libc.so.6
Thread 2 (Thread 16385 (LWP 11401)):
#0 0x4013a467 in __poll (fds=0x804bb74, nfds=1, timeout=2000) at ../sysdeps/unix/sysv/linux/poll.c:63
#1 0x40029920 in __pthread_manager (arg=0x5) at manager.c:135
#2 0x4002a509 in __pthread_manager_event (arg=0x5) at manager.c:226
#3 0x40141cca in thread_start () from /lib/i686/libc.so.6
Thread 1 (Thread 8192 (LWP 11400)):
#0 0x40082be5 in __sigsuspend (set=0xbffed200) at ../sysdeps/unix/sysv/linux/sigsuspend.c:45
#1 0x4002c2b9 in __pthread_wait_for_restart_signal (self=0x40031020) at pthread.c:1027
#2 0x4002c38c in __pthread_create_2_1 (thread=0xbffed3bc, attr=0xbffed370, start_routine=0x80486fc <thread1>, arg=0xfeedface) at restart.h:34
#3 0x08048933 in main (argc=1, argv=0xbffed434) at pthreads.c:145
53 if (verbose) printf("common_routine (%d)\n", arg);
Slackware 9.1.0
Thread 3 (Thread 16386 (LWP 30899)):
#0 common_routine (arg=1) at pthreads.c:53
#1 0x08048681 in thread1 (arg=0xfeedface) at pthreads.c:82
#2 0x4002cca3 in pthread_start_thread () from /lib/libpthread.so.0
#3 0x4002cd1f in pthread_start_thread_event () from /lib/libpthread.so.0
#4 0x4015ac97 in clone () from /lib/libc.so.6
Thread 2 (Thread 32769 (LWP 30898)):
#0 0x40151f32 in loser_poll () from /lib/libc.so.6
#1 0x40151ffe in poll () from /lib/libc.so.6
#2 0x4002c9ae in __pthread_manager () from /lib/libpthread.so.0
#3 0x4002cba7 in __pthread_manager_event () from /lib/libpthread.so.0
#4 0x4015ac97 in clone () from /lib/libc.so.6
Thread 1 (Thread 16384 (LWP 30896)):
#0 0x401299a6 in nanosleep () from /lib/libc.so.6
#1 0x00000000 in ?? ()
#2 0x40129809 in sleep () from /lib/libc.so.6
#3 0x08048873 in main (argc=1, argv=0xbffff7b4) at pthreads.c:151
53 if (verbose) printf("common_routine (%d)\n", arg);
SusE 8.1
Thread 3 (Thread 1026 (LWP 31784)):
#0 common_routine (arg=1) at pthreads.c:53
#1 0x08048682 in thread1 (arg=0xfeedface) at pthreads.c:82
#2 0x400281b0 in pthread_start_thread () from /lib/libpthread.so.0
#3 0x4002822f in pthread_start_thread_event () from /lib/libpthread.so.0
#4 0x40102e4a in thread_start () from /lib/libc.so.6
Thread 2 (Thread 2049 (LWP 31783)):
#0 0x400fb6cb in poll () from /lib/libc.so.6
#1 0x40027ec8 in __pthread_manager () from /lib/libpthread.so.0
#2 0x400280bd in __pthread_manager_event () from /lib/libpthread.so.0
#3 0x40102e4a in thread_start () from /lib/libc.so.6
Thread 1 (Thread 1024 (LWP 31781)):
#0 0x40060cce in sigaction () from /lib/libc.so.6
#1 0x4002b33a in sigaction () from /lib/libpthread.so.0
#2 0x400d4b92 in sleep () from /lib/libc.so.6
#3 0x08048875 in main (argc=1, argv=0xbffff324) at pthreads.c:151
53 if (verbose) printf("common_routine (%d)\n", arg);