Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: fix race condition during startup of a service with ExitType=cgroup #28314

Merged
merged 1 commit into from Jul 14, 2023

Conversation

ftake
Copy link
Contributor

@ftake ftake commented Jul 9, 2023

This commit allows service_sigchld_event() is executed before service_dispatch_exec_io(), which might happen when a main process exits very quickly.

Also do not check PID for service goodness because the main process have already been exited in this case.

Fix: #27919

@github-actions github-actions bot added the please-review PR is ready for (re-)review by a maintainer label Jul 9, 2023
@github-actions
Copy link

github-actions bot commented Jul 9, 2023

An -rc1 tag has been created and a release is being prepared, so please note that PRs introducing new features and APIs will be held back until the new version has been released.

Copy link
Member

@YHNdnzj YHNdnzj left a comment

Choose a reason for hiding this comment

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

LGTM. But I'd like to wait for @poettering's review.

src/core/service.c Outdated Show resolved Hide resolved
src/core/service.c Outdated Show resolved Hide resolved
src/core/service.c Outdated Show resolved Hide resolved
@poettering
Copy link
Member

looks pretty good, but one change please

@poettering poettering added reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks and removed please-review PR is ready for (re-)review by a maintainer labels Jul 12, 2023
@github-actions github-actions bot added please-review PR is ready for (re-)review by a maintainer and removed reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks labels Jul 13, 2023
@bluca
Copy link
Member

bluca commented Jul 13, 2023

Given we want this for rc2, in the interest of time given the change is trivial, I've applied and pushed it

@bluca bluca added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed please-review PR is ready for (re-)review by a maintainer labels Jul 13, 2023
…roup

This commit allows service_sigchld_event() is executed before
service_dispatch_exec_io(), which might happen when a main process exits
very quickly.

Also do not check PID for service goodness because the main process have
already been exited in this case.

Fix: systemd#27919
@YHNdnzj YHNdnzj merged commit ef43006 into systemd:main Jul 14, 2023
41 of 48 checks passed
@github-actions github-actions bot removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

systemd-xdg-autostart-generator terminating process a bit too eagerly?
5 participants