question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gdb.error 'Cannot find thread-local storage'

See original GitHub issue

I installed via the instructions in the installation guide and also changed ~/.local/lib/python3.5/site-packages/libheap/libheap.cfg to 2.23, which is my installed libc version, but I still get this issue:

gdb-peda$ heapls
[!] No gdb frame is currently selected.

Python Exception <class 'gdb.error'> Cannot find thread-local storage for process 20952, shared library /lib/x86_64-linux-gnu/libc.so.6:
Cannot find thread-local variables on this target: 
Error occurred in Python command: Cannot find thread-local storage for process 20952, shared library /lib/x86_64-linux-gnu/libc.so.6:
Cannot find thread-local variables on this target
➜  /home apt-cache policy libc6
libc6:
  Installed: 2.23-0ubuntu7
  Candidate: 2.23-0ubuntu7
  Version table:
 *** 2.23-0ubuntu7 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.23-0ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

I am running this on Ubuntu 16.04 Xenial 64-bit.

Any suggestions on how I can fix this?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
cq674350529commented, May 30, 2017

First, thanks for your great job @cloudburst .

I met the same problem, as @wbowling mentioned, line 137 in pydbg/pygdbpython.py was generating an different exception than ValueError. By debugging, I found a possible solution: try to catch RuntimeError before ValueError in line 137.

It works well now, althougth I don’t know what effects it may have.

0reactions
cloudburstcommented, Dec 1, 2017

Hopefully fixed by fa34afce2f81f10eead671d40485d81e92785aab

Read more comments on GitHub >

github_iconTop Results From Across the Web

1582505 – gdb can't display thread-local variables in F28
GDB needs symbols in libpthread to access thread local storage (so the inferior program must be linked with libpthread).
Read more >
TLS variables inaccessible when not linking with libpthread.
There is no technical restriction that I know of that limits gdb's ability to access the thread local storage variables.
Read more >
GDB message "not yet allocated storage for thread-local ...
Debugging a NASM shared object with gdb, I get a segmentation fault when a thread accesses its thread-local variable.
Read more >
[x86_64] gdb: Cannot find thread-local variables on this target
Initially discovered while working on the D packages, as D uses TLS by default for global variables, but this reproduces easily with C...
Read more >
'"Cannot find thread-local storage for Thread" and crash with ...
... thread] [next in thread] List: gdb Subject: "Cannot find thread-local storage for ... gdbserver complains on 'thread \ apply all bt full':...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found