From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 91B963858D33; Sun, 31 Mar 2024 12:22:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 91B963858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711887743; bh=P0aW2sPKR6eYBXur85WqHxQcZdDwhXPMXwJAjkU8og0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=y2PiaVT0Cm+6563XnttJTrovC/+h70Rq6vOOJhfxpwRNog9189ESfJ603XlNSTIFy /EuoqMHLu0vFf0sxhOmcSGPY9gxJKfYxYj7r08br07X0doJKt+9vr3vvLolWlaTSyP OGfsY7ld8c4XVxpng6A92OhGK0ERfRmWiiupOopE= From: "ssbssa at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug threads/31579] Cannot find user-level thread for LWP Date: Sun, 31 Mar 2024 12:22:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: threads X-Bugzilla-Version: 14.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ssbssa at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31579 --- Comment #1 from Hannes Domani --- I figured out a simple reproducer, just forking outside the main thread: ``` #include #include void *thread(void *arg) { fork(); return arg; } int main( void ) { pthread_t t; pthread_create(&t, NULL, &thread, NULL); pthread_join(t, NULL); return( 0 ); } ``` Then I always get this error: ``` $ gcc -g -o forking forking.c -Wall -Wextra -pthread $ gdb -q forking Reading symbols from forking... (gdb) r Starting program: /tmp/forking [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x7ffff7fd4700 (LWP 30716)] Cannot find user-level thread for LWP 30716: generic error (gdb) ``` --=20 You are receiving this mail because: You are on the CC list for the bug.=