[dm-devel] [PATCH] multipathd: avoid crash in uevent_cleanup()

Martin Wilck mwilck at suse.com
Tue Mar 2 16:55:19 UTC 2021


Hi lixiaokeng,

On Tue, 2021-03-02 at 16:29 +0100, Martin Wilck wrote:
> On Tue, 2021-03-02 at 20:44 +0800, lixiaokeng wrote:
> > 
> > 
> 
> The stacks you have shown indicate that the instruction pointers were
> broken. That would suggest something similar as dicussed in the ML
> thread leading to 38ffd89 ("libmultipath: prevent DSO unloading with
> astray checker threads"). Your logs show "tur checker refcount 1", so
> the next call to checker_put would have unloaded the DSO. 
> 
> Please try commenting out the dlclose() call in free_checker_class(),
> and see if it makes a difference.

I have two TENTATIVE patches here that I'd like you to ask to try (with
the dlclose in place again). Also, please make sure you've got 38ffd89.

This is really tentative, I'm still pretty much in the dark. But my
theory is that the crash can happen if the thread is about to start. So
the most important part is the hunk that checks the return value of
checker_class_ref() in start_checker_thread().

Martin


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libmultipath-protect-DSO-unloading-with-RCU.patch
Type: text/x-patch
Size: 4795 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20210302/5693a3be/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-libmultipath-tur_thread-use-pthread_exit.patch
Type: text/x-patch
Size: 2236 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20210302/5693a3be/attachment-0001.bin>


More information about the dm-devel mailing list