Subject: kern/8240: page fault trap in usb driver by apm resume
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kawamoto@tenjin.org>
List: netbsd-bugs
Date: 08/19/1999 17:36:04
>Number: 8240
>Category: kern
>Synopsis: apm resume causes a page fault trap in usb driver
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 19 17:35:00 1999
>Last-Modified:
>Originator: Kawamoto Yosihisa
>Organization:
tenjin.org
>Release: <NetBSD-current 1999/08/18>
>Environment:
note pc (SONY VAIO 505RX)
System: NetBSD rerun.tenjin.org 1.4K NetBSD 1.4K (RERUN) #206: Thu Aug 19 19:29:09 JST 1999 kawamoto@rerun.tenjin.org:/usr/src/sys/arch/i386/compile/RERUN i386
>Description:
A resume from suspend causes a kernel page fault trap
in usb driver. The ddb backtrace is following:
bash$ zzz
Suspending system...
bash$ kernel: page fault trap, code=0
Stopped at tsleep+0x80: movl 0xb0(%ebx),%eax
db> trace
tsleep(f4b13c90,10,f02be41b,2,f4b13ca8) at tsleep+0x80
usb_delay_ms(f04dd000,1) at usb_delay_ms+0x53
uhci_run(f04dd000,1,f04d6f40,0,f04ea400) at uhci_run+0xcb
uhci_power(0,f04dd000) at uhci_power+0x158
dopowerhooks...
apm_resume...
(snip)
Mr. Enami points out that p = curproc in tsleep() is NULL
when a kernel resumes.
(gdb) set listsize 2
(gdb) l *(tsleep + 0x80)
0xf0128e74 is in tsleep (/a/cvs.netbsd.org/src/sys/kern/kern_synch.c:365).
364 #ifdef KTRACE
365 if (KTRPOINT(p, KTR_CSW))
(gdb) p &((struct proc *)0)->p_traceflag
$3 = (int *) 0xb0
(gdb)
>How-To-Repeat:
Enable KTRACE kernel option.
>Fix:
I have no idea.
>Audit-Trail:
>Unformatted: