[dm-devel] [PATCH 2/4] multipath-tools: add checker callout to repair path

Mike Christie mchristi at redhat.com
Sun Aug 14 08:41:33 UTC 2016


On 08/11/2016 04:41 PM, Bart Van Assche wrote:
> On 08/11/2016 01:33 PM, Mike Christie wrote:
>> Could you try the attached patch. I found two segfaults. If check_path
>> returns less than 0 then we free the path and so we cannot call repair
>> on it. If libcheck_init fails it memsets the checker, so we cannot call
>> repair on it too.
>>
>> I moved the repair call to the specific paths that the path is down.
> 
> Hello Mike,
> 
> Thanks for the patch. Unfortunately even with this patch applied I can
> still trigger a segfault sporadically:
> 

Ok. This should fix all of them. Attached patch fixes:

1. If check_path returns less than 0 then we free the path and so we
cannot call repair on it of course.
2. If libcheck_init fails it memsets the checker, so we cannot call
repair on it too.
3. We can hit a race where when pathinfo is setting up a path, the path
could have gone down. In the DI_CHECKER chunk we then do not run
get_state and attach a checker. Later when check_path is run
path_offline we could still return PATH_DOWN or PATH_REMOVED and
get_state is again not run so we do not get to attach a checker again. I
was then running repair_path since the state was PATH_DOWN, and kaboom.

Attached patch should fix these issues.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multipathd-fix-segfault.patch
Type: text/x-patch
Size: 1731 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20160814/a343c9dc/attachment.bin>


More information about the dm-devel mailing list