On Sat, 13 Sep 2008 00:44:55 +0200, Pedro Alves wrote: > On Friday 12 September 2008 23:12:27, Jan Kratochvil wrote: > > various testcases - such as gdb.threads/bp_in_thread.exp - crash HEAD. > > Tested only on Fedora kernel-2.6.27-0.317.rc5.git10.fc10.x86_64 but I > > expect it can happen anywhere. > > > > LINUX_HANDLE_EXTENDED_WAIT calls ADD_LWP but not ADD_THREAD. > > Hmm, it may be due to something having changed in the scheduling, as I'm > on ubuntu's 2.6.24-19-generic x86_64 SMP (dual core), and I never saw > that happen. Yes, the Fedora kernels have a different ptrace implementation (based on utrace by Roland McGrath) which has more free but still permitted timing. > Would it be possible to add the thread to the thread list, in > addition to the lwp? IMO the reason for two lists is that really these two resources are different. You can perfectly have tracked LWPs with no corresponding thread structures. Attached a testcase using clone(2) which if you CTRL-C it has a state: (gdb) plist thread_list ptid $1 = {pid = 25112, lwp = 25112, tid = 0} (gdb) plist lwp_list ptid $2 = {pid = 25112, lwp = 25115, tid = 0} $3 = {pid = 25112, lwp = 25112, tid = 0} New thread notification will come from libthread_db but some time in between we have no corresponding thread structures such as they will never exist for standalone LWPs. Regards, Jan