From owner-freebsd-current@FreeBSD.ORG Thu Nov 27 19:33:59 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2BB5016A4CE for ; Thu, 27 Nov 2003 19:33:59 -0800 (PST) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00C2C43FF7 for ; Thu, 27 Nov 2003 19:33:57 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.9p2/8.12.9) with ESMTP id hAS3XkeF016528; Thu, 27 Nov 2003 19:33:54 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <200311280333.hAS3XkeF016528@gw.catspoiler.org> Date: Thu, 27 Nov 2003 19:33:46 -0800 (PST) From: Don Lewis To: masta@wifibsd.org In-Reply-To: <61677.24.0.61.35.1069989467.squirrel@mail.yazzy.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: current@FreeBSD.org Subject: Re: panic inserting CF card. 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: Fri, 28 Nov 2003 03:33:59 -0000 On 27 Nov, masta wrote: > I'm able to reproduce a panic on demand. I simply insert my IBM Microdrive > CF card into the PCM/CIA slot of the laptop, which is a Dell CPi, and > panic! I build a kernel.debug in the hope somebody can help me analyze the > back-trace. > > Oh by the way, the sources from this backtrace are from 11/27/2003, and > inserting the CF card used to be functional in early November. I have no > begun the process of targeting various dates/time to find when > functionality was lost. > (kgdb) where > #10 0xc06995d8 in calltrap () at {standard input}:94 > #11 0xc06be8de in __udivdi3 (a=0, b=0) at ../../../libkern/udivdi3.c:51 > #12 0xc044ac53 in ad_print (adp=0x0) at ../../../dev/ata/ata-disk.c:384 > #13 0xc044a3fb in ad_attach (atadev=0xc243d4a4) at > ../../../dev/ata/ata-disk.c:162 > #14 0xc0435e99 in ata_attach (dev=0x0) at ../../../dev/ata/ata-all.c:165 > #15 0xc04752f5 in pccard_compat_do_attach (bus=0xc13a6b00, dev=0xc243d400) > at card_if.h:120 > #16 0xc043c927 in pccard_compat_attach (dev=0xc243d400) at card_if.h:138 > #17 0xc052fdf9 in device_probe_and_attach (dev=0xc243d400) at device_if.h:39 > #18 0xc0473fa8 in pccard_attach_card (dev=0xc13a6b00) at > ../../../dev/pccard/pccard.c:262 > #19 0xc04628c8 in exca_insert (exca=0xc138d204) at card_if.h:66 > #20 0xc047c4f3 in cbb_insert (sc=0xc138d204) at > ../../../dev/pccbb/pccbb.c:1078 > #21 0xc047c30b in cbb_event_thread (arg=0xc138d200) at > ../../../dev/pccbb/pccbb.c:1028 > #22 0xc0502b84 in fork_exit (callout=0xc047c1d0 , > arg=0x0, frame=0x0) at ../../../kern/kern_fork.c:793 > (kgdb) q In ad_print() there is the following statement: ata_prtdev(adp->device,"%lluMB <%.40s> [%lld/%d/%d] at ata%d-%s %s%s\n", (unsigned long long)(adp->total_secs / ((1024L * 1024L) / DEV_BSIZE)), adp->device->param->model, (unsigned long long)(adp->total_secs / (adp->heads * adp->sectors)), adp->heads, adp->sectors, device_get_unit(adp->device->channel->dev), (adp->device->unit == ATA_MASTER) ? "master" : "slave", (adp->flags & AD_F_TAG_ENABLED) ? "tagged " : "", ata_mode2str(adp->device->mode)); Offhand I'd guess that adp->heads and/or adp->sectors is zero. If you've got a core file, try backtracking from there with gdb, otherwise sprinkle some printf's around. Either this calculation is new, or some recent change is causing the heads and sectors to be initialized to zero.