From nobody Tue Jun 9 21:15:25 2026 X-Original-To: freebsd-arm@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 4gZhWx2zLdz6gfcn for ; Tue, 09 Jun 2026 21:15:25 +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 4gZhWx29Kdz46SF 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=1781039725; 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=kTF4xk+q1qse0ZBvzNT8a9aXcTJokKZoi1nlopi6Dx0=; b=ebqRYUFtVUcKlFEBA1LDR8TFfAwHsKLy5ULblq4u+RIoQqBWceTOFM85fwjx8se1tVMz3H 2Ep8I9+ywZ2MCejPlLqZQOSQVvHPIFFwivPgH93gzDWmcmO5KqzDrpP/fNORkHZ58YSXD1 /OTlbwKyFXPA8E1sS6iSHo5tUYIxfPko3annCUjWSxop2WvxnFe4+YbVhGuhkOEDGINVTU 9qNctZFWPWvhrkvssawmCywdfpNjVUjglggTXcVQyDgxuuyO6TB8tlVbt8DTJBMjE4hHDn 2Dm180o901Gf5oOXGSkDsnm+HSVngrSV4n1Wl+4zjrFYh0YkcAIRPfJfvYbNgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781039725; a=rsa-sha256; cv=none; b=e3Zm2it+2s38xHXAOKI/wi5zgfopUUqX/mo/ueuk4MSPgvZxMeU1b0ZEL63rNQtErRvjfw dRaT/AEL3OPz1MNE7p9Sb6wfxgxknWOm91AW8X9nuQoFoYsWWhU5Tkx3ODgUrPcLE6tOQo VkPLQXD1YniMAV1byYa6OvUyAD80gM6e8GwLB0gzSddQeU73Gyn+2jNSDwtnj16nRUf9gP kesB2wKfzfpm8IhksaZwjVTMAeIX4TIOqVVu5T9p7o++J67XvWQq41UTAj/SjRdzAru9Nr WhmLBanJwdvUMTjVkFFjZIh6fyEPPCN0mUbXlyoXWrdWskKo+9VOpqeXXKlIcQ== 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=1781039725; 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=kTF4xk+q1qse0ZBvzNT8a9aXcTJokKZoi1nlopi6Dx0=; b=qxWLn8QZR0BTVR2oNmO/uAY605BbBi/4TQEAvS+0IO/i3HQJie2h2X75J5t2V0c0QYyEH5 0sfb9mjgUrH0ERe9DQpWtBRXm+YyWxDcq2bgW7FFlBvpcqL6iaQDQ99Xw4sjtZOIqHZCjg rKdTBfVb1hdYSj6uxALzlrlpN7lvZ3vXeeeHtaKehJnIBb3fgZiasplpM6ZorXMr9FyBrT 2/WFSKw6izR24E/6YATW7efVaF30WWAR+7Aa6F+W2R8siW8WR/4lYYmngPMMJswFGw+u/L BcRta3/pUrJOVGVnW/3CvWt4M8Mr43pKkEtEd+2hFLeGyM2t3mTpHd4f0OpfWA== 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 4gZhWx1gpxzrqG 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 659LFPjK086748 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 659LFPIO086747 for freebsd-arm@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: freebsd-arm@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: AssignedTo 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: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@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 the assignee for the bug.=