Date: Wed, 21 Mar 2007 18:06:10 GMT From: Mikhail Modin<Mihail.Modin@kaspersky.com> To: freebsd-gnats-submit@FreeBSD.org Subject: threads/110636: using gdb with multi thread application with lib libpthread Message-ID: <200703211806.l2LI6AN3087714@www.freebsd.org> Resent-Message-ID: <200703211820.l2LIK3lh047865@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 110636 >Category: threads >Synopsis: using gdb with multi thread application with lib libpthread >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Mar 21 18:20:03 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Mikhail Modin >Release: FreeBSD 5.5 >Organization: Kaspersky Lab >Environment: FreeBSD some.hostname 5.5-RELEASE FreeBSD 5.5-RELEASE #0: Tue May 23 14:58:27 UTC 2006 root@perseus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: It`s imposable analyze core dump files from multi thread application linked with libpthread. For example, we have application with have 4 threads. 3 of them are in runnable state, one of them generate SIGSEGV. How do I can detect it thread? #0 0x280e1373 in pthread_testcancel () from /usr/lib/libpthread.so.1 (gdb) i threads * 6 LWP 100066 0x280e1373 in pthread_testcancel () from /usr/lib/libpthread.so.1 5 Thread 5 (sleeping) 0x280d9233 in pthread_mutexattr_init () from /usr/lib/libpthread.so.1 4 Thread 4 (LWP 100142) 0x280e1353 in pthread_testcancel () from /usr/lib/libpthread.so.1 3 Thread 3 (runnable) 0x280f70d4 in sin () from /lib/libm.so.3 2 Thread 2 (runnable) f (f=0x0) at thread_sigsegv_test.cpp:23 1 Thread 1 (runnable) 0x280f70d2 in sin () from /lib/libm.so.3 (gdb) t 5 [Switching to thread 5 (Thread 5 (sleeping))]#0 0x280d9233 in pthread_mutexattr_init () from /usr/lib/libpthread.so.1 (gdb) bt #0 0x280d9233 in pthread_mutexattr_init () from /usr/lib/libpthread.so.1 #1 0x280d9195 in pthread_mutexattr_init () from /usr/lib/libpthread.so.1 #2 0x280cc7b2 in pthread_join () from /usr/lib/libpthread.so.1 #3 0x0806127c in main () at thread_sigsegv_test.cpp:39 (gdb) t 4 [Switching to thread 4 (Thread 4 (LWP 100142))]#0 0x280e1353 in pthread_testcancel () from /usr/lib/libpthread.so.1 (gdb) bt #0 0x280e1353 in pthread_testcancel () from /usr/lib/libpthread.so.1 #1 0x280d992e in pthread_mutexattr_init () from /usr/lib/libpthread.so.1 #2 0x00000000 in ?? () (gdb) >How-To-Repeat: It`s very easy. :) >Fix: I don`t know. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703211806.l2LI6AN3087714>