From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9547 invoked by alias); 25 Mar 2008 14:23:30 -0000 Received: (qmail 9392 invoked by uid 48); 25 Mar 2008 14:22:45 -0000 Date: Tue, 25 Mar 2008 14:23:00 -0000 From: "jan dot kratochvil at redhat dot com" To: glibc-bugs@sources.redhat.com Message-ID: <20080325142243.5983.jan.kratochvil@redhat.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug nptl/5983] New: Stale threads from TD_TA_THR_ITER of the FORK child during PTRACE_SYSCALL X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00114.txt.bz2 The child of FORK becomes (later) singlethreaded, unfortunately it gets caught too early by PTRACE_O_TRACEFORK and the child appears as multithreaded to nptl_db that time. gcc -ggdb3 -Wall -Werror -o forktest forktest.c -lthread_db -ldw -lelf -lebl -ldl -pthread outputs: child = 9097 LWP = 9097 TID = 0x2aaaaace9290 LWP = 9098 TID = 0x40a00950 child2 = 9099 LWP = 9099 TID = 0x2aaaaace9290 LWP = 9098 TID = 0x40a00950 <- stale thread while it should be: child = 9097 LWP = 9097 TID = 0x2aaaaace9290 LWP = 9098 TID = 0x40a00950 child2 = 9099 LWP = 9099 TID = 0x2aaaaace9290 Untested glibc fix attached but just the part modifying `nptl_db/structs.def' completely breaks nptl_db for me. This patch variant has some performance hit calling __getpid(), the other way would require adding some new field to `struct pthread'. Going to fix it myself but still did not find enough time so at least making the problem public. -- Summary: Stale threads from TD_TA_THR_ITER of the FORK child during PTRACE_SYSCALL Product: glibc Version: unspecified Status: NEW Severity: minor Priority: P2 Component: nptl AssignedTo: drepper at redhat dot com ReportedBy: jan dot kratochvil at redhat dot com CC: glibc-bugs at sources dot redhat dot com GCC host triplet: x86_64-unknown-linux-gnu http://sourceware.org/bugzilla/show_bug.cgi?id=5983 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.