From owner-freebsd-scsi@FreeBSD.ORG Wed May 18 16:51:25 2011 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 918C41065678 for ; Wed, 18 May 2011 16:51:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2C3768FC08 for ; Wed, 18 May 2011 16:51:24 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p4IGpLAi020348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 May 2011 19:51:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p4IGpLVd001338; Wed, 18 May 2011 19:51:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p4IGpK3J001337; Wed, 18 May 2011 19:51:20 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 18 May 2011 19:51:20 +0300 From: Kostik Belousov To: Joerg Wunsch Message-ID: <20110518165120.GT48734@deviant.kiev.zoral.com.ua> References: <20110508085314.GA5364@uriah.heep.sax.de> <20110508094509.GT48734@deviant.kiev.zoral.com.ua> <20110508104543.GB5364@uriah.heep.sax.de> <20110518060429.GA4146@uriah.heep.sax.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VDo88IHMZzDSr6Ba" Content-Disposition: inline In-Reply-To: <20110518060429.GA4146@uriah.heep.sax.de> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-scsi@freebsd.org Subject: Re: Panic when removing a SCSI device entry X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2011 16:51:25 -0000 --VDo88IHMZzDSr6Ba Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 18, 2011 at 08:04:29AM +0200, Joerg Wunsch wrote: > As Joerg Wunsch wrote: >=20 > > > Please provide the full printout from the panic. Also, it would > > > be useful to get the dump and do "p *dev" from the frame of > > > destroy_devl(). I might need further information after the requested > > > data is provided. > >=20 > > Unfortunately, I somehow cannot get the system to provide a coredump. >=20 > OK, it happened again last night, and I've got a DDB trace now. The > panic is at a slightly different location (in notify_destroy()), but > still a null pointer (apparently, dev->si_name is NULL now). >=20 > [thread pid 33502 tid 100246 ] > Stopped at strlen+0x8: cmpb $0,0(%edx) > db> bt > Tracing pid 33502 tid 100246 td 0xc8be92e0 > strlen(0,c6dfc804,cc0b0e80,cc6e6800,e98804b8,...) at strlen+0x8 > notify(ce0dc900,0,0,cc6e6800,c05ac3fb,...) at notify+0x3f > destroy_devl(e98804f4,c0470a2b,ce0dc900,c07e9284,1,...) at destroy_devl+0= x17b > destroy_dev(ce0dc900,c07e9284,1,0,e988051c,...) at destroy_dev+0x10 The ddb arguments printed might be wrong, or might point to the issue causing the panic. Please do "p *(struct cdev_priv *)0xe98804f4" and "p *(struct cdev_priv *)0xce0dc900" from kgdb. > sacleanup(cc0b0e80,c07f161b,12,0,e9880570,...) at sacleanup+0x8b > camperiphfree(50,e9880994,c044b4de,e98809ac,c6e83c80,...) at camperiphfre= e+0x8f > cam_periph_release_locked(cc0b0e80,0,cc0b0e80,e98809bc,c044b762,...) at c= am_periph_release_locked+0x55 > cam_periph_release(cc0b0e80,14c,cc814200,e98809fc,e98809e8,...) at cam_pe= riph_release+0x60 > saopen(cc814200,1,2000,c8be92e0,c07cc465,...) at saopen+0x263 > giant_open(cc814200,1,2000,c8be92e0,e9880b08,...) at giant_open+0x93 > devfs_open(e9880b08,e9880b30,c061c4fa,c0840e60,e9880b08,...) at devfs_ope= n+0x102 > VOP_OPEN_APV(c0840e60,e9880b08,c075ad1a,cacbe788,0,...) at VOP_OPEN_APV+0= x42 > vn_open_cred(e9880b78,e9880c2c,0,0,c7fba280,...) at vn_open_cred+0x4ba > vn_open(e9880b78,e9880c2c,0,c7f49150,3,...) at vn_open+0x3b > kern_openat(c8be92e0,ffffff9c,804a0bb,0,1,...) at kern_openat+0x12c > kern_open(c8be92e0,804a0bb,0,0,6,...) at kern_open+0x35 > open(c8be92e0,e9880cec,0,c,28176088,...) at open+0x30 > syscallenter(c8be92e0,e9880ce4,e9880d1c,c07ad276,c8be92e0,...) at syscall= enter+0x329 > syscall(e9880d28) at syscall+0x34 > Xint0x80_syscall() at Xint0x80_syscall+0x21 > syscall (5, FreeBSD ELF32, open), eip =3D 0x2817608f, esp =3D 0xbfbfec7c,= ebp =3D 0xbfbfee18 --- > db> show reg > cs 0x20 > ds 0x28 > es 0x28 > fs 0x8 > ss 0x28 > eax 0 > ecx 0x8 > edx 0 > ebx 0x2 > esp 0xe9880468 > ebp 0xe9880468 > esi 0xce0dc900 > edi 0xcc6e6800 > eip 0xc0620568 strlen+0x8 > efl 0x10202 > strlen+0x8: cmpb $0,0(%edx) =2E.. > As you can see, I've got a coredump this time, so I can run kgdb > on that. >=20 > Currently, I'm compiling an INVARIANTS kernel, and will boot that one > soon - though I wonder whether it really makes sense here, as the > picture is different from last time (due to Kostik's suggested > patch?). I am pretty much sure that INVARIANTS kernel would hit the assert about SI_NAMED flag being clear on destroy_devl() invocation. We would have catched the issue earlier, with less interesting data destroyed. Anyway, please show the data I requested from the dump, and do install INVARIANTS kernel. --VDo88IHMZzDSr6Ba Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3T+QgACgkQC3+MBN1Mb4hkQQCfe2RIG5OOZoUWoSzrSCbOJBfg 12MAoMEDO0N9WCM+9nJAaBMS1LDrR7o+ =MZHr -----END PGP SIGNATURE----- --VDo88IHMZzDSr6Ba--