NetBSD Problem Report #52168

From  Sun Apr 16 12:57:26 2017
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer "Postmaster" (verified OK))
	by (Postfix) with ESMTPS id E69DE7A1FE
	for <>; Sun, 16 Apr 2017 12:57:26 +0000 (UTC)
Message-Id: <>
Date: Sun, 16 Apr 2017 12:57:26 +0000 (UTC)
Subject: attach2:t_ptrace_wait* is unusable
X-Send-Pr-Version: www-1.0

>Number:         52168
>Category:       kern
>Synopsis:       attach2:t_ptrace_wait* is unusable
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kamil
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 16 13:00:00 +0000 2017
>Closed-Date:    Wed Dec 12 23:17:59 +0000 2018
>Last-Modified:  Wed Dec 12 23:17:59 +0000 2018
>Originator:     Kamil Rytarowski
>Release:        NetBSD 7.99.68 amd64
NetBSD chieftec 7.99.68 NetBSD 7.99.68 (GENERIC) #1: Fri Apr 14 05:48:41 CEST 2017  root@chieftec:/public/netbsd-root/sys/arch/amd64/compile/GENERIC amd64
attach2 is unstable on all ports and with combination of all wait(2)-like functions.
Run test in: tests/lib/libc/sys

atf-run t_ptrace_wait*|atf-report


From: "Kamil Rytarowski" <>
Subject: PR/52168 CVS commit: src/tests/lib/libc/sys
Date: Sun, 16 Apr 2017 13:09:40 +0000

 Module Name:	src
 Committed By:	kamil
 Date:		Sun Apr 16 13:09:40 UTC 2017

 Modified Files:
 	src/tests/lib/libc/sys: t_ptrace_wait.c

 Log Message:
 ATF test attach2/t_ptrace_wait* is unstable

 Mark it broken with:

 PR kern/52168 attach2:t_ptrace_wait* is unsable

 In order to get reliable failure, abort this test at the end (if we get

 To generate a diff of this commit:
 cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/sys/t_ptrace_wait.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: kern-bug-people->kamil
Responsible-Changed-When: Fri, 06 Oct 2017 23:14:12 +0200

State-Changed-From-To: open->closed
State-Changed-When: Thu, 13 Dec 2018 00:17:59 +0100
revision 1.25
date: 2018-03-07 17:40:06 +0100;  author: kamil;  state: Exp;  lines: +2 -8;  commitid: mKAGeMnwGb1TSxtA;
ATF: Reenable attach2 in t_ptrace_wait*

The primary race specific to this test has been fixed in previous commit
(wrong WNOHANG).

This test is still racy and breaks like once every 30,000 execution.
This is down like from once from every 100th execution in the past.

The remaning race is not specific to attach2 and I can reproduce it with
at least attach1. It still looks like being specific to NetBSD and it's
not reproducible on Linux and FreeBSD. Perhaps a bug with pipe(2)/write(2)/
read(2) or close to these features.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.