From owner-freebsd-current@FreeBSD.ORG Sat Oct 30 16:55:30 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0DAE916A4CE; Sat, 30 Oct 2004 16:55:30 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.1/8.13.1) with ESMTP id i9UGtTPB042907; Sat, 30 Oct 2004 12:55:29 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.1/8.13.1/Submit) id i9UGtSZw042906; Sat, 30 Oct 2004 12:55:28 -0400 (EDT) (envelope-from green) Date: Sat, 30 Oct 2004 12:55:27 -0400 From: Brian Fundakowski Feldman To: Martin Message-ID: <20041030165527.GP93831@green.homeunix.org> References: <1099149715.779.33.camel@klotz.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1099149715.779.33.camel@klotz.local> User-Agent: Mutt/1.5.6i cc: FreeBSD Current cc: phk@FreeBSD.org Subject: Re: USB card reader (umass) panic on FreeBSD 5.3-STABLE X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Oct 2004 16:55:30 -0000 On Sat, Oct 30, 2004 at 05:21:55PM +0200, Martin wrote: > > Hi, > > it's a while ago that I reported a panic when attaching > a USB card reader device. The panic still exists and > the behavior has not changed. > > If I can help somehow to solve this problem, please message me. > > System: > FreeBSD 5.3-STABLE #0: Wed Oct 27 01:31:39 CEST 2004 > > Earlier PR: > http://www.freebsd.org/cgi/query-pr.cgi?pr=i386/65783 > > umass0: ICSI 2.0 Card Reader, rev 2.00/3a, addr 3 > da0: at umass-sim0 bus 0 target 0 lun 0 > da0: Removable Direct Access SCSI-0 device > da0: 1.000MB/s transfers > da0: 122MB (250368 512 byte sectors: 64H 32S/T 122C) > da1: at umass-sim0 bus 0 target 0 lun 1 > da1: Removable Direct Access SCSI-0 device > da1: 1.000MB/s transfers > da1: Attempt to query device size failed: NOT READY, Medium not present > (da2:umass-sim0:0:0:2): READ CAPACITY. CDB: 25 40 0 0 0 0 0 0 0 0 > (da2:umass-sim0:0:0:2): ILLEGAL REQUEST asc:25,0 > (da2:umass-sim0:0:0:2): Logical unit not supported > (da2:umass-sim0:0:0:2): fatal error, failed to attach to device > (da2:umass-sim0:0:0:2): lost device > (da2:umass-sim0:0:0:2): removing device entry > (da2:umass-sim0:0:0:3): READ CAPACITY. CDB: 25 60 0 0 0 0 0 0 0 0 > (da2:umass-sim0:0:0:3): ILLEGAL REQUEST asc:25,0 > (da2:umass-sim0:0:0:3): Logical unit not supported > (da2:umass-sim0:0:0:3): fatal error, failed to attach to device > (da2:umass-sim0:0:0:3): lost device > (da2:umass-sim0:0:0:3): removing device entry > > Fatal trap 12: page fault while in kernel mode > fault virtual address = 0x3c > fault code = supervisor write, page not present > instruction pointer = 0x8:0xc05731dc > stack pointer = 0x10:0xd01b7cac > frame pointer = 0x10:0xd01b7cb8 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, def32 1, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 2 (g_event) > [thread 100026] > Stopped at g_disk_destroy+0xc: movl $0,0x3c(%eax) > db> trace > g_disk_destroy(c20b9d80,0,0,c080a3a3,0) at g_disk_destroy+0xc > one_event(66666667,c05767c0,0,d01b7d10,c05767e5) at one_event+0x225 > g_run_events(c087c39c,0,4c,c080a3a3,64) at g_run_events+0x15 > g_event_procbody(0,d01b7d48,0,0,0) at g_event_procbody+0x25 > fork_exit(c05767c0,0,d01b7d48) at fork_exit+0x80 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0x1, eip = 0, esp = 0xd01b7d7c, ebp = 0 --- > > The card reader has got 4 slots. Only the first one is in use > and the Compact flash card is recognized correctly. But then > the kernel scans the empty slots and panics. The first empty > slot is handled right, I think. This looks like a GEOM bug. You're getting two posted g_disk_destroy events in rapid succession -- i.e. for the same disk device structures in memory -- and they are racing and both running after both disks have been created and then freed, from what I can tell. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\