Go Back   nV News Forums > Linux Support Forums > NVIDIA FreeBSD

Newegg Daily Deals

Reply
 
Thread Tools
Old 07-03-06, 11:46 PM   #1
Chromoskope
Registered User
 
Join Date: Jul 2006
Posts: 6
Default Fatal trap 12 while exiting any OpenGL app (1.0.8762)

Hello!

I use this graphic adapter
nvidia0: <GeForce4 MX 440 with AGP8X> mem 0xe0000000-0xe0ffffff,0xd8000000-0xdfffffff irq 19 at device 0.0 on pci2

Arch - i386, AthlonXP/256MB RAM

Drivers v. 1.0.8762 installed from ports.
FreeBSD 6.1-RELEASE

X.org (6.9.0 compiled from ports) starts normally, I can start OpenGL applications (e.g. glxgears), but when I finish the application the system crashes with Fatal trap 12.
This appears every time. With drivers v. 1.0-8178 this did not appear.

I've got the dump after crash here is the information from it:
Quote:
root@home# kgdb kernel.debug /usr/crash/vmcore.0
[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:


Fatal trap 12: page fault while in kernel mode
fault virtual address = 0x7
fault code = supervisor read, page not present
instruction pointer = 0x20:0xc0b4993a
stack pointer = 0x28:0xd67e0740
frame pointer = 0x28:0xd67e0740
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 686 (glxgears)
trap number = 12
panic: page fault
Uptime: 2m17s
Dumping 255 MB (2 chunks)
chunk 0: 1MB (159 pages) ... ok
chunk 1: 255MB (65264 pages) 239 223 207 191 175 159 143 127 111 95 79 63 47 31 15

#0 doadump () at pcpu.h:165
165 __asm __volatile("movl %%fs:0,%0" : "=r" (td));
(kgdb) list *0xc0b4993a
No source file for address 0xc0b4993a.
kldstat says

Quote:
Id Refs Address Size Name
1 15 0xc0400000 670ff8 kernel
2 2 0xc0a71000 1aff0 linux.ko
3 1 0xc0a8c000 5f60 snd_ich.ko
4 2 0xc0a92000 22b88 sound.ko
5 1 0xc0ab5000 4a4d28 nvidia.ko
6 1 0xc0f5a000 58554 acpi.ko
7 1 0xc2931000 2000 green_saver.ko
Can anybody help me?
I can give any other debug information if anybody need it.
Chromoskope is offline   Reply With Quote
Old 07-04-06, 07:39 AM   #2
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default Re: Fatal trap 12 while exiting any OpenGL app (1.0.8762)

Does the dump include enough information for a backtrace (i.e. does bt provide useful information)?
zander is offline   Reply With Quote
Old 07-04-06, 09:40 AM   #3
Chromoskope
Registered User
 
Join Date: Jul 2006
Posts: 6
Default Re: Fatal trap 12 while exiting any OpenGL app (1.0.8762)

Quote:
Originally Posted by zander
Does the dump include enough information for a backtrace (i.e. does bt provide useful information)?
Here is the information provided by bt

Quote:
#0 doadump () at pcpu.h:165
#1 0xc064e299 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:402
#2 0xc064e530 in panic (fmt=0xc086e7c3 "%s")
at /usr/src/sys/kern/kern_shutdown.c:558
#3 0xc08239f4 in trap_fatal (frame=0xd67e0700, eva=7)
at /usr/src/sys/i386/i386/trap.c:836
#4 0xc082375b in trap_pfault (frame=0xd67e0700, usermode=0, eva=7)
at /usr/src/sys/i386/i386/trap.c:744
#5 0xc0823399 in trap (frame=
{tf_fs = 8, tf_es = 40, tf_ds = 40, tf_edi = -1, tf_esi = 0, tf_ebp = -696383680, tf_isp = -696383700, tf_ebx = 7, tf_edx = 0, tf_ecx = 1, tf_eax = 7, tf_trapno = 12, tf_err = 0, tf_eip = -1061906118, tf_cs = 32, tf_eflags = 66194, tf_esp = -696383632, tf_ss = -1061906682}) at /usr/src/sys/i386/i386/trap.c:434
#6 0xc08128fa in calltrap () at /usr/src/sys/i386/i386/exception.s:139
#7 0xc0b4993a in ?? ()
#8 0xd67e07a0 in ?? ()
#9 0xc0b49747 in ?? ()
#10 0xffffffff in ?? ()
#11 0x0000000b in ?? ()
#12 0x00000000 in ?? ()
#13 0xc267ba80 in ?? ()
#14 0xd67e07ac in ?? ()
#15 0xc0d987d4 in ?? ()
#16 0xc267ba80 in ?? ()
#17 0xc2bca200 in ?? ()
#18 0x00000000 in ?? ()
#19 0xc2b6b000 in ?? ()
#20 0xd67e07d0 in ?? ()
#21 0xc0b49747 in ?? ()
#22 0xc2bca200 in ?? ()
#23 0x0000000b in ?? ()
#24 0x00000000 in ?? ()
#25 0xc267ba00 in ?? ()
#26 0x00000014 in ?? ()
#27 0xc2689700 in ?? ()
#28 0xd67e07e0 in ?? ()
#29 0xc2b6b000 in ?? ()
#30 0x00000000 in ?? ()
#31 0xc2b6b800 in ?? ()
#32 0xd67e0800 in ?? ()
#33 0xc0b49747 in ?? ()
#34 0xc2b6b000 in ?? ()
#35 0x0000000b in ?? ()
#36 0x00000000 in ?? ()
#37 0xc0cb34c8 in ?? ()
#38 0xc2b6b800 in ?? ()
#39 0x00000000 in ?? ()
#40 0x00000000 in ?? ()
#41 0xc2b6b800 in ?? ()
#42 0x0000000b in ?? ()
#43 0xc2b6b800 in ?? ()
#44 0xd67e0830 in ?? ()
#45 0xc0cb278e in ?? ()
#46 0xc2b6b800 in ?? ()
#47 0x0000000b in ?? ()
#48 0x00000000 in ?? ()
#49 0xc1d00051 in ?? ()
#50 0xbeef0003 in ?? ()
#51 0x00000000 in ?? ()
#52 0xc2ccb000 in ?? ()
#53 0xc1d00051 in ?? ()
#54 0x00000000 in ?? ()
#55 0x00000000 in ?? ()
#56 0xd67e0890 in ?? ()
#57 0xc0b3ad40 in ?? ()
#58 0xc2b6b800 in ?? ()
#59 0x0000000b in ?? ()
#60 0x00000000 in ?? ()
#61 0xc1d00051 in ?? ()
#62 0xbeef0003 in ?? ()
#63 0xd67e0860 in ?? ()
#64 0xc0b3115e in ?? ()
#65 0xc1d00051 in ?? ()
#66 0xc274bc00 in ?? ()
#67 0xc25d9400 in ?? ()
#68 0xd67e0880 in ?? ()
#69 0x00000000 in ?? ()
#70 0xc1d00051 in ?? ()
#71 0xd67e0880 in ?? ()
#72 0xc0b3115e in ?? ()
#73 0xc1d00051 in ?? ()
#74 0x00000000 in ?? ()
#75 0xc2b6b800 in ?? ()
#76 0x00000041 in ?? ()
#77 0xc2761b80 in ?? ()
#78 0xbeef0003 in ?? ()
#79 0xc1d00051 in ?? ()
#80 0xd67e08d0 in ?? ()
#81 0xc0b32752 in ?? ()
#82 0xc1d00051 in ?? ()
#83 0xbeef0003 in ?? ()
#84 0xbeef0013 in ?? ()
#85 0xdbf18000 in ?? ()
#86 0x00000000 in ?? ()
#87 0x00000001 in ?? ()
#88 0x000002ae in ?? ()
#89 0xd67e08bc in ?? ()
#90 0xc3109800 in ?? ()
#91 0xc28aa680 in ?? ()
#92 0xc2ccb000 in ?? ()
#93 0x00000040 in ?? ()
#94 0xc1d00051 in ?? ()
#95 0xbeef0003 in ?? ()
#96 0xd67e0910 in ?? ()
#97 0xc0b3fee9 in ?? ()
#98 0xc1d00051 in ?? ()
#99 0xbeef0003 in ?? ()
#100 0xbeef0013 in ?? ()
#101 0xbeef0013 in ?? ()
#102 0x00000000 in ?? ()
#103 0xd67e0904 in ?? ()
#104 0xc31092b0 in ?? ()
#105 0x00000020 in ?? ()
#106 0xc1d00051 in ?? ()
#107 0xc2b6b800 in ?? ()
#108 0x00000041 in ?? ()
#109 0x00000020 in ?? ()
#110 0xc1d00051 in ?? ()
#111 0xbeef0003 in ?? ()
#112 0xd67e0950 in ?? ()
#113 0xc0b3f619 in ?? ()
#114 0xc1d00051 in ?? ()
#115 0xbeef0003 in ?? ()
#116 0x00000040 in ?? ()
#117 0xbeef0013 in ?? ()
#118 0xc2b5b800 in ?? ()
#119 0xc2b5c200 in ?? ()
#120 0x00000000 in ?? ()
#121 0xc2ccb000 in ?? ()
#122 0xc2fb8000 in ?? ()
#123 0x00000020 in ?? ()
#124 0xc2b6b800 in ?? ()
#125 0x00000000 in ?? ()
#126 0xc2ccb000 in ?? ()
#127 0x00000000 in ?? ()
#128 0xd67e0980 in ?? ()
#129 0xc0b3f402 in ?? ()
#130 0xc1d00051 in ?? ()
#131 0xbeef0003 in ?? ()
#132 0xd67e0990 in ?? ()
#133 0xc0cb2cdc in ?? ()
#134 0xc1d00051 in ?? ()
#135 0xc1d00051 in ?? ()
#136 0xd67e0980 in ?? ()
#137 0xc1d00051 in ?? ()
#138 0xc1d00051 in ?? ()
#139 0x00000000 in ?? ()
#140 0xd67e09d0 in ?? ()
#141 0xc0b3f209 in ?? ()
#142 0xc1d00051 in ?? ()
#143 0xd67e09c0 in ?? ()
#144 0xd67e09c0 in ?? ()
#145 0xc0b60416 in ?? ()
#146 0xc2d27300 in ?? ()
#147 0xc25d9400 in ?? ()
#148 0xd67e09ac in ?? ()
#149 0x00000246 in ?? ()
#150 0xc2602b80 in ?? ()
#151 0xd67e09b4 in ?? ()
#152 0xc064597c in _mtx_unlock_spin_flags (m=0x0, opts=20,
file=0xd67e0788 "╛\a~жт\207ыю\200╨gб", line=-1067890666)
at /usr/src/sys/kern/kern_mutex.c:408
Previous frame inner to this frame (corrupt stack?)
Chromoskope is offline   Reply With Quote
Old 07-04-06, 09:57 AM   #4
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default Re: Fatal trap 12 while exiting any OpenGL app (1.0.8762)

I'm not sure how useful this will be, but could you post the output of `objdump -x /path/to/nvidia.ko`?
zander is offline   Reply With Quote
Old 07-04-06, 11:49 AM   #5
Chromoskope
Registered User
 
Join Date: Jul 2006
Posts: 6
Default Re: Fatal trap 12 while exiting any OpenGL app (1.0.8762)

I've attached zipped output of objdump -x /boot/modules/nvidia.ko
Attached Files
File Type: zip objdump.zip (94.7 KB, 230 views)
Chromoskope is offline   Reply With Quote
Old 07-05-06, 09:05 AM   #6
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default Re: Fatal trap 12 while exiting any OpenGL app (1.0.8762)

Do you have the means to setup a serial console and obtain a backtrace via the DDB kernel debugger?
zander is offline   Reply With Quote
Old 07-10-06, 11:54 AM   #7
FabioLG
Registered User
 
Join Date: Jul 2006
Posts: 2
Default Re: Fatal trap 12 while exiting any OpenGL app (1.0.8762)

I have the same problem... OpenGL starts, works fine, but when exit system freezes and reboot...

My system is:

AMD Athlon64 3200+
ASUS A8V-Deluxe (VIA K8T800Pro chipset)
512MB ram DDR
GeForce FX 6600
FreeBSD 6.1 i386
Xorg 6.9.0

compat5x is enabled. In nvidia-settings nv driver is running in AGP 8X mode (FreeBSD AGP)...
FabioLG is offline   Reply With Quote
Old 07-11-06, 08:06 AM   #8
FabioLG
Registered User
 
Join Date: Jul 2006
Posts: 2
Default Re: Fatal trap 12 while exiting any OpenGL app (1.0.8762)

Running without FreeBSD AGP my system works fine but nv driver is running over PCI bus not AGP 8x. FreeBSD 5.5 have the same problem...
FabioLG is offline   Reply With Quote

Old 07-12-06, 11:58 PM   #9
Chromoskope
Registered User
 
Join Date: Jul 2006
Posts: 6
Default Re: Fatal trap 12 while exiting any OpenGL app (1.0.8762)

Sorry for long delay
Zander can you instruct me how to obtain backtrace via serial line?
I've read docs: http://www.freebsd.org/doc/en/books/...nline-ddb.html
http://www.freebsd.org/doc/en/books/...nline-gdb.html
but it seems to be slightly obsolete.
I complied kernel with options KDB,DDB,GDB but I can not obtain trace. Serial port flags are set to 0x80. But remote GDB does not work :-(
Thanks for answer!
Chromoskope is offline   Reply With Quote
Old 07-13-06, 12:03 AM   #10
Chromoskope
Registered User
 
Join Date: Jul 2006
Posts: 6
Default Re: Fatal trap 12 while exiting any OpenGL app (1.0.8762)

BTW, I've found than Fatal trap 12 appears only if Drivers are compiled with FreeBSD AGP support i.e. if NV_SUPPORT_OS_AGP is not undef in nv-freebsd.h
Chromoskope is offline   Reply With Quote
Old 07-13-06, 07:40 AM   #11
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default Re: Fatal trap 12 while exiting any OpenGL app (1.0.8762)

If I recall correctly off-hand, you need to build the kernel with the KDB/DDB options and then follow the other steps below; I usually build with:
options KDB # Enable kernel debugger support.
options DDB # Support DDB.
options BREAK_TO_DEBUGGER # Remote break to kdb> console
options ALT_BREAK_TO_DEBUGGER # Remote break to kdb> console
options CONSPEED=115200 # Serial console speed
There's no need to build the kernel with DEBUG information or with KGDB support. You can redirect the console to the serial line via the device.hints, with the following entry (for the first serial port):
hint.sio.0.flags="0x30"
At the time of the crash, the kernel debugger should present you with a prompt; please run the `trace` and `show reg` commands and post the output.

It's interesting that you only see the problem when enabling support for the FreeBSD AGP driver; this path isn't well excercised due to a variety of compatibility and stability problems and limited chipset support. I'll see if I can reproduce the problem locally.
zander is offline   Reply With Quote
Old 07-13-06, 01:07 PM   #12
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default Re: Fatal trap 12 while exiting any OpenGL app (1.0.8762)

I was able to reproduce the problem with the FreeBSD AGP GART driver, it should be resolved in future NVIDIA FreeBSD graphics driver releases. The attached patch should fix the problem in 1.0-8762; in order to apply the patch and build/install the updated driver, please follow the steps below:
# tar zxf /path/to/NVIDIA-FreeBSD-x86-1.0-8762.tar.gz
# cd NVIDIA-FreeBSD-x86-1.0-8762/
# patch -p0 < /path/to/NVIDIA-FreeBSD_kernel-1.0-8762-1586939.diff.txt
(edit src/nv-freebsd.h to enable AGPGART support)
# make clean install
I recommend using the AGP GART driver built into the NVIDIA kernel module (NvAGP), however.
Attached Files
File Type: txt NVIDIA-FreeBSD_kernel-1.0-8762-1586939.diff.txt (1.5 KB, 298 views)
zander is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:59 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.