From owner-freebsd-usb@FreeBSD.ORG Thu Apr 24 15:19:28 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47FA61065674 for ; Thu, 24 Apr 2008 15:19:28 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by mx1.freebsd.org (Postfix) with ESMTP id 32CBA8FC23 for ; Thu, 24 Apr 2008 15:19:28 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so5103718waf.3 for ; Thu, 24 Apr 2008 08:19:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Y+xmGD7Nq9LiJSEmiiQhXWjihauCWCoHknJ9k9YRyN0=; b=R0Ao2K9lcSh6OePiisTlVGtKyEJ7jV6YHeFORHyK3kz+s4mg5dj5cZ8yz1xvKCyGw/Eh1T/WX+HQAS/McwmIh3FRAW3pjjfmjVhay1/C0Vy1APufIzUYwOuxfvvaPydff1xIHrnT/I7fJaAU16+aPyjiv6Aq/nVt8MIJ/ZEw6cE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YMPP1Raq06w7g4RdU+eYifaQcx+qlHQSSKx9la1imeUJsj8SXJqdPbgYEx9FFZgAjA30LrmLZhBO7pvk0PJfKNFYnmfDnl/GXAVGOjoeBQ8ZXaykeNuflyz1bI2kZcCZu8I1M0d4oUecXr0xJw+v4QaYh/PQu+SfvREJ2pH+wbo= Received: by 10.114.183.1 with SMTP id g1mr1887332waf.3.1209049958583; Thu, 24 Apr 2008 08:12:38 -0700 (PDT) Received: by 10.114.39.14 with HTTP; Thu, 24 Apr 2008 08:12:38 -0700 (PDT) Message-ID: Date: Thu, 24 Apr 2008 23:12:38 +0800 From: "Xiaofan Chen" To: "Hans Petter Selasky" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200710121912.03585.hselasky@c2i.net> <200710152303.29294.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: PICkit 2 again with HPS stack 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: Thu, 24 Apr 2008 15:19:28 -0000 On Thu, Apr 24, 2008 at 10:59 PM, Xiaofan Chen wrote: > > [root@freebsd7 /var/crash]# ls -la > total 508352 > drwxr-x--- 2 root wheel 512 Apr 24 22:07 . > drwxr-xr-x 25 root wheel 512 Apr 25 06:07 .. > -rw-r--r-- 1 root wheel 2 Apr 24 22:07 bounds > -rw------- 1 root wheel 444 Mar 30 16:19 info.0 > -rw------- 1 root wheel 445 Mar 30 16:52 info.1 > -rw------- 1 root wheel 446 Apr 24 21:58 info.2 > -rw------- 1 root wheel 446 Apr 24 22:07 info.3 > -rw-r--r-- 1 root wheel 5 Feb 25 01:53 minfree > -rw------- 1 root wheel 61952000 Mar 30 16:19 vmcore.0 > -rw------- 1 root wheel 175443968 Mar 30 16:52 vmcore.1 > -rw------- 1 root wheel 168951808 Apr 24 21:59 vmcore.2 > -rw------- 1 root wheel 163037184 Apr 24 22:07 vmcore.3 > [root@freebsd7 /var/crash]# cat info.3 > Dump header from device /dev/ad4s4b > Architecture: i386 > Architecture Version: 2 > Dump Length: 163037184B (155 MB) > Blocksize: 512 > Dumptime: Thu Apr 24 22:04:54 2008 > Hostname: freebsd7.MSHOME.net > Magic: FreeBSD Kernel Dump > Version String: FreeBSD 7.0-RELEASE #1: Sun Mar 30 16:29:52 SGT 2008 > root@freebsd7.MSHOME.net:/usr/obj/usr/src/sys/custom > Panic String: page fault > Dump Parity: 2907024719 > Bounds: 3 > Dump Status: good > > All the 4 crashes are caused by this problem. > > It used to run fine with the 7.0-Beta1/2/3 kernel and the HPS stack. > http://mcuee.blogspot.com/2007/11/pk2cmd-ported-to-linux.html > > How should I attack this problem? > More information here (by following the steps of the following URL: http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug-gdb.html). freebsd7# kgdb kernel.debug /var/crash/vmcore.3 [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"] GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. 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: kernel trap 12 with interrupts disabled Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x18 fault code = supervisor read, page not present instruction pointer = 0x20:0xc077f155 stack pointer = 0x28:0xe6c19a48 frame pointer = 0x28:0xe6c19a64 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = resume, IOPL = 0 current process = 1140 (pk2) trap number = 12 panic: page fault cpuid = 0 Uptime: 7m27s Physical memory: 1011 MB Dumping 155 MB: 140 124 108 92 76 60 44 28 12 #0 doadump () at pcpu.h:195 195 __asm __volatile("movl %%fs:0,%0" : "=r" (td)); (kgdb) list *0xc077f155 0xc077f155 is in turnstile_broadcast (/usr/src/sys/kern/subr_turnstile.c:835). 830 831 /* 832 * Transfer the blocked list to the pending list. 833 */ 834 mtx_lock_spin(&td_contested_lock); 835 TAILQ_CONCAT(&ts->ts_pending, &ts->ts_blocked[queue], td_lockq); 836 mtx_unlock_spin(&td_contested_lock); 837 838 /* 839 * Give a turnstile to each thread. The last thread gets (kgdb) backtrace #0 doadump () at pcpu.h:195 #1 0xc074ddc7 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409 #2 0xc074e089 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:563 #3 0xc0a53c9c in trap_fatal (frame=0xe6c19a08, eva=24) at /usr/src/sys/i386/i386/trap.c:899 #4 0xc0a545ff in trap (frame=0xe6c19a08) at /usr/src/sys/i386/i386/trap.c:280 #5 0xc0a3b20b in calltrap () at /usr/src/sys/i386/i386/exception.s:139 #6 0xc077f155 in turnstile_broadcast (ts=0x0, queue=0) at /usr/src/sys/kern/subr_turnstile.c:835 #7 0xc0741712 in _mtx_unlock_sleep (m=0xc0bf3710, opts=0, file=0x0, line=0) at /usr/src/sys/kern/kern_mutex.c:605 #8 0xc098cb7f in usbd_do_request_flags (udev=0xc40bc800, mtx=0xc0bf3710, req=0xe6c19afc, data=0xe6c19b63, flags=0, actlen=0x0, timeout=5000) at /usr/src/sys/dev/usb/usb_transfer.c:3952 #9 0xc0981371 in usbreq_get_desc (udev=0xc40bc800, mtx=0xc0bf3710, desc=0xe6c19b63, min_len=9, max_len=9, id=0, type=2 '\002', index=0 '\0', retries=0 '\0') at /usr/src/sys/dev/usb/usb_requests.c:202 #10 0xc0981585 in usbreq_get_config_desc (udev=0xc40bc800, mtx=0xc0bf3710, d=0xe6c19b63, conf_index=Variable "conf_index" is not available. ) at /usr/src/sys/dev/usb/usb_requests.c:367 #11 0xc09849a4 in usbd_set_config_no (udev=0xc40bc800, no=2 '\002', msg=1 '\001') at /usr/src/sys/dev/usb/usb_subr.c:1028 #12 0xc06be879 in ugen_set_config (sc=0xc4272000, configno=Variable "configno" is not available. ) at /usr/src/sys/dev/usb/ugen.c:1519 ---Type to continue, or q to quit--- #13 0xc06bfc30 in ugenioctl (dev=0xc426ae00, cmd=2147767653, addr=0xc4265120 "\002", flag=Variable "flag" is not available. ) at /usr/src/sys/dev/usb/ugen.c:1724 #14 0xc06e52cb in devfs_ioctl_f (fp=0xc4b367e0, com=2147767653, data=0xc4265120, cred=0xc4d55500, td=0xc441ca50) at /usr/src/sys/fs/devfs/devfs_vnops.c:494 #15 0xc0780cb5 in kern_ioctl (td=0xc441ca50, fd=3, com=2147767653, data=0xc4265120 "\002") at file.h:266 #16 0xc0780e14 in ioctl (td=0xc441ca50, uap=0xe6c19cfc) at /usr/src/sys/kern/sys_generic.c:570 #17 0xc0a54255 in syscall (frame=0xe6c19d38) at /usr/src/sys/i386/i386/trap.c:1035 #18 0xc0a3b270 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:196 #19 0x00000033 in ?? () Previous frame inner to this frame (corrupt stack?) (kgdb) quit