Re: geli panics my system after suspend-resume: g_eli_orphan_spoil_assert() called for cd0.eli

2015-06-13 Thread Matthew D. Fuller
[ 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)   |  fulle...@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
   On the Internet, nobody can hear you scream.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: geli panics my system after suspend-resume: g_eli_orphan_spoil_assert() called for cd0.eli

2015-06-13 Thread Garrett Cooper
On Jun 13, 2015, at 7:10, José García Juanino  wrote:

> Hi FreeBSD current,
> 
> I get a reproducible panic following these steps:
> 
> 1- Mount a geli encrypted DVD:
> 
> # geli attach /dev/cd0
> Password:
> 
> # mount -o ro /dev/cd0.eli /cdrom
> 
> 2- Do some work in the /cdrom filesystem.
> 
> 3- Close my laptop lid. The system suspends.
> 
> 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.
> 
> After that, X windows session close and bt> prompt shows in the
> console. I type "dump" and reboot.
> 
> Download the full backtrace from http://pastebin.com/i82Zbt0A

File a bug! https://bugs.freebsd.org/bugzilla/enter_bug.cgi



signature.asc
Description: Message signed with OpenPGP using GPGMail


geli panics my system after suspend-resume: g_eli_orphan_spoil_assert() called for cd0.eli

2015-06-13 Thread José García Juanino
Hi FreeBSD current,

I get a reproducible panic following these steps:

1- Mount a geli encrypted DVD:

# geli attach /dev/cd0
Password:

# mount -o ro /dev/cd0.eli /cdrom

2- Do some work in the /cdrom filesystem.

3- Close my laptop lid. The system suspends.

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.

After that, X windows session close and bt> prompt shows in the
console. I type "dump" and reboot.

Download the full backtrace from http://pastebin.com/i82Zbt0A

 Thanks in advance, best regards
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"