From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H . J . Lu" To: GDB , GNU C Library Subject: Is the current gdb 5.1 broken for Linuxthreads? Date: Mon, 17 Sep 2001 12:47:00 -0000 Message-id: <20010917124710.A21992@lucon.org> X-SW-Source: 2001-09/msg00138.html Here is a modified example from glibc. # gcc -g ex11.c -lpthread -lrt -D_GNU_SOURCE # ./a.out& # ps -xal | grep a.out 000 1103 27904 3705 9 0 247300 600 rt_sig S pts/17 0:00 ./a.out 040 1103 27905 27904 11 0 247300 600 do_pol S pts/17 0:00 ./a.out 040 1103 27906 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27907 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27908 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27909 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27910 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27911 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27912 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27913 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27914 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27915 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27916 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27917 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27918 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27919 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27920 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27921 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27922 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27923 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27924 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27925 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27926 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27927 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27928 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27929 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27930 27905 10 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27931 27905 10 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27932 27905 10 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27933 27905 11 0 247300 600 nanosl S pts/17 0:00 ./a.out 040 1103 27934 27905 10 0 247300 600 nanosl S pts/17 0:00 ./a.out # gdb a.out ... (gdb) att 27934 Attaching to program: /home/hjl/bugs/gdb/thread/./a.out, process 27934 Child process unexpectedly missing: No child processes. Program terminated with signal ?, Unknown signal. The program no longer exists. (gdb) But (gdb) att 27904 worked fine. It is a serious regression from gdb 4.18 from RedHat 6.2. H.J. >From hjl@lucon.org Mon Sep 17 16:13:00 2001 From: "H . J . Lu" To: GDB Subject: Re: Is the current gdb 5.1 broken for Linuxthreads? Date: Mon, 17 Sep 2001 16:13:00 -0000 Message-id: <20010917161350.A25349@lucon.org> References: <20010917124710.A21992@lucon.org> X-SW-Source: 2001-09/msg00139.html Content-length: 3420 On Mon, Sep 17, 2001 at 12:47:10PM -0700, H . J . Lu wrote: > Here is a modified example from glibc. > > # gcc -g ex11.c -lpthread -lrt -D_GNU_SOURCE > # ./a.out& > # ps -xal | grep a.out > 000 1103 27904 3705 9 0 247300 600 rt_sig S pts/17 0:00 ./a.out > 040 1103 27905 27904 11 0 247300 600 do_pol S pts/17 0:00 ./a.out > 040 1103 27906 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27907 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27908 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27909 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27910 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27911 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27912 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27913 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27914 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27915 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27916 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27917 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27918 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27919 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27920 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27921 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27922 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27923 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27924 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27925 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27926 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27927 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27928 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27929 27905 9 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27930 27905 10 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27931 27905 10 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27932 27905 10 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27933 27905 11 0 247300 600 nanosl S pts/17 0:00 ./a.out > 040 1103 27934 27905 10 0 247300 600 nanosl S pts/17 0:00 ./a.out > > # gdb a.out > ... > (gdb) att 27934 > Attaching to program: /home/hjl/bugs/gdb/thread/./a.out, process 27934 > Child process unexpectedly missing: No child processes. > > Program terminated with signal ?, Unknown signal. > The program no longer exists. > (gdb) > > But > > (gdb) att 27904 > > worked fine. It is a serious regression from gdb 4.18 from RedHat > 6.2. > The more I looked at it, the more borken gdb is with linuxthreads: # gcc -g ex11.c -lpthread -lrt -D_GNU_SOURCE -static # a.out # gdb a.out ... (gdb) att 14226 Attaching to program: /home/hjl/bugs/gdb/thread/a.out, process 14226 ... lin-lwp.c:620: gdb-internal-error: stop_wait_callback: Assertion `pid == GET_LWP (lp->ptid)' failed. An internal GDB error was detected. This may make further H.J.