NetBSD Problem Report #41936
From martin@aprisoft.de Tue Aug 25 09:40:48 2009
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id BE5A963BDF9
for <gnats-bugs@gnats.NetBSD.org>; Tue, 25 Aug 2009 09:40:48 +0000 (UTC)
Message-Id: <20090825094040.D3F94AF5817@emmas.aprisoft.de>
Date: Tue, 25 Aug 2009 11:40:40 +0200 (CEST)
From: martin@aprisoft.de
Reply-To: martin@aprisoft.de
To: gnats-bugs@gnats.NetBSD.org
Subject: gdb does not work for threaded programs on sparc64
X-Send-Pr-Version: 3.95
>Number: 41936
>Category: toolchain
>Synopsis: gdb does not work for threaded programs on sparc64
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: toolchain-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 25 09:45:00 +0000 2009
>Closed-Date: Sat Feb 01 18:58:02 +0000 2014
>Last-Modified: Sat Feb 01 18:58:02 +0000 2014
>Originator: Martin Husemann
>Release: NetBSD 5.99.15
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD nelly.aprisoft.de 5.99.15 NetBSD 5.99.15 (NELLY.MP) #68: Tue Aug 25 10:55:05 CEST 2009 martin@emmas.aprisoft.de:/nelly/usr/src/sys/arch/sparc64/compile/NELLY.MP sparc64
Architecture: sparc64
Machine: sparc64
>Description:
Trying to debug a threaded program on sparc64 I get tons of:
Program received signal SIGTRAP, Trace/breakpoint trap.
0x0000000040508f6c in pthread_cond_timedwait () from /usr/lib/libpthread.so.1
With backtrace like:
#0 0x0000000040508f6c in pthread_cond_timedwait ()
from /usr/lib/libpthread.so.1
#1 0x0000000042627dbc in PRP_NakedNotify ()
from /usr/pkg/lib/firefox/libnspr4.so
#2 0x0000000042628abc in PR_WaitCondVar ()
from /usr/pkg/lib/firefox/libnspr4.so
#3 0x0000000041878c78 in NS_GetComponentManager_P ()
from /usr/pkg/lib/firefox/libxul.so
#4 0x00000000418738a8 in NS_GetComponentManager_P ()
from /usr/pkg/lib/firefox/libxul.so
#5 0x0000000041830264 in GetSecurityContext ()
from /usr/pkg/lib/firefox/libxul.so
#6 0x0000000041873fd0 in NS_GetComponentManager_P ()
from /usr/pkg/lib/firefox/libxul.so
#7 0x000000004262ee48 in PR_JoinThread ()
from /usr/pkg/lib/firefox/libnspr4.so
#8 0x000000004050c4c4 in pthread_create () from /usr/lib/libpthread.so.1
The strange thing is that the kernel does only ever send SIGTRAP for %pc
somewhere in _rtld_debug_state (which is just "retl; nop"), but gdb seems
to ignore those traps.
Any hints appreciated - I have no clue if this is a sparc64 kernel, libpthread
or gdb issue, but it realy makes debugging userland stuff impossible.
>How-To-Repeat:
On sparc64-current install firefox from pkgsrc and do:
firefox -g
run
watch it trap.
>Fix:
no idea, any hints appreciated
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 31 Dec 2011 19:44:42 +0000
State-Changed-Why:
Is this any better with gdb7?
State-Changed-From-To: feedback->open
State-Changed-By: martin@NetBSD.org
State-Changed-When: Mon, 05 Mar 2012 08:31:49 +0000
State-Changed-Why:
Better, but does not work for life debugging yet
State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sat, 01 Feb 2014 18:58:02 +0000
State-Changed-Why:
works for me
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.