🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.freebsd.bugs
Article #713

[Bug 301072] procdesc: procdesc_close() links a traced child onto its own reaper's orphan list, panicking the kernel at child ex...

#713
From: bugzilla-noreply
Date: Tue, 24 Nov 2026 09:15
49 lines
4135 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301072

--- Comment #9 from laamalif@proton.me ---
I ran the D61975 tests against a GENERIC-KASAN kernel built from
main plus your restructured patch (same tree and config as the panic
reproduction, 16.0-CURRENT main-6edecf52def6-dirty).

reaper_child_close: passed.

reaper_child_close_traced and reaper_child_close_traced_exit fail in
the harness, but not from the fix. The failure is a race in the test
setup: the parent's waitpid(child, &status, 0) runs before the child
has completed ptrace(PT_TRACE_ME), and wait4() returns ECHILD for the
still-running child at that point. ktrace of the failing run shows
the ordering directly:

  2994 tp5  CALL  pdfork(0x820cb470c,0x5)
  2995 tp5  RET   pdfork 0
  2994 tp5  RET   pdfork 2995/0xbb3
  2994 tp5  CALL  wait4(2995,0x820cb4708,0,0)
  2994 tp5  RET   wait4 -1 errno 10 No child processes
  2995 tp5  CALL  ptrace(PT_TRACE_ME,0,0,0)
  2995 tp5  RET   ptrace 0
  2995 tp5  CALL  thr_kill(0x1884c,SIGSTOP)
  2995 tp5  RET   thr_kill 0

The child is alive, on the children list, and becomes traced a few
microseconds later; the wait still returns ECHILD immediately. With a
pipe handshake so the parent only waits after the child confirms
PT_TRACE_ME, the same sequence passes every time (3/3), and without
the handshake it fails every time (3/3) on this kernel. My attached
reproducers poll waitpid(WUNTRACED|WNOHANG) in a loop, which is why
they do not hit it.

This looks like a wait4() issue in its own right: a P_PID wait on a
live child returning ECHILD before the child is traced, instead of
blocking. It is independent of the procdesc_close fix (the failing
wait happens before any close). I can file it separately if you want
it tracked; happy to also re-run the tests with the handshake if you
want to keep the tests as they are.

-- 
You are receiving this mail because:
You are the assignee for the bug.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <bug-301072-227-yBxk6rgjda@https.bugs.freebsd.org/bugzilla/>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
References: <bug-301072-227@https.bugs.freebsd.org/bugzilla/>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: bugzilla-noreply@freebsd.org
Newsgroups: muc.lists.freebsd.bugs
Subject: [Bug 301072] procdesc: procdesc_close() links a traced child onto
 its own reaper's orphan list, panicking the kernel at child exit
Date: Tue, 24 Nov 2026 09:15:03 +0000
Organization: Newsgate at muc.de e.V.
Approved: news-admin@muc.de
Distribution: world
Message-ID: <bug-301072-227-yBxk6rgjda@https.bugs.freebsd.org/bugzilla/>
References: <bug-301072-227@https.bugs.freebsd.org/bugzilla/>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="10002"; mail-complaints-to="news-admin@muc.de"
X-Original-To: bugs@mlmmj.nyi.freebsd.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1795511703;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=NbmuxWBTLYcUQvdYakbgMdw7r+BdRe85Ru5czZMUUj0=;
	b=tthxVZq3Iynd8MOv0YOi0zq9pBLPYRUMRYsy2FIrt0+8tO4vtPxjYPGbLwKUpmWCSzkKoh
	xJ0D7IpH5DFUzyOWbZEhpTTr3kNCeE1yQQMiNQAzbFCH2aE8tS7XOlKI30pu0sauBBPJm8
	b0iW0CwoArqI3HIAEQh7o81HzvnGs01Mq0Wj8oHPTrlH/w9IxJA/zBJpmB5WTtE+EDhCzC
	cEOYRS7RauK86Bi2jPU5c+tRuIRAfzEiJMJPa0nM387e9Bal3SCR7T4tKLxS2I2Us8jS0z
	DqbSTR4H0+W0jwqRLk1mVx1XUK+yhG9rAv0ZtmZJtV5a2Dk2Y2Pfmn2+d69HiA==
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
In-Reply-To: <bug-301072-227@https.bugs.freebsd.org/bugzilla/>
Auto-Submitted: auto-generated
Precedence: list
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes