Skip to content

Limit cleanup loop in test_tbb_fork to 5 iterations.#2041

Open
petterreinholdtsen wants to merge 1 commit intouxlfoundation:masterfrom
petterreinholdtsen:test-fork-no-endless-loop
Open

Limit cleanup loop in test_tbb_fork to 5 iterations.#2041
petterreinholdtsen wants to merge 1 commit intouxlfoundation:masterfrom
petterreinholdtsen:test-fork-no-endless-loop

Conversation

@petterreinholdtsen
Copy link
Copy Markdown
Contributor

@petterreinholdtsen petterreinholdtsen commented Apr 1, 2026

Description

There is no reason why the loop to clean up any pending signals should need more than two iterations to complete any SIGALRM and SIGCHLD remaining. Break the loop after 5 iterations and abort if it ever take this long, and sleep for one second every iteration to give even slow machines time to process the child.

On GNU Hurd, the loop some times got stuck (around 1/3 of runs during my testing) in a endless stream of SIGCHLD signals. This code change ensure the test exits with an error instead of getting stuck forever.

Type of change

Choose one or multiple, leave empty if none of the other choices apply

Add a respective label(s) to PR if you have permissions

  • bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

@petterreinholdtsen petterreinholdtsen force-pushed the test-fork-no-endless-loop branch 2 times, most recently from 5de59db to 09026ab Compare April 1, 2026 20:35
There is no reason why the loop to clean up any pending signals should
need more than two iterations to complete any SIGALRM and SIGCHLD
remaining.  Break the loop after 5 iterations and abort if it ever
take this long, and sleep for one second every iteration to give even
slow machines time to process the child.

On GNU Hurd, the loop some times got stuck (around 1/3 of runs during
my testing) in a endless stream of SIGCHLD signals.  This code change
ensure the test exits with an error instead of getting stuck forever.
@petterreinholdtsen petterreinholdtsen force-pushed the test-fork-no-endless-loop branch from 09026ab to f1a2853 Compare April 3, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant