Skip to content

erts: Fix missing exit_status caused by SIGCHLD race - #11285

Open
garazdawi wants to merge 1 commit into
erlang:maint-27from
garazdawi:lukas/erts/missing-exit_status
Open

erts: Fix missing exit_status caused by SIGCHLD race#11285
garazdawi wants to merge 1 commit into
erlang:maint-27from
garazdawi:lukas/erts/missing-exit_status

Conversation

@garazdawi

Copy link
Copy Markdown
Member

Consider this scenario:

  1. Read FD signals EOF
  2. ready_input called and read returns 0
  3. call port_inp_failure, wait for SigChld
  4. spawn_control called with SigChld, triggering driver_select on read fd
  5. ready_input called again and now exit_status is delivered

Not all OSs actually trigger a second poll signal when we re-select on an FD has already signaled EOF. So if that trigger never happens then step 5 is left out and no exit_status is delivered.

closes #11278

Consider this scenario:

1. Read FD signals EOF
2. ready_input called and read returns 0
3. call port_inp_failure, wait for SigChld
4. spawn_control called with SigChld, triggering driver_select on read fd
5. ready_input called again and now exit_status is delivered

Not all OSs actually trigger a second poll signal when we re-select
on an FD has already signaled EOF. So if that trigger never happens
then step 5 is left out and no exit_status is delivered.

closes erlang#11278
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

CT Test Results

    3 files    136 suites   52m 45s ⏱️
1 679 tests 1 622 ✅ 56 💤 1 ❌
2 321 runs  2 246 ✅ 74 💤 1 ❌

For more details on these failures, see this check.

Results for commit a42731d.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@garazdawi

Copy link
Copy Markdown
Member Author

For Erlang/OTP 28 and later, this PR is superseded by #11298.

@garazdawi
garazdawi changed the base branch from maint to maint-27 June 26, 2026 10:29
@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label Jun 30, 2026
@lucioleKi lucioleKi added the testing currently being tested, tag is used by OTP internal CI label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants