Date: Sat, 13 Jun 2015 17:46:03 -0500 From: "Matthew D. Fuller" <fullermd@over-yonder.net> To: =?iso-8859-1?Q?Jos=E9_Garc=EDa?= Juanino <jjuanino@gmail.com> Cc: freebsd-geom@freebsd.org Subject: Re: geli panics my system after suspend-resume: g_eli_orphan_spoil_assert() called for cd0.eli Message-ID: <20150613224602.GB1733@over-yonder.net> In-Reply-To: <CAAVO5%2BLR9MfHvt0tR5G4FyXKRt_hzkR3ZKUxvEA8Z%2BjWuEFq3g@mail.gmail.com> References: <CAAVO5%2BLR9MfHvt0tR5G4FyXKRt_hzkR3ZKUxvEA8Z%2BjWuEFq3g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[ Redirect to -geom, bcc'd to -current for transition ] On Sat, Jun 13, 2015 at 04:10:38PM +0200 I heard the voice of José García Juanino, and lo! it spake thus: > Hi FreeBSD current, > > I get a reproducible panic following these steps: > > 1- Mount a geli encrypted DVD: [...] > 4- Open again the lid a wait. The system resumes, but panics after a > few seconds: > > panic: Function g_eli_orphan_spoil_assert() called for cd0.eli. This is presumably what's hooked up in g_eli_create(): /* * Spoiling cannot happen actually, because we keep provider open for * writing all the time or provider is read-only. */ gp->spoiled = g_eli_orphan_spoil_assert; The backtrace makes me think that coming out of resume will cause a media change event on the cd0 device, which sounds a _little_ odd, but may be necessary due to Stupid Reality Crap. That pushes a spoil event down to g_eli. And g_eli seems to assume that can't happen to a thing it's got around an open. With the caveat that I'm no expert on ELI or GEOM, and any advice I might give could just be the trigger for a nasal demon invasion of our world, one thing you might try is taking that event as a hint to just blow away the .eli device; treat it like an orphan. So changing that callback to using the g_eli_orphan func instead. e.g., something like Index: g_eli.c =================================================================== --- g_eli.c (revision 284359) +++ g_eli.c (working copy) @@ -730,7 +730,7 @@ g_eli_create(struct gctl_req *req, struct g_class * Spoiling cannot happen actually, because we keep provider open for * writing all the time or provider is read-only. */ - gp->spoiled = g_eli_orphan_spoil_assert; + gp->spoiled = g_eli_orphan; gp->orphan = g_eli_orphan; gp->dumpconf = g_eli_dumpconf; /* (not even remotely tested; beware of leopard) -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150613224602.GB1733>