From owner-freebsd-bugs@FreeBSD.ORG Tue Feb 15 00:30:27 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D57516A4CE for ; Tue, 15 Feb 2005 00:30:27 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2435643D48 for ; Tue, 15 Feb 2005 00:30:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j1F0URwr027379 for ; Tue, 15 Feb 2005 00:30:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j1F0UQwA027378; Tue, 15 Feb 2005 00:30:27 GMT (envelope-from gnats) Resent-Date: Tue, 15 Feb 2005 00:30:27 GMT Resent-Message-Id: <200502150030.j1F0UQwA027378@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Greg 'groggy' Lehey" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 019C816A4CE for ; Tue, 15 Feb 2005 00:29:54 +0000 (GMT) Received: from blackwater.lemis.com (wantadilla.lemis.com [192.109.197.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CF5843D3F for ; Tue, 15 Feb 2005 00:29:52 +0000 (GMT) (envelope-from grog@lemis.com) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 9201C8564F; Tue, 15 Feb 2005 10:59:50 +1030 (CST) Message-Id: <20050215002950.9201C8564F@blackwater.lemis.com> Date: Tue, 15 Feb 2005 10:59:50 +1030 (CST) From: "Greg 'groggy' Lehey" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/77537: Conditional breakpoints hang on SMP machines X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Greg 'groggy' Lehey List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2005 00:30:27 -0000 >Number: 77537 >Category: kern >Synopsis: Conditional breakpoints hang on SMP machines >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 15 00:30:26 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Greg 'groggy' Lehey >Release: FreeBSD 6.0-CURRENT i386 >Organization: Rocksoft Ltd >Environment: System: FreeBSD quartet.lemis.com 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Mon Feb 14 09:38:49 CST 2005 grog@quartet.lemis.com:/src/FreeBSD/6-CURRENT/src/sys/i386/compile/QUARTET i386 Kernels built in mid-December 2004 and mid-February 2005 exhibit this problem. >Description: During a normal user-level debugging session, I set a conditional breakpoint that should run about 125,000 times before being hit. When I did this, it stopped after a while, though: the gdb process hung in a WAIT state, repeatedly. I then ran it under ktrace and found that it stopped with: 12325 gdb CALL ptrace(12,0x3026,0xbfbfd5e0,0) 12325 gdb RET ptrace 0 12325 gdb CALL ptrace(PT_STEP,0x3026,0x1,0) 12325 gdb RET ptrace 0 12325 gdb CALL wait4(0xffffffff,0xbfbfd808,0,0) This is the same sequence that repeats itself thousands of times in the trace: it should continue with 12325 gdb RET wait4 12326/0x3026 12325 gdb CALL kill(0x3026,0) 12325 gdb RET kill 0 12325 gdb CALL ptrace(PT_GETREGS,0x3026,0xbfbfd5c0,0) But it didn't: it hung. I originally ran with a 6-CURRENT of mid-December 2005, but upgraded to 6-CURRENT as of 14 February 2005 and confirmed that the problem remains. >How-To-Repeat: As described above. >Fix: Not currently known. A workaround appears to be to disable all except one CPU with sysctl -w machdep.hlt_cpus=14 (this is a 4 processor machine). This also confirms my suspicion that it's a race condition. If somebody will give me a few clues about where to look, I'm happy to take a look at this myfself. >Release-Note: >Audit-Trail: >Unformatted: