Bug 2042345 - systemd reports usbguard.service: Supervising process 1059 which is not our child. We'll most likely not notice when it exits.
Summary: systemd reports usbguard.service: Supervising process 1059 which is not our c...
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2023-01-10
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: usbguard
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Attila Lakatos
QA Contact: Dalibor Pospíšil
Jan Fiala
URL:
Whiteboard:
Depends On:
Blocks: 2159409
TreeView+ depends on / blocked
 
Reported: 2022-01-19 09:59 UTC by Jan Pazdziora
Modified: 2023-05-09 11:39 UTC (History)
2 users (show)

Fixed In Version: usbguard-1.0.0-13.el9
Doc Type: Bug Fix
Doc Text:
.USBGuard no longer causes a confusing warning Previously, a race condition could happen in USBGuard when a parent process finished sooner than the first child process. As a consequence, `systemd` reported that a process was present with a wrongly identified parent PID (PPID). With this update, a parent process waits for the first child process to finish in working mode. As a result, `systemd` no longer reports such warnings.
Clone Of:
: 2159409 (view as bug list)
Environment:
Last Closed: 2023-05-09 07:48:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github USBGuard usbguard pull 554 0 None open The parent process should wait for the first child process to finish in forking mode(-f) 2022-09-12 07:18:24 UTC
Gitlab redhat/centos-stream/rpms usbguard merge_requests 10 0 None opened RHEL 9.2.0 ERRATUM 2022-11-28 11:43:55 UTC
Red Hat Issue Tracker RHELPLAN-108682 0 None None None 2022-01-19 10:08:25 UTC
Red Hat Issue Tracker SECENGSP-4262 0 None None None 2022-01-19 10:08:28 UTC
Red Hat Product Errata RHBA-2023:2351 0 None None None 2023-05-09 07:48:29 UTC

Description Jan Pazdziora 2022-01-19 09:59:41 UTC
Description of problem:

Sometimes, journal has message

  systemd: usbguard.service: Supervising process 1059 which is not our child. We'll most likely not notice when it exits.

in it.

Version-Release number of selected component (if applicable):

usbguard-1.0.0-10.el9.aarch64

How reproducible:

Very non-deterministic.

Steps to Reproduce:
1. Have usbguard.service enabled.
2. Boot the system.
3. Check journal for "Supervising process"

Actual results:

  systemd: usbguard.service: Supervising process 1059 which is not our child. We'll most likely not notice when it exits.

Expected results:

No such message.

Additional info:

Comment 1 Jan Pazdziora 2022-01-19 10:11:28 UTC
I have a reason to believe that this is caused by a race condition in Daemon::daemonize
(upstream currently at https://github.com/USBGuard/usbguard/blob/master/src/Daemon/Daemon.cpp#L586).

When the initial process exits (based on that SIGUSR1 that it got) 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/usbguard.pid, it still sees that first forked child, not self.

Comment 15 errata-xmlrpc 2023-05-09 07:48:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (usbguard bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2351


Note You need to log in before you can comment on or make changes to this bug.