[dm-devel] multipath-tools 0.7.4 failure to remove device

Julian Andres Klode julian.klode at canonical.com
Fri Jan 12 21:47:00 UTC 2018


On Fri, Jan 12, 2018 at 09:35:39PM +0100, Martin Wilck wrote:
> On Fri, 2018-01-12 at 09:38 +0100, Julian Andres Klode wrote:
> > 
> > and then we get I/O error on the device and it's rendered unusable.
> > It's
> > also crashing in uev_pathfail_check() occassionally because
> > find_path_by_devt()
> > returns NULL, so I applied the following patch to at least continue,
> > but that's
> > obviously wrong - We get an udev event for a device which does not
> > exist in /dev
> > (but it should)?
> 
> Adding Guan, as the pathfail check is from his code.
> 
> > --- a/multipathd/main.c
> > +++ b/multipathd/main.c
> > @@ -1090,6 +1090,11 @@ uev_pathfail_check(struct uevent *uev, s
> >  	lock(&vecs->lock);
> >  	pthread_testcancel();
> >  	pp = find_path_by_devt(vecs->pathvec, devt);
> > +	if (!pp) {
> > +		condlog(3, "%s: Cannot find path by dm path %s",
> > uev->kernel, devt);
> > +		FREE(devt);
> > +		goto out;
> > +	}
> >  	r = io_err_stat_handle_pathfail(pp);
> >  	lock_cleanup_pop(vecs->lock);
> 
> You need to cleanup the lock in the error path. I'd pefer checking
> for a NULL path argument in io_err_stat_handle_pathfail(). See
> attachment.

Oh, silly me. Yes, you're right, and your patch fixes the issue. 

> 
> I'm assuming that you are not using the "marginal path" logic. In
> general I don't like the fact that PATH_FAILED events are handled at
> all in multipathd if this logic is inactive; that code path is only
> needed for this purpose. But that's just a side note.

I don't know actually, I'm just updating the package :) I can say that
the tests were run with default configuration, normally we run with
DEFAULT_FIND_MULTIPATHS but that does not work yet with 0.7.4 - no
dm-0 device seems to get created in this test case (some systems without
multipath were broken 2.5 years ago just by installing it because it
took over non-multipath devices, hence the option was enabled; might
not even be needed anymore).

I'll collect some more data on Monday.

-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en




More information about the dm-devel mailing list