FS#69657 - [gdb/glibc] fails with "Cannot find user-level thread for LWP 192701: generic error"
Attached to Project:
Arch Linux
Opened by Sven Brauch (scummos) - Tuesday, 16 February 2021, 15:01 GMT
Last edited by Giancarlo Razzolini (grazzolini) - Sunday, 16 May 2021, 17:13 GMT
Opened by Sven Brauch (scummos) - Tuesday, 16 February 2021, 15:01 GMT
Last edited by Giancarlo Razzolini (grazzolini) - Sunday, 16 May 2021, 17:13 GMT
|
Details
Since a recent update, attaching gdb 10.1 to a process
sometimes fails with the following error message:
Error while reading shared library symbols for /usr/lib/libpthread.so.0: Cannot find user-level thread for LWP 192701: generic error On my machine, I can so far only reproduce this problem when attaching using "gdb -p <pid>", but other users have the same issue even when launching an application directly from gdb. I don't know exactly what is going on, but I have collected the following details so far: - The error is 100% reproducible for attaching to some programs. Examples include "gimp" and "telegram-desktop". - The error is 100% *not* reproducible for attaching to others. Examples include "kate" and "okular". - It was not a gdb update which caused the issue to appear; attached is the list of packages I last upgraded on my machine. The issue did not occur before, but occurred afterwards. - The issue also occurs for some applications compiled on the system itself, not just for packages from pacman. The issue is quite severe, since it effectively makes debugging some applications impossible. Here's some more detailed version info: > pacman -Qi gdb glibc gcc-libs gcc gimp telegram-desktop kate okular |grep -B1 Version Name : gdb Version : 10.1-4 -- Name : glibc Version : 2.33-4 -- Name : gcc-libs Version : 10.2.0-6 -- Name : gcc Version : 10.2.0-6 -- Name : gimp Version : 2.10.22-1 -- Name : telegram-desktop Version : 2.5.8-1 -- Name : kate Version : 20.12.2-1 -- Name : okular Version : 20.12.2-1 |
This task depends upon
Closed by Giancarlo Razzolini (grazzolini)
Sunday, 16 May 2021, 17:13 GMT
Reason for closing: Fixed
Additional comments about closing: glibc 2.33-5 fixes this
Sunday, 16 May 2021, 17:13 GMT
Reason for closing: Fixed
Additional comments about closing: glibc 2.33-5 fixes this
I verified the same problem occurs with both distributions.
After some debugging - I've found the offending commit https://github.com/bminor/glibc/commit/1daccf403b1bd86370eb94edca794dc106d02039
With that reverted, one can gdb attach to gimp and steam. As the commit message hints, there are some implications of using the old code.
Edit: Kicked off a discussion upstream - https://sourceware.org/pipermail/libc-alpha/2021-April/125089.html
https://sourceware.org/git/?p=glibc.git;a=commit;h=ea299b62e83cc38b0d910bbd1a879f7d1f836e96
Follow-up fixes for the test introduced with ^^
https://sourceware.org/git/?p=glibc.git;a=commit;h=36783141cf090412e3e6f042f25f7f6c63d6a14a
https://sourceware.org/git/?p=glibc.git;a=commit;h=3f5080aedd164c1f92a53552dd3e0b82ac6d2bd3
Package has all the patches linked, so we can call this fixed.
@grazzolini if you want to try - issue is 100% reproducible with either `gimp` or `steam`.
Edit: a reference to this bug report in the PKGBUILD, alongside the patches would be nice IMHO.