From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) by sourceware.org (Postfix) with ESMTPS id B0C3138515FC for ; Thu, 15 Apr 2021 20:00:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B0C3138515FC Received: by mail-vs1-xe29.google.com with SMTP id 2so12794862vsh.4 for ; Thu, 15 Apr 2021 13:00:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=xLmC+IC+awcZVDCsIzGXPhzog+MO8o7gL3gx7X3DLqg=; b=EIOBqLTJKgYAs3EaIiJKNBaHgHuhHRocdvqfEr9J9bL/NpklJzWutj9kS/FxWDxKOk 2JqxC2RSEwESWSoUfWXHFN57RR9ZmY6+n/uOQcGCHfxRR1QeABR7T3Gr1owy1InW8Kri HMYnopd7vXnqc3KAl2oVu0B0MtC3KcfAKrdrNk7jev9YyKENAzbGwL/1q01akeSV9q5s sVHcdeBnn62B2JThw+M8lN2z6BiGkValZ8SshM/3pNR5yk6RlUzwpnu3GNfDkCHybCPM aJ0cj4Fvj/zGcZ0THUefAxARv27qXfgAFpqx0RB2SWKVYoa8SQXS8mWjWGJkOHcMNrbU 6UpQ== X-Gm-Message-State: AOAM533GBv1jw+2479aZ4WeadHe/YAGjb+NaHUQnOYM0DOOyln8Qq5Rt LVe6a0r5anjBwO4ip0rBVijoHKq+bT796hpuBeBiZhoOl2TPQA== X-Google-Smtp-Source: ABdhPJzNkMV/oqTgPTlbglwX9LaPgHf6M+yFX9SmctEgwNlvcndObNj9u/wCsu2DBz0N3i8reyrwZiSLYJFW6Tc8b5k= X-Received: by 2002:a05:6102:21d1:: with SMTP id r17mr3929375vsg.19.1618516803027; Thu, 15 Apr 2021 13:00:03 -0700 (PDT) MIME-Version: 1.0 From: Emil Velikov Date: Thu, 15 Apr 2021 20:59:51 +0100 Message-ID: Subject: Glibc commit causing regression in gdb To: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 20:00:05 -0000 Greetings everyone, We have recently received a regression report in Arch Linux, where gdb attach fails with some applications. In particular, the issue originates in glibc 2.33, while gdb used is 10.1 and is 100% reproducible (here) with steam and gimp. Note that explicitly rebuilding gdb explicitly against the glibc does not help. After some digging I found the offending glibc commit 1daccf403b1bd86370eb94edca794dc106d02039 ("nptl: Move stack list variables into _rtld_global"). With the said commit the td_ta_map_lwp2thr() call in GDB fails, resulting in the infamous Error while reading shared library symbols for /usr/lib/libpthread.so.0: Cannot find user-level thread for LWP 2999060: generic error Can anyone confirm if the issue is reproducible with other distros? Is there some gdb patch to fix this, or alternatively is it safe to ship a revert upstream and/or within the Arch Linux package? Bear in mind that I'm happy to get this issue resolved properly, yet this is my first time seriously looking at the glibc codebase. For my initial investigation I force-enabled LOG() and added a few extra notations. - Vanilla glibc 2.33 td_init td_ta_new td_init td_ta_new td_ta_map_lwp2thr __td_ta_stack_user has failed // newly added LOG - Vanilla glibc 2.33 with offending commit reverted td_init td_ta_new td_init td_ta_new td_ta_map_lwp2thr __td_ta_lookup_th_unique // newly added LOG entry td_thr_get_info ... above three are repeated a lot, until the end Thanks Emil [1] https://bugs.archlinux.org/task/69657