NetBSD Problem Report #23915
Received: (qmail 12459 invoked by uid 605); 28 Dec 2003 16:01:47 -0000
Message-Id: <200312281601.hBSG1hG4000716@night-porter.duskware.de>
Date: Sun, 28 Dec 2003 17:01:43 +0100 (CET)
From: Martin Husemann <martin@duskware.de>
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: martin@duskware.de
To: gnats-bugs@gnats.NetBSD.org
Subject: kqueue/pipe related panic on SMP machines
X-Send-Pr-Version: 3.95
>Number: 23915
>Category: kern
>Synopsis: kqueue/pipe related panic on SMP machines
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: jdolecek
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 28 16:02:00 +0000 2003
>Closed-Date: Sun Feb 22 17:52:25 +0000 2004
>Last-Modified: Sun Feb 22 17:53:00 +0000 2004
>Originator: Martin Husemann
>Release: NetBSD 1.6ZG
>Organization:
>Environment:
System: NetBSD night-porter.duskware.de 1.6ZG NetBSD 1.6ZG (PORTER) #1: Sun Dec 28 15:33:41 CET 2003 martin@night-porter.duskware.de:/usr/src/sys/arch/i386/compile/PORTER i386
Architecture: i386
Machine: i386
>Description:
Running the regress/sys/kern/kqueue/read/pipe1 regression test program on SMP
machines kills them reliably with a "Locking against myself" panic:
kern/sys_pipe.c: 1375 on cpu 0
last locked: sys_pipe.c: 1064
trace:
filt_piperead+0x28
knote+0x1f
pipeselwakeup+0x9f
pipe_write+0x2ee
dofilewrite
sys_write
>How-To-Repeat:
s/a
>Fix:
n/a
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->jdolecek
Responsible-Changed-By: jdolecek
Responsible-Changed-When: Sat Jan 3 17:36:15 UTC 2004
Responsible-Changed-Why:
I work on kqueue.
State-Changed-From-To: open->analyzed
State-Changed-By: jdolecek
State-Changed-When: Wed Jan 7 09:03:07 UTC 2004
State-Changed-Why:
The problem happens due to trying to PIPE_LOCK() while holding the
lock, when pipeselwakeup() is called in section guarded by the lock.
Code has to be rearranged to call pipeselwakeup() always with the lock
not held. Stay tuned.
State-Changed-From-To: analyzed->closed
State-Changed-By: jdolecek
State-Changed-When: Sun Feb 22 17:51:46 UTC 2004
State-Changed-Why:
This is now fixed via the NOTE_SUBMIT code. Thanks for report.
From: Jaromir Dolecek <jdolecek@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/23915 CVS commit: src/sys/kern
Date: Sun, 22 Feb 2004 17:51:26 +0000 (UTC)
Module Name: src
Committed By: jdolecek
Date: Sun Feb 22 17:51:26 UTC 2004
Modified Files:
src/sys/kern: sys_pipe.c tty.c tty_pty.c
Log Message:
use the new NOTE_SUBMIT to flag if the locking is necessary
for EVFILT_READ/EVFILT_WRITE knotes
fixes PR kern/23915 by Martin Husemann (pipes), and similar locking problem
in tty code
To generate a diff of this commit:
cvs rdiff -r1.47 -r1.48 src/sys/kern/sys_pipe.c
cvs rdiff -r1.161 -r1.162 src/sys/kern/tty.c
cvs rdiff -r1.72 -r1.73 src/sys/kern/tty_pty.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.