On Tue, 2021-01-26 at 14:50 +0800, lixiaokeng wrote: > When stopping multipathd (systemctl restart multipathd.service), > there > is a multipathd crash occasionally(not reproduced). If this happens only during shutdown, it might be related to thread cancellation. Can you try disabling cancellation for the udev_monitor_receive_device() call? int oldstate; pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate); udev_monitor_receive_device(...) pthread_setcancelstate(oldstate, NULL); pthread_testcancel(); In general, running multipathd under valgrind might help finding the issue. But valgrind will slow down multipathd drastically, so timings will change, and it's not granted that the problem will still be reproducable. Alternatively, you can work with -fsanitize=address, but in this specific case you'd need to compile libudev with this option, too. Martin -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel