On 03/06/2018 12:15 AM, Martin Wilck wrote: > multipathd is supposed to block all signals in all threads, except > the uxlsnr thread which handles termination and reconfiguration > signals (SIGUSR1) in its ppoll() call, SIGUSR2 in the waiter thread > and the marginal path checker thread, and occasional SIGALRM. The current > logic does exactly the oppsite, it blocks termination signals in SIGPOLL and > allows multipathd to be killed e.g. by SIGALRM. > > Fix that by inverting the logic. The argument to pthread_sigmask and > ppoll is the set of *blocked* signals, not vice versa. > > The marginal paths code needs to unblock SIGUSR2 now explicity, as > the dm-event waiter code already does. Doing this with pselect() > avoids asynchronous cancellation. > > Fixes: 810082e "libmultipath, multipathd: Rework SIGPIPE handling" > Fixes: 534ec4c "multipathd: Ensure that SIGINT, SIGTERM, SIGHUP and SIGUSR1 > are delivered to the uxsock thread" > > Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> > --- > libmultipath/io_err_stat.c | 17 ++++++++++++++++- > multipathd/main.c | 7 +++++-- > multipathd/uxlsnr.c | 10 +++++----- > 3 files changed, 26 insertions(+), 8 deletions(-) > Sigh. Will we ever get signal handling correct? Reviewed-by: Hannes Reinecke <hare@xxxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@xxxxxxx +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel