Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 2008 23:12:38 +0800
From:      "Xiaofan Chen" <xiaofanc@gmail.com>
To:        "Hans Petter Selasky" <hselasky@c2i.net>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: PICkit 2 again with HPS stack
Message-ID:  <a276da400804240812o2f13fa83n49ae299435bd4738@mail.gmail.com>
In-Reply-To: <a276da400804240759s2e170cadn1dab42729a87369f@mail.gmail.com>
References:  <a276da400710120332h5f780ee8g9a12d5fb5548f8da@mail.gmail.com> <200710121912.03585.hselasky@c2i.net> <a276da400710130252k2d2d0db2n2ac1f40c20b64a1b@mail.gmail.com> <200710152303.29294.hselasky@c2i.net> <a276da400710160542q71bb4983jf27b59cb0e5ee104@mail.gmail.com> <a276da400804240759s2e170cadn1dab42729a87369f@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 24, 2008 at 10:59 PM, Xiaofan Chen <xiaofanc@gmail.com> 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 <return> to continue, or q <return> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a276da400804240812o2f13fa83n49ae299435bd4738>