Bug 2214258
| Summary: | systemd reports chronyd.service: Supervising process 1117 which is not our child. We'll most likely not notice when it exits. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Jan Pazdziora <jpazdziora> |
| Component: | chrony | Assignee: | Miroslav Lichvar <mlichvar> |
| Status: | ASSIGNED --- | QA Contact: | rhel-cs-infra-services-qe <rhel-cs-infra-services-qe> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 9.2 | CC: | jpazdziora |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 2231078 | ||
| Bug Blocks: | |||
|
Description
Jan Pazdziora
2023-06-12 11:29:45 UTC
I have a reason to believe that this is caused by a race condition in go_daemon (upstream currently at https://git.tuxfamily.org/chrony/chrony.git/tree/main.c#n344). When the initial process exits before the first forked process exits, the second forked process whose pid got written to pid_file still has ppid that first forked process. So when systemd checks the ppid for the pid found in the /run/chrony/chronyd.pid, it still sees that first forked child, not self. The same issue on usbguard.service (bug 2042345) got fixed with https://github.com/USBGuard/usbguard/pull/554/files. The chronyd grandparent process waits for one end of a pipe to be closed by both the middle process and the grandchild. The middle process doesn't do that explicitly, it's left up to the kernel to close it when the process terminates. It seems that happens before the ppid of the child is changed, which can break the order of termination. Thanks for the report. This issue will be fixed by rebase to chrony-4.4 (bug #2231078). |