Skip to content

CHILD HELPERS: use less severe debug level#8416

Merged
alexey-tikhonov merged 1 commit into
SSSD:masterfrom
alexey-tikhonov:concurrent-handlers
Feb 6, 2026
Merged

CHILD HELPERS: use less severe debug level#8416
alexey-tikhonov merged 1 commit into
SSSD:masterfrom
alexey-tikhonov:concurrent-handlers

Conversation

@alexey-tikhonov

Copy link
Copy Markdown
Member

if child_sig_handler() is called for unknown pid.

If there are N handlers registered and 1 child process exists, all N handlers will be invoked, and N-1 of them will get waitpid() == 0.

It would be possible to have a single handler registed that would manage a list (or hash table) of sss_child_ctx, but it still would have to perform N waitpid() calls (waitpid(-1) can't be used to avoid handling "foreign" process) so complexity overhead doesn't worth it.

@alexey-tikhonov alexey-tikhonov added Trivial A single reviewer is sufficient to review the Pull Request backport-to-sssd-2-9 backport-to-sssd-2-9-4 Corresponds to C8S labels Feb 3, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request correctly addresses an issue where a non-error condition was being logged as a critical failure. As explained in the description, when multiple child process handlers are registered, a SIGCHLD signal triggers all of them, but only one will find its specific child has changed state. The other handlers' calls to waitpid returning 0 is expected behavior. The change appropriately lowers the debug level from SSSDBG_CRIT_FAILURE to SSSDBG_TRACE_LIBS and improves the log message to be more informative. The change is correct and improves the signal-to-noise ratio in the logs.

@sumit-bose sumit-bose left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi,

thank you for the fix, ACK.

bye,
Sumit

if `child_sig_handler()` is called for unknown pid.

If there are N handlers registered and 1 child process exists,
all N handlers will be invoked, and N-1 of them will get
`waitpid() == 0`.

It would be possible to have a single handler registed that would
manage a list (or hash table) of `sss_child_ctx`, but it still
would have to perform N `waitpid()` calls (`waitpid(-1)` can't
be used to avoid handling "foreign" process) so complexity overhead
doesn't worth it.

Reviewed-by: Sumit Bose <[email protected]>
@sssd-bot

sssd-bot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

The pull request was accepted by @sumit-bose with the following PR CI status:


🟢 CodeQL (success)
🟢 osh-diff-scan:fedora-rawhide-x86_64:upstream (success)
🟢 rpm-build:centos-stream-10-x86_64:upstream (success)
🟢 rpm-build:fedora-42-x86_64:upstream (success)
🟢 rpm-build:fedora-43-x86_64:upstream (success)
🟢 rpm-build:fedora-rawhide-x86_64:upstream (success)
🟢 Analyze (target) / cppcheck (success)
🟢 Build / freebsd (success)
🟢 Build / make-distcheck (success)
🟢 ci / intgcheck (centos-10) (success)
🟢 ci / intgcheck (fedora-42) (success)
🟢 ci / intgcheck (fedora-43) (success)
🟢 ci / intgcheck (fedora-44) (success)
🟢 ci / prepare (success)
🟢 ci / system (centos-10) (success)
🟢 ci / system (fedora-42) (success)
🟢 ci / system (fedora-43) (success)
🔴 ci / system (fedora-44) (failure)
➖ Coverity scan / coverity (skipped)
🟢 Static code analysis / codeql (success)
🟢 Static code analysis / pre-commit (success)
🟢 Static code analysis / python-system-tests (success)


There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted backport-to-sssd-2-9-4 Corresponds to C8S backport-to-sssd-2-9 Trivial A single reviewer is sufficient to review the Pull Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Concurrent child processes trigger unnecessarily backtrace

3 participants