From owner-freebsd-threads@FreeBSD.ORG Thu Mar 22 07:50:04 2007 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3937A16A50B for ; Thu, 22 Mar 2007 07:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 0302913C4D1 for ; Thu, 22 Mar 2007 07:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l2M7o3Q7063640 for ; Thu, 22 Mar 2007 07:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l2M7o3sk063638; Thu, 22 Mar 2007 07:50:03 GMT (envelope-from gnats) Resent-Date: Thu, 22 Mar 2007 07:50:03 GMT Resent-Message-Id: <200703220750.l2M7o3sk063638@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-threads@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mikhail Modin Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B480816A480 for ; Thu, 22 Mar 2007 07:48:31 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id A3E6213C4D5 for ; Thu, 22 Mar 2007 07:48:31 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l2M7mTbq022325 for ; Thu, 22 Mar 2007 07:48:29 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l2M7hS6A020159; Thu, 22 Mar 2007 07:43:28 GMT (envelope-from nobody) Message-Id: <200703220743.l2M7hS6A020159@www.freebsd.org> Date: Thu, 22 Mar 2007 07:43:28 GMT From: Mikhail Modin To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: threads/110664: using gdb with multi thread application with lib libpthread X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2007 07:50:04 -0000 >Number: 110664 >Category: threads >Synopsis: using gdb with multi thread application with lib libpthread >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Mar 22 07:50: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: