poll: Don't log in a signal handler#447
Merged
chrissie-c merged 1 commit intoClusterLabs:masterfrom Nov 10, 2021
Merged
Conversation
qb_log calls malloc() and probably many other non-signal-safe functions, so don't call it in the signal handler. Thanks to Honza for spotting this Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
jfriesse
approved these changes
Nov 10, 2021
Member
jfriesse
left a comment
There was a problem hiding this comment.
ACK from me... not so happy about error not covered but there seems to be no reasonable way to report error so this is probably best we can do.
Contributor
Author
|
Yeah, removing error messages is not really a good thing, but if the alternative is potential hang, we just need to balance things :/ |
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Nov 22, 2021
The most important fix in this release is that we no longer log errors inside the signal handler in loop_poll.c This could cause an application hang in some circumstances. Changelog is as follows: doxygen2man: print structure descriptions (ClusterLabs/libqb#443) Fix pthread returns (ClusterLabs/libqb#444) poll: Don't log in a signal handler (ClusterLabs/libqb#447) Bump library version for v2.0.4 Implement heap based timer list (ClusterLabs/libqb#439) build: Fix undefined pthread reference. (ClusterLabs/libqb#440) Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
qb_log calls malloc() and probably many other non-signal-safe
functions, so don't call it in the signal handler.
Thanks to Honza for spotting this
Signed-off-by: Christine Caulfield ccaulfie@redhat.com