From owner-freebsd-geom@freebsd.org Thu Jul 2 09:47:55 2015 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D073991D93 for ; Thu, 2 Jul 2015 09:47:55 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id AF3BF1B79 for ; Thu, 2 Jul 2015 09:47:54 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 96E187CF; Thu, 2 Jul 2015 11:47:51 +0200 (CEST) Date: Thu, 2 Jul 2015 11:49:10 +0200 From: Pawel Jakub Dawidek To: =?iso-8859-1?Q?Jos=E9_Garc=EDa?= Juanino Cc: "Matthew D. Fuller" , freebsd-geom@freebsd.org Subject: Re: geli panics my system after suspend-resume: g_eli_orphan_spoil_assert() called for cd0.eli Message-ID: <20150702094909.GA1186@garage.freebsd.pl> References: <20150613224602.GB1733@over-yonder.net> <20150615060128.GC1733@over-yonder.net> <20150629013011.GN50491@over-yonder.net> <20150701154233.GA1456@garage.freebsd.pl> <20150701193027.GT50491@over-yonder.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 11.0-CURRENT amd64 User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2015 09:47:55 -0000 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 02, 2015 at 12:53:12AM +0200, Jos=E9 Garc=EDa Juanino wrote: > On 1 July 2015 at 21:30, Matthew D. Fuller wro= te: > > On Wed, Jul 01, 2015 at 05:42:33PM +0200 I heard the voice of > > Pawel Jakub Dawidek, and lo! it spake thus: > >> > >> The spoil event happens when provider is open for writting for the > >> first time (its open-for-write counter goes from 0 to >0). Since > >> GELI opens its providers always exclusively there can be no write > >> opens, thus the spoil event is unexpected. > > > > Well, from OP > > (https://lists.freebsd.org/pipermail/freebsd-current/2015-June/056193.h= tml) > > it's coming from a CD media change event. The BT linked from the mail > > shows. > > > > panic() at panic+0x43/frame 0xfffffe011ba81b00 > > g_eli_orphan_spoil_assert() at g_eli_orphan_spoil_assert+0x1f/frame 0xf= ffffe011ba81b10 > > g_spoil_event() at g_spoil_event+0x72/frame 0xfffffe011ba81b40 > > g_media_changed_event() at g_media_changed_event+0x68/frame 0xfffffe011= ba81b70 > > g_run_events() at g_run_events+0x1a7/frame 0xfffffe011ba81bb0 > > > > > >> To see what exactly is happening I'd need to see the console output > >> from before that happens with kern.geom.debugflags set to 5. > > > > 'd have to talk to Jos=E9 for that; added him back to CC. >=20 > Hi, thanks for your support! >=20 > You can see the console output here, after setting > kern.geom.debugflags=3D5 in /boot/loader.conf: >=20 > http://picpaste.com/panic_geli.jpg >=20 > Previously, I ran: >=20 > # geli attach -r /dev/cd0 > # mount /dev/cd0.eli /cdrom >=20 > ### close the laptop lid and waits a few seconds. The system suspends. > ### open the laptop again. The system resumes. Wait a few seconds: the > system panics. THank you for the screenshot. My assumptions are out-dated. With g_media_changed() we can get spoil event even if we hold provider exclusively open. Your patch, Matthew, is correct, but could you also update the comment there to take into account g_media_changed() addition? Thanks. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --envbJBWh7q8WU6mo Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJVlQkVAAoJEJVLhSuxKFt1HJQP/iftlt4LxBN5jaiucb0XCiBj PB7CU35Fg202KOaKpYOhGpl3NutaoVgDbrdXsrYzdB6ScjlT5h+r0pa+NP3a4SGZ y9JLdkGtjGm/JZxGRubHnydfzVPRG7QKXN1dThxW96pAQDi5FXD+SDevZqIueoOg HGeFq8Dgda+57qvJzh1sezEsLQjRS7BxYIT6dKegbe1sqRvzc6XecS5OeB9XzNtw 3mIrfXtnEtbqlFpIs8wwiNClQhv8vAaUw+Lqvau11uyich0pFfI/R5/YFFvEIkTH 0VunN1gtlFMoUDlWbT46TjsAWRAjZN7ZpOu1v2O2Ww94a/PMy/uRrRfiu1C8NSQf Nn1vf56+tVIYd1A3TQlssvqkYrGUvQDuuf1kCqE7aJTHiDmIxO0OovNVp2igDOXK R0Ym95pp6mPcPvsFgt3tTpx2yPZze38wU+IoFCoKz67wbWjWK5N8xnUDd+iKpvQl iJ4P29FlsQSw49xagZHDahtOKR7EGmbNejFHlrdOnasqVhdTcd1E7k0bI2dUy+qY OgtoF67RiCq9gUKKwtfKne5eYaY57pNbG9tMoqQjsYxH9njVDPBAS615mXIF+QRS IcxIY2SI7OSodZDuZHgxf57RT6K+IYySj7OO6B9+uhNYpoIhO8JAA2qw2MEIUfPL qenK0M0KcoGCt3yZhq7a =5wuw -----END PGP SIGNATURE----- --envbJBWh7q8WU6mo--