From owner-freebsd-usb@FreeBSD.ORG Sun Nov 30 21:00:07 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 371F41065676 for ; Sun, 30 Nov 2008 21:00:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1403B8FC12 for ; Sun, 30 Nov 2008 21:00:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mAUL062A074740 for ; Sun, 30 Nov 2008 21:00:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mAUL06TY074739; Sun, 30 Nov 2008 21:00:06 GMT (envelope-from gnats) Resent-Date: Sun, 30 Nov 2008 21:00:06 GMT Resent-Message-Id: <200811302100.mAUL06TY074739@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stéphane Legrand Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62820106564A for ; Sun, 30 Nov 2008 20:58:43 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 517CA8FC0C for ; Sun, 30 Nov 2008 20:58:43 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mAUKwgNx092368 for ; Sun, 30 Nov 2008 20:58:42 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mAUKwgOa092367; Sun, 30 Nov 2008 20:58:42 GMT (envelope-from nobody) Message-Id: <200811302058.mAUKwgOa092367@www.freebsd.org> Date: Sun, 30 Nov 2008 20:58:42 GMT From: Stéphane Legrand To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: usb/129311: Instant crash with an USB card reader X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2008 21:00:07 -0000 >Number: 129311 >Category: usb >Synopsis: Instant crash with an USB card reader >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 30 21:00:06 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Stéphane Legrand >Release: 7.1-PRERELEASE >Organization: >Environment: FreeBSD sequoia.mondomaineamoi.megalo 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #17: Sat Nov 15 17:44:14 CET 2008 stephane@sequoia.mondomaineamoi.megalo:/usr/obj/usr/src/sys/SEQUOIA i386 >Description: Hello, I recently purchased an USB adapter to read SD cards. On my first try, i made a mistake and put the SD card on the wrong side. This instantantly crashed my FreeBSD system. Here is the KDB output : There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... .. Unread portion of the kernel message buffer: panic: kmem_malloc(1848643584): kmem_map too small: 43110400 total allocated cpuid = 0 Uptime: 7h51m49s Physical memory: 1002 MB Dumping 183 MB: 168 152 136 120 104 88 72 56 40 24 8 .. Loaded symbols for /boot/kernel/drm.ko #0 doadump () at pcpu.h:196 196 __asm __volatile("movl %%fs:0,%0" : "=r" (td)); (kgdb) list 191 static __inline struct thread * 192 __curthread(void) 193 { 194 struct thread *td; 195 196 __asm __volatile("movl %%fs:0,%0" : "=r" (td)); 197 return (td); 198 } 199 #define curthread (__curthread()) 200 (kgdb) backtrace #0 doadump () at pcpu.h:196 #1 0xc0754a8f in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418 #2 0xc0754d54 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:574 #3 0xc0965432 in kmem_malloc (map=0xc147108c, size=1848643584, flags=2) at /usr/src/sys/vm/vm_kern.c:312 #4 0xc095c29a in page_alloc (zone=0x0, bytes=1848643584, pflag=0xe4276b4f "\002", wait=2) at /usr/src/sys/vm/uma_core.c:959 #5 0xc095ec0b in uma_large_malloc (size=1848643584, wait=2) at /usr/src/sys/vm/uma_core.c:2713 #6 0xc0745aa4 in malloc (size=1848643584, mtp=0xc0b324a0, flags=2) at /usr/src/sys/kern/kern_malloc.c:393 #7 0xc0700b2c in g_read_data (cp=0xc6644c80, offset=Unhandled dwarf expression opcode 0x93 ) at geom.h:300 #8 0xc06fb6a8 in g_bsd_try (gp=Variable "gp" is not available. ) at /usr/src/sys/geom/geom_bsd.c:211 #9 0xc06fbbf7 in g_bsd_taste (mp=0xc0b321e0, pp=0xc5a23580, flags=0) at /usr/src/sys/geom/geom_bsd.c:549 #10 0xc0703401 in g_new_provider_event (arg=0xc5a23580, flag=0) at /usr/src/sys/geom/geom_subr.c:543 #11 0xc07000bf in g_run_events () at /usr/src/sys/geom/geom_event.c:211 #12 0xc0701317 in g_event_procbody () at /usr/src/sys/geom/geom_kern.c:141 #13 0xc0732d11 in fork_exit (callout=0xc07012ac , arg=0x0, frame=0xe4276d38) at /usr/src/sys/kern/kern_fork.c:804 #14 0xc09d31d0 in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:264 Of course, this crash should never happen as i'm supposed to put the SD card on the right side :-) But i prefer to send this PR in case this could be avoided. By the way, when the SD card is put on the right side, it works perfectly well. Regards, Stéphane Legrand. >How-To-Repeat: Plug the USB card reader with a SD card put on the wrong side. >Fix: Put the SD card on the right side! :-) >Release-Note: >Audit-Trail: >Unformatted: