NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/41936: gdb does not work for threaded programs on sparc64

>Number:         41936
>Category:       toolchain
>Synopsis:       gdb does not work for threaded programs on sparc64
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 25 09:45:00 +0000 2009
>Originator:     Martin Husemann
>Release:        NetBSD 5.99.15
The NetBSD Foundation, Inc.
System: NetBSD 5.99.15 NetBSD 5.99.15 (NELLY.MP) #68: Tue Aug 
25 10:55:05 CEST 2009
Architecture: sparc64
Machine: sparc64

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/

With backtrace like:

#0  0x0000000040508f6c in pthread_cond_timedwait ()
   from /usr/lib/
#1  0x0000000042627dbc in PRP_NakedNotify ()
   from /usr/pkg/lib/firefox/
#2  0x0000000042628abc in PR_WaitCondVar ()
   from /usr/pkg/lib/firefox/
#3  0x0000000041878c78 in NS_GetComponentManager_P ()
   from /usr/pkg/lib/firefox/
#4  0x00000000418738a8 in NS_GetComponentManager_P ()
   from /usr/pkg/lib/firefox/
#5  0x0000000041830264 in GetSecurityContext ()
   from /usr/pkg/lib/firefox/
#6  0x0000000041873fd0 in NS_GetComponentManager_P ()
   from /usr/pkg/lib/firefox/
#7  0x000000004262ee48 in PR_JoinThread ()
   from /usr/pkg/lib/firefox/
#8  0x000000004050c4c4 in pthread_create () from /usr/lib/

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.

On sparc64-current install firefox from pkgsrc and do:

  firefox -g

watch it trap.

no idea, any hints appreciated

Home | Main Index | Thread Index | Old Index