Bug 289630 - libexec/rc/rc_subr_test:wait_for_pids_progress test fails intermittently in CI
Summary: libexec/rc/rc_subr_test:wait_for_pids_progress test fails intermittently in CI
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: 16.0-CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Dag-Erling Smørgrav
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-09-15 18:59 UTC by Siva Mahadevan
Modified: 2025-10-20 20:24 UTC (History)
1 user (show)

See Also:
des: mfc-stable15+
des: mfc-stable14+
des: mfc-stable13-


Attachments
kyua test report (1.68 KB, text/plain)
2025-09-15 18:59 UTC, Siva Mahadevan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Siva Mahadevan freebsd_committer freebsd_triage 2025-09-15 18:59:25 UTC
Created attachment 263830 [details]
kyua test report

The 'libexec/rc/rc_subr_test:wait_for_pids_progress' testcase fails intermittently in CI:


===> libexec/rc/rc_subr_test:wait_for_pids_progress
Result:     failed: atf-check failed; see the output of the test for details

Standard output:
Executing command [ /bin/sh script ]

Standard error:
Fail: regexp ^Waiting for PIDS: [0-9]+ [0-9]+ [0-9]+, [0-9]+ [0-9]+, [0-9]+\.$ not in stdout
Waiting for PIDS: 3481 3482 3483, 3481 3482, 3481, 3481.



I have reproduced this error using Bricoler with 100 runs for good measure and attached the failing test report in this bug:

$ bricoler run freebsd-src-regression-suite --param freebsd-src:url=/usr/src --param freebsd-src:branch= --param freebsd-src-regression-suite:hypervisor=bhyve --param freebsd-src-regression-suite:memory=4096 --param freebsd-src-regression-suite:ncpus=2 --param freebsd-src-regression-suite:parallelism=1 --param freebsd-src-regression-suite:count=100 --param freebsd-src-regression-suite:tests='libexec/rc/rc_subr_test:wait_for_pids_progress'

@des, since you added the tests in https://cgit.freebsd.org/src/commit/?id=7f04c09fe74535c1646a4af120f8f1342fe1c328 (rc.subr: Fix wait_for_pids), please triage as necessary.

Note that a few other tests from this suite also fail intermittently in CI from time to time, but I'm not able to reproduce them consistently yet:
* oomprotect_all
* oomprotect_yes
Comment 1 commit-hook freebsd_committer freebsd_triage 2025-09-23 12:59:39 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=5953e7c98427e038500221e885dffa181dcc064b

commit 5953e7c98427e038500221e885dffa181dcc064b
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2025-09-23 12:55:56 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-09-23 12:55:56 +0000

    rc.subr: Move the sleep in wait_for_pids

    Instead of sleeping while constructing the list of PIDs to wait for,
    sleep briefly after pwait to give init a chance to reap the processes
    that just terminated before we loop around and start probing them.

    PR:             289630
    Reviewed by:    allanjude
    Differential Revision:  https://reviews.freebsd.org/D52619

 libexec/rc/rc.subr | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-10-02 08:21:19 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=384006a4c59f9f8c844cf0eb51a3144dd2a1795d

commit 384006a4c59f9f8c844cf0eb51a3144dd2a1795d
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2025-09-23 12:55:56 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-10-02 08:19:22 +0000

    rc.subr: Move the sleep in wait_for_pids

    Instead of sleeping while constructing the list of PIDs to wait for,
    sleep briefly after pwait to give init a chance to reap the processes
    that just terminated before we loop around and start probing them.

    PR:             289630
    Reviewed by:    allanjude
    Differential Revision:  https://reviews.freebsd.org/D52619

    (cherry picked from commit 5953e7c98427e038500221e885dffa181dcc064b)

 libexec/rc/rc.subr | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-10-02 08:21:20 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=50f554a5475fa274d7b832e2f7fa5add0218f222

commit 50f554a5475fa274d7b832e2f7fa5add0218f222
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2025-09-23 12:55:56 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-10-02 07:28:57 +0000

    rc.subr: Move the sleep in wait_for_pids

    Instead of sleeping while constructing the list of PIDs to wait for,
    sleep briefly after pwait to give init a chance to reap the processes
    that just terminated before we loop around and start probing them.

    PR:             289630
    Reviewed by:    allanjude
    Differential Revision:  https://reviews.freebsd.org/D52619

    (cherry picked from commit 5953e7c98427e038500221e885dffa181dcc064b)

 libexec/rc/rc.subr | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)