From nobody Tue Jun 9 21:15:25 2026 X-Original-To: python@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gZhWy2RVtz6gg8Z for ; Tue, 09 Jun 2026 21:15:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gZhWx70nvz46SG for ; Tue, 09 Jun 2026 21:15:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781039726; 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; bh=1q+TwrS38trxXalGS2LeFMAKro/S9p85RC7GF6h1id0=; b=KTnuf4P5Btvz0eWaOFnYKLBAq1lAbH0bMsKO+KtqdkmxVekbJrvXH3PFdeYgBUwgsIh6k7 CqkaEXmmU3nAvbInsQyUjZWW91ZEEm48KneGQeTAwScU7AJj6j8Dd00lXHwetpxuzFclhK bQvgZE4ZOOz1TYTzl3+GHOf/YbNVNSsm+Cwi+Zn2Z4/k0RsOYtf2vH86qSHDnOvlTW/+6V U2mgXMsDowgB0OTXTu8WC8VjCQI1aYirdYBXY7stR7R1PkSNNFYyNg0RNw6NBk1Wk5LAOg PJNp3p4AVipI5dEXQbtZJcEFIxofYvRGBkWH7x4gaz3EpdBn6mHHsC+TL13SkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781039726; a=rsa-sha256; cv=none; b=Xyq9SlTFfNpCpMlqVItaoQlwodbvYdqZA4od2nSiPYJ5EOaaDOh4Yj5x47WJ2JgQgAviH4 JEIQOPymDgnWt8XVQsZ/hS/Oy3ZPYJsU8SZnpUy7EXg3MoU8OyJB48xLGHuogYTEcgm6g1 vXButzb17dtMvJdWpbt+kYoyvp4ebzpynka1XEIG+9j95oOxSZpdvL7ZeNkw94UxKh97FR QV4H6EGm00qz9IW7rl9Gc6DIKUh1/L4d+U1l64Bx7yFiUNgSVhnEhQvG8vb0n5pNJTYGs7 7WmK0MYo9KLaAeHJTqBeuPiPigXHsJ0m5UZ/6q9aM+zaKEst1FcwOJpkIdeNtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781039726; 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; bh=1q+TwrS38trxXalGS2LeFMAKro/S9p85RC7GF6h1id0=; b=MVdvg7NLrRg0jZa6iiTegZSRFAVgmZ//vLSRPr+ezBf+gu9qmPjuMq0mtgHATTavGWPSOU 3r8RutRj9013SK8J0TzjsjDwBPF8jAL+Vz6Gs+CKGjEOvBFf71ImKfoasYUI1mIxur0q5y lf2WNOlQhbRyu1OLxrPw1xjweDJy2JFcgJ/m25NDWohx2lB5w5UJPQlQ6xSgj9BcH+B50w zefEmdU+npJx8ueYXZb1kQhpQYNScBtQdZJ2AhxIkV3bflVnH0Hd41QRKXFkoSPgCY/rDK QAxm0vfAJwN0g07dViO8nx4bnB8SPIf9kwK7wLTWbLMD2FQyJTzmCM5A/MwtIQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4gZhWx6ZmpzsCW for ; Tue, 09 Jun 2026 21:15:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 659LFP77086762 for ; Tue, 9 Jun 2026 21:15:25 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 659LFPC7086761 for python@FreeBSD.org; Tue, 9 Jun 2026 21:15:25 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: python@FreeBSD.org Subject: [Bug 295965] wait3(&status, WNOHANG, ...) clobbers status to -65536 when no child exits. Date: Tue, 09 Jun 2026 21:15:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 15.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: mandree@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform bug_file_loc op_sys bug_status bug_severity priority component assigned_to reporter cc attachments.created Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: FreeBSD-specific Python issues List-Archive: https://lists.freebsd.org/archives/freebsd-python List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-python@freebsd.org Sender: owner-freebsd-python@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D295965 Bug ID: 295965 Summary: wait3(&status, WNOHANG, ...) clobbers status to -65536 when no child exits. Product: Base System Version: 15.1-RELEASE Hardware: arm URL: https://github.com/python/cpython/issues/151019#issuec omment-4663777690 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: mandree@FreeBSD.org CC: arrowd@FreeBSD.org, python@FreeBSD.org Created attachment 271653 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D271653&action= =3Dedit test program to demonstrate ARMv7 wait3(WNOHANG) issue Greetings, we've been looking over various self-test failures in Python 3.15.0beta2 (in ports) and on a particular system, and apparently FreeBSD 15.1-RC* clobber = the "status" field that we point wait3(...WNOHANG...) to when it doesn't have an exited child to report the status of. See URL. The issue occurs in an ARM= v7 poudriere jail hosted on Aarch64 on a Neoverse-N1 virtual server, and I can reproduce it on Aarch64 with test code compiled with cc -m32. int status =3D 0; struct rusage ru; // uninit, will be cleared later if pid =3D=3D 0 pid_t pid =3D wait3(&status, WNOHANG, &ru); At this point, pid =3D=3D 0 and status =3D=3D -65536 on ARMv7 or with -m32,= but not Aarch64. The latter is unexpected, and should be status =3D 0. I am attaching a test program. #0: It works on ARM64 and mostly everywhere else: $ cc -std=3Dc11 -o try try-wait3.c -O3 -Wall && ./try pid =3D 0, status =3D 0 =3D 0 That's the expected outcome. wait3() has nothing to report, and leaves stat= us and ru alone. #1: Now add -m32 to the command line: $ cc -std=3Dc11 -m32 -o try try-wait3.c -O3 -Wall && ./try pid =3D 0, status =3D -65536 =3D 0xffff0000 =3D> OOPS. To spice things up - truss "fixes" the status field but spoils the rusage reporting: $ truss ./try fork() =3D 58606 (0xe4ee) freebsd32_wait4(-1,{ EXITED,val=3D0 },WNOHANG,{ u=3D0.000000,s=3D0.000000,in=3D4294958518,out=3D-39440684688344 }) =3D 0 (0= x0) freebsd32_fstat(1,{ mode=3Dcrw--w---- ,inode=3D108,size=3D0,blksize=3D4096 = }) =3D 0 (0x0) freebsd32_mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGN= ED(12),-1,0x0) =3D 537174016 (0x2004a000) [...] freebsd32_mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGN= ED(12),-1,0x0) =3D 537210880 (0x20053000) freebsd32_ioctl(1,TIOCGETA,0xffffcf68) =3D 0 (0x0) pid =3D 0, status =3D 0 =3D 0 write(1,"pid =3D 0, status =3D 0 =3D 0\n",31) =3D 31 (0x1f) kill(58606,SIGTERM) =3D 0 (0x0) _exit(0x0)=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 process exit, rval =3D 0 The same happens if I set up an armv7 poudriere jail, enter it, and then compile the test program there (with or without -m32 does not make a differ= ence obviously, the test fails every time unless run under truss). --=20 You are receiving this mail because: You are on the CC list for the bug.=