Skip to content

[1.4] Fix SIGCHLD race in signal handler setup#5216

Merged
rata merged 1 commit intoopencontainers:release-1.4from
lifubang:backport-5210-1.4
Apr 2, 2026
Merged

[1.4] Fix SIGCHLD race in signal handler setup#5216
rata merged 1 commit intoopencontainers:release-1.4from
lifubang:backport-5210-1.4

Conversation

@lifubang
Copy link
Copy Markdown
Member

@lifubang lifubang commented Apr 2, 2026

Backport #5210

When signal installation was moved to a goroutine for performance, containers that exited quickly could complete before SIGCHLD was registered, causing runc to hang waiting for the signal.

This fix ensures SIGCHLD is registered immediately in the main thread before other signals are handled in the goroutine, maintaining performance while guaranteeing no missed SIGCHLD notifications for fast-exiting containers.

Reported-by: Ayato Tokubi atokubi@redhat.com

(cherry picked from commit 404181e)

When signal installation was moved to a goroutine for performance,
containers that exited quickly could complete before SIGCHLD was
registered, causing runc to hang waiting for the signal.

This fix ensures SIGCHLD is registered immediately in the main thread
before other signals are handled in the goroutine, maintaining performance
while guaranteeing no missed SIGCHLD notifications for fast-exiting
containers.

Reported-by: Ayato Tokubi <atokubi@redhat.com>
Signed-off-by: lifubang <lifubang@acmcoder.com>
(cherry picked from commit 404181e)
Signed-off-by: lifubang <lifubang@acmcoder.com>
@lifubang lifubang added the backport/1.4-pr A backport PR to release-1.4 label Apr 2, 2026
@lifubang lifubang added this to the 1.4.2 milestone Apr 2, 2026
Copy link
Copy Markdown
Member

@rata rata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rata rata merged commit 95f27e8 into opencontainers:release-1.4 Apr 2, 2026
64 of 65 checks passed
@kolyshkin kolyshkin mentioned this pull request Apr 2, 2026
Maks1mS pushed a commit to stplr-dev/stplr that referenced this pull request Apr 5, 2026
This PR contains the following updates:

| Package | Type | Update | Change | OpenSSF |
|---|---|---|---|---|
| [github.com/opencontainers/runc](https://github.com/opencontainers/runc) | require | patch | `v1.4.1` → `v1.4.2` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/opencontainers/runc/badge)](https://securityscorecards.dev/viewer/?uri=github.com/opencontainers/runc) |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/23) for more information.

---

### Release Notes

<details>
<summary>opencontainers/runc (github.com/opencontainers/runc)</summary>

### [`v1.4.2`](https://github.com/opencontainers/runc/releases/tag/v1.4.2): runc v1.4.2 -- &quot;Я — Земля! Я своих провожаю питомцев&quot;

[Compare Source](opencontainers/runc@v1.4.1...v1.4.2)

This is the second patch release of the 1.4.z release series of runc.

##### Fixed

- A regression in runc v1.3.0 which can result in a stuck `runc exec` or
  `runc run` when the container process runs for a short time. ([#&#8203;5208](opencontainers/runc#5208),
  [#&#8203;5210](opencontainers/runc#5210), [#&#8203;5216](opencontainers/runc#5216))

- Mount sources that need to be open on the host are now closed earlier during
  container start, reducing the total amount of used file descriptors and
  helping to avoid hitting the open files limit when handling many such mounts.
  ([#&#8203;5177](opencontainers/runc#5177), [#&#8203;5201](opencontainers/runc#5201))

##### Static Linking Notices

The `runc` binary distributed with this release are *statically linked* with
the following [GNU LGPL-2.1][lgpl-2.1] licensed libraries, with `runc` acting
as a "work that uses the Library":

[lgpl-2.1]: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html

- [libseccomp](https://github.com/seccomp/libseccomp)

The versions of these libraries were not modified from their upstream versions,
but in order to comply with the LGPL-2.1 (§6(a)), we have attached the
complete source code for those libraries which (when combined with the attached
runc source code) may be used to exercise your rights under the LGPL-2.1.

However we strongly suggest that you make use of your distribution's packages
or download them from the authoritative upstream sources, especially since
these libraries are related to the security of your containers.

***

Thanks to the following contributors for making this release possible:

- Ayato Tokubi <atokubi@redhat.com>
- Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
- Aleksa Sarai <cyphar@cyphar.com>
- Kir Kolyshkin <kolyshkin@gmail.com>
- Li Fubang <lifubang@acmcoder.com>
- Rodrigo Campos Catelin <rodrigo@amutable.com>

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At 12:00 AM through 04:59 AM and 10:00 PM through 11:59 PM, Monday through Friday ( * 0-4,22-23 * * 1-5 ), Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My44Ni4xIiwidXBkYXRlZEluVmVyIjoiNDMuODYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiS2luZC9EZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://altlinux.space/stapler/stplr/pulls/387
Co-authored-by: Renovate Bot <stapler-helper-bot@noreply.altlinux.space>
Co-committed-by: Renovate Bot <stapler-helper-bot@noreply.altlinux.space>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.4-pr A backport PR to release-1.4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants