Date: Wed, 17 Apr 2019 03:53:56 +0000 From: bugzilla-noreply@freebsd.org To: geom@FreeBSD.org Subject: [Bug 237269] panic in glabel (g_label_destroy) stop after resizing GPT partition Message-ID: <bug-237269-14739-cbEtgd1MFe@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-237269-14739@https.bugs.freebsd.org/bugzilla/> References: <bug-237269-14739@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237269 --- Comment #7 from andrew@tao11.riddles.org.uk --- I think I have identified the sequence of events: 1. When we resize the partition, it spoils the attached LABEL consumers (correctly, I think, since those might depend on the partition size); 2. The spoiled LABELs are orphaned, orphaning the DEV geoms that are their = sole consumers; 3. the DEV geoms destruct, detaching from the LABELs and removing the /dev entries; 4. BEFORE anything significant can happen, DEV re-tastes the now-orphaned L= ABEL geoms, getting an ENXIO from trying to open them, but for whatever reason attaches to them anyway, creating new /dev entries and attaching new consum= ers to the orphan LABELs; 5. Since the old LABELs now have attached consumers that aren't going to di= e, the withering process never completes, and the /dev entries remain attached= to the orphaned LABEL geoms that now have no partition under them; 6. When DEV gets to taste the new providers for the new LABEL geoms for the resized partitions, it can't create the /dev entries for them because they already exist. You'd think that step 4 wouldn't happen because a withering geom shouldn't = be offered for tasting, but it turns out there's a code path where this happen= s: and strangely enough it's in g_resize_provider_event. So there are several places here where questionable things are happening, e= ven beyond the assumption that actually causes the crash (LABEL's assumption th= at it always has a consumer). --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-237269-14739-cbEtgd1MFe>