kron
2013-Mar-05 18:01 UTC
reproducible "panic: page fault" with clang-compiled nvidia-driver
Hello, I have 100% reproducible "page fault" kernel panics on 9-STABLE (FreeBSD 9.1-STABLE #0 r247842M) It needs two conditions together: 1. nvidia-driver built by clang 2. nvidia_load="YES" in loader.conf On system startup I get (for example): #1 0xffffffff80473164 in kern_reboot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:448 #2 0xffffffff804735a4 in panic (fmt=<value optimized out>) at /usr/src/sys/kern/kern_shutdown.c:636 #3 0xffffffff806c1925 in trap_fatal (frame=<value optimized out>, eva=<value optimized out>) at /usr/src/sys/amd64/amd64/trap.c:878 #4 0xffffffff806c1cc3 in trap_pfault (frame=0x0, usermode=0) at /usr/src/sys/amd64/amd64/trap.c:735 #5 0xffffffff806c130e in trap (frame=0xffffff83e43e6710) at /usr/src/sys/amd64/amd64/trap.c:463 #6 0xffffffff806ab893 in calltrap () at exception.S:228 #7 0xffffffff804b5d05 in propagate_priority (td=<value optimized out>) at /usr/src/sys/kern/subr_turnstile.c:277 #8 0xffffffff804b6563 in turnstile_wait (ts=<value optimized out>, owner=<value optimized out>, queue=<value optimized out>) at /usr/src/sys/kern/subr_turnstile.c:743 #9 0xffffffff80461e08 in _mtx_lock_sleep (m=0xffffffff80abf800, tid=18446741874843076896, opts=<value optimized out>, file=0xfffffe000c830d80 "Hw\xa4\200\xff\xff\xff\xff", line=0) at /usr/src/sys/kern/kern_mutex.c:471 #10 0xffffffff8039132e in usbd_do_request_flags (udev=0xfffffe000c3a1000, mtx=0x0, req=0xffffff83e43e6990, data=<value optimized out>, flags=<value optimized out>, actlen=0x0, timeout=255) at /usr/src/sys/dev/usb/usb_request.c:705 #11 0xffffffff8039150f in usbd_req_reset_port (udev=0xfffffe000c3a1000, mtx=0x0, port=1 '\001') at /usr/src/sys/dev/usb/usb_request.c:1674 #12 0xffffffff8038def3 in uhub_explore (udev=0xfffffe000c3a1000) at /usr/src/sys/dev/usb/usb_hub.c:424 #13 0xffffffff8037647a in usb_bus_explore (pm=<value optimized out>) at /usr/src/sys/dev/usb/controller/usb_controller.c:359 #14 0xffffffff803903ff in usb_process (arg=0xffffff8000b15db0) at /usr/src/sys/dev/usb/usb_process.c:169 #15 0xffffffff80447645 in fork_exit ( callout=0xffffffff803902f0 <usb_process>, arg=0xffffff8000b15db0, frame=0xffffff83e43e6b00) at /usr/src/sys/kern/kern_fork.c:988 #16 0xffffffff806abdce in fork_trampoline () at exception.S:602 #17 0x0000000000000000 in ?? () The "caller" bellow _mtx_lock_sleep varies - I saw kern_intr.c, tty.c, and maybe others beside usb_process.c pasted above. If I build nvidia-driver by gcc or postpone nvidia loading to a later moment (f.ex. via rc.local) or both, the system boots OK. I've found a related thread (I think) in freebsd-current@: "sysctl -a causes kernel trap 12" [1]. Unfortunately, it ended without a clear conclusion. Is any developer interested in this? I can crash on demand :-) BR Oli [1] http://lists.freebsd.org/pipermail/freebsd-current/2013-January/038969.html
David Wolfskill
2013-Mar-05 18:29 UTC
reproducible "panic: page fault" with clang-compiled nvidia-driver
On Tue, Mar 05, 2013 at 07:01:39PM +0100, kron wrote:> Hello, > > I have 100% reproducible "page fault" kernel panics on 9-STABLE > (FreeBSD 9.1-STABLE #0 r247842M) > > It needs two conditions together: > 1. nvidia-driver built by clang > 2. nvidia_load="YES" in loader.confHmmm... I don't see a problem; I am running: FreeBSD g1-235.catwhisker.org 9.1-STABLE FreeBSD 9.1-STABLE #393 r247828M/247839: Tue Mar 5 05:11:27 PST 2013 root at g1-235.catwhisker.org:/usr/obj/usr/src/sys/CANARY i386 using nvidia-driver built by clang -- e..g: ... ===> Building for nvidia-driver-310.32 ===> src (all) @ -> /usr/src/sys machine -> /usr/src/sys/i386/include x86 -> /usr/src/sys/x86/include ... clang -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"310.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I. -I@ -I@/contrib/altq -fno-common -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -c nvidia_ctl.c clang -O2 -pipe -fno-strict-aliasing -DNV_VERSION_STRING=\"310.32\" -D__KERNEL__ -DNVRM -Wno-unused-function -Wuninitialized -O -UDEBUG -U_DEBUG -DNDEBUG -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I. -I@ -I@/contrib/altq -fno-common -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -c nvidia_dev.c .... Referring to <http://docs.freebsd.org/mail/current/svn-src-stable-9.html>, the most recent commits to stable/9 (in most-recent-first sequence) are: * r247850 - stable/9/sys/dev/mxge * r247846 - stable/9/libexec/rtld-elf * r247828 - in stable: 8/sys/dev/mfi 9/sys * r247827 - in stable: 8/share/man/man4 8/ * r247803 - stable/9/sbin/devd * r247802 - stable/9/sbin/devd so I believe that your sources @r247842M should be equivalent to mine @r247828M. (The cause for the "M" flag in my case is the change I made locally to src/sys/conf/newvers.sh to report the SVN revision a bit differently.) Note that I'm running i386; that may be a difference.> ...Peace, david -- David H. Wolfskill david at catwhisker.org Taliban: Evil men with guns afraid of truth from a 14-year old girl. See http://www.catwhisker.org/~david/publickey.gpg for my public key. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 196 bytes Desc: not available URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20130305/f52818e3/attachment.sig>