aarch64 GDB: "Cannot find user-level thread for LWP ###: capability not available"

Bug #1103489 reported by Leif Lindholm
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro AArch64 cross-distro work
Fix Released
Critical
Unassigned
Linaro GDB
Fix Released
Undecided
Unassigned
Linaro OpenEmbedded
Fix Released
Critical
Unassigned

Bug Description

When trying to run the TBB tests in gdb after compiling (in oe12.12 on the foundation model):

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Error (step 1): Internal test error
Assertion k>=0 failed on line 129 of file ../../src/tbb/tbb_main.cpp
Detailed description: removed __TBB_InitOnce ref that was not added?
Cannot find user-level thread for LWP 531: capability not available
(gdb) bt
Target is executing.
(gdb) stop
(gdb) bt
Target is executing.

Test and required shared library attached.

Revision history for this message
Leif Lindholm (leif-lindholm) wrote :
Revision history for this message
Leif Lindholm (leif-lindholm) wrote :
affects: linaro-toolchain-misc → gdb-linaro
Revision history for this message
Matthew Gretton-Dann (matthew-gretton-dann) wrote :

A quick scan of the code suggests to me that this is actually a problem in glibc. td_ta_map_lwp2thr from libthread_db is returning DB_NOCAPAB for some reason. More investigation is needed.

Revision history for this message
Leif Lindholm (leif-lindholm) wrote :

This may be redundant information given Matt's latest comment, but I can verify that this also affects more recent builds using glibc 2.17.

Revision history for this message
Matthew Gretton-Dann (matthew-gretton-dann) wrote :

In Comment #3 s/DB_NOCAPAB/TD_NOCAPAB/

Revision history for this message
Anmar Oueja (anmar) wrote :

This is blocking HHVM work in Linaro Enterprise Group (LEG).

Revision history for this message
Yufeng Zhang (yufeng) wrote :

Hi Leif, would you mind attaching a libtbb_debug.so.2 built with glibc 2.17? It will be easier for me to verify the issue and fix without changing my local environment too much.

Thanks,
Yufeng

Revision history for this message
Leif Lindholm (leif-lindholm) wrote :
Anmar Oueja (anmar)
Changed in linaro-oe:
importance: Undecided → Critical
Revision history for this message
Marcus Shawcroft (marcus-shawcroft) wrote :

This issue is resolved in native gdb by the most recent version of the aarch64-linux-nat patch, now committed on gdb master:

http://sourceware.org/ml/gdb-patches/2013-02/msg00186.html

The same issue was resolved in gdbserver by this patch (also now committed on master):

http://sourceware.org/ml/gdb-patches/2013-02/msg00151.html

Anyone cherry pick patches would also want to take this patch:

http://sourceware.org/ml/gdb-patches/2013-02/msg00152.html

/Marcus

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

In other words: we need to update gdb to latest HEAD.

Marcin Juszkiewicz (hrw)
Changed in linaro-oe:
status: New → Fix Committed
assignee: nobody → Marcin Juszkiewicz (hrw)
milestone: none → 13.02
Revision history for this message
Anmar Oueja (anmar) wrote :

Marcin: When can the patches referenced in comment #9 can make it into the Linaro GDB builds? can we get a daily build with the fixes instead of waiting until the months' release?

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Anmar: ask TCWG not me.

Revision history for this message
Leif Lindholm (leif-lindholm) wrote :

I can confirm that the fix included in Marcin's oe snapshot build 249 resolves my issue.

Marcin Juszkiewicz (hrw)
Changed in linaro-oe:
status: Fix Committed → Fix Released
Changed in linaro-aarch64:
status: New → Fix Committed
Changed in linaro-aarch64:
importance: Undecided → Critical
status: Fix Committed → Fix Released
Changed in gdb-linaro:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.