Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller:acdc:as_python3_module
lvm2-clvm
bug-1172597_3-libdaemon-ensure-threads-are-reap...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bug-1172597_3-libdaemon-ensure-threads-are-reaped-before-checking-.patch of Package lvm2-clvm
From b41b112a4bf5f674acd45f12ff4efe7fa0d1d8be Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac <zkabelac@redhat.com> Date: Mon, 29 Apr 2019 13:43:36 +0200 Subject: [PATCH] libdaemon: ensure threads are reaped before checking shutdown Since we are checking _shutdown_requested - we expect all threads are finished - that is currently checked only by checking ->next ptr being NULL - so this can be NULL only when _reap() function clears out all already finished threads. I'm finding this design quite problematic in its core - but as a 'trivial hotfix' - lets _reap() linked list before check for signal. There is likely a large potentical for few races - but the windows is very very small - since lvmetad has been already purged from upstream, lets go with this hotfix. --- libdaemon/server/daemon-server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c index 8534b79..79b54d0 100644 --- a/libdaemon/server/daemon-server.c +++ b/libdaemon/server/daemon-server.c @@ -655,6 +655,7 @@ void daemon_start(daemon_state s) FD_ZERO(&in); FD_SET(s.socket_fd, &in); + _reap(s, 0); sigprocmask(SIG_SETMASK, &new_set, NULL); if (_shutdown_requested && !s.threads->next) { sigprocmask(SIG_SETMASK, &old_set, NULL); -- 1.8.3.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor