From owner-freebsd-usb@freebsd.org Wed Jan 9 19:22:47 2019 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA7C9148BD85 for ; Wed, 9 Jan 2019 19:22:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 4227C70C3B for ; Wed, 9 Jan 2019 19:22:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id EE4BE148BD84; Wed, 9 Jan 2019 19:22:45 +0000 (UTC) Delivered-To: usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9F1D148BD83 for ; Wed, 9 Jan 2019 19:22:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3879070C39 for ; Wed, 9 Jan 2019 19:22:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 73DA213FFE for ; Wed, 9 Jan 2019 19:22:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x09JMivk015205 for ; Wed, 9 Jan 2019 19:22:44 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x09JMi8W015204 for usb@FreeBSD.org; Wed, 9 Jan 2019 19:22:44 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: usb@FreeBSD.org Subject: [Bug 176417] [xhci][cam][umass] kernelpanic while removing plugged in disk Date: Wed, 09 Jan 2019 19:22:44 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 9.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: imp@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 19:22:47 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D176417 Warner Losh changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |imp@FreeBSD.org --- Comment #6 from Warner Losh --- OK. So looking at the stack trace, we get a panic because we're trying to a= dd 'pass16' as a device when there's already a pass16 device. This appears to be because the CAM probe device thinks it needs to enumerate it, but the reporter said it was being removed. The actual traceback, in case we lose the dropbox is: da12: xxx MB (xxx 512 byte sectors: ) ugen3.2: at usbus3 (disconnected) umass0: at ushub3 port 1, addr 1 (disconnected) (da12:umass-sim0:0:0:0): lost device - 1 outstanding (da12:umass-sim0:0:0:0): outstanding 0 (da12:panic: make_dev_credv: bad si_name (error =3D 17, si_name=3Dpass16) umass-sim0:0: cpuid=3D1 0:KDB: stack backtrace: 0): removing device entry kdb_backtrace panic make_dev_crdev+0x1dc make_dev_0x6f passregister+0x1fe cam_periph_alloc+0x569 passasysnc ... so we have the intermixed output, strongly suggesting one thread removing w= hile the other thread is adding. there's been a fair amount of locking tightening that would prevent the refcount from falling to 0, I think, but I can't be sure. This is purely a CAM problem. I wonder if the original poster can recreate this issue still, or if we can provoke it somehow. But, this CAM problem is because of a random failure during discovery where= the drive also goes away and we start the teardown, so from that perspective it= 's also a USB issue maybe. --=20 You are receiving this mail because: You are the assignee for the bug.=