Kernel crashing
Moderators: hannu, dev, cesium
OK. If it's not VDEV_SUPPORT, than it's elsewhere... We can either go back in hg and see which revision is fine (Does r445 crash?), or try the debug symbols again.
I'm sorry, but the procedure to make debug versions is a bit more complicated than I though:
A. Use "CC=cc -g" configure
B. Edit Makefile.osscore and add "DEBUG_FLAGS=-g"
C. Edit Makefile.tmpl and add "DEBUG_FLAGS=-g"
D. Change install.sh to copy "*.ko*" instead of "*.ko", and make sure the previous .ko files don't exist/are erased (the suffix will be .ko.debug now).
E. Now kgdb should work (thotypous managed to do it this way).
I'm sorry, but the procedure to make debug versions is a bit more complicated than I though:
A. Use "CC=cc -g" configure
B. Edit Makefile.osscore and add "DEBUG_FLAGS=-g"
C. Edit Makefile.tmpl and add "DEBUG_FLAGS=-g"
D. Change install.sh to copy "*.ko*" instead of "*.ko", and make sure the previous .ko files don't exist/are erased (the suffix will be .ko.debug now).
E. Now kgdb should work (thotypous managed to do it this way).
I've retested r445 again, it doesn't crash.
Here is the trace of latest hg with debugging and with VDEV_SUPPORT:
Do you still need the trace without VDEV_SUPPORT?
Here is the trace of latest hg with debugging and with VDEV_SUPPORT:
Code: Select all
~# kgdb /boot/kernel/kernel /var/crash/vmcore.0
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 "amd64-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 = 0xfffffffef9f70000
fault code = supervisor write data, page not present
instruction pointer = 0x8:0xffffffff80c572b2
stack pointer = 0x10:0xfffffffef34cab00
frame pointer = 0x10:0xfffffffef34cab10
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = resume, IOPL = 0
current process = 31 (irq16: ohci0+)
trap number = 12
panic: page fault
cpuid = 0
Uptime: 53m50s
Physical memory: 4021 MB
Dumping 683 MB: 668 652 636 620 604 588 572 556 540 524 508 492 476 460 444 428 412 396 380 364 348 332 316 300 284 268 252 236 220 204 188 172 156 140 124 108 92 76 60 44 28 12
Reading symbols from /boot/kernel/usb.ko...Reading symbols from /boot/kernel/usb.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/usb.ko
Reading symbols from /boot/kernel/ukbd.ko...Reading symbols from /boot/kernel/ukbd.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/ukbd.ko
Reading symbols from /boot/kernel/ums.ko...Reading symbols from /boot/kernel/ums.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/ums.ko
Reading symbols from /boot/kernel/umass.ko...Reading symbols from /boot/kernel/umass.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/umass.ko
Reading symbols from /boot/kernel/radeon.ko...Reading symbols from /boot/kernel/radeon.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/radeon.ko
Reading symbols from /usr/local/modules/rtc.ko...done.
Loaded symbols for /usr/local/modules/rtc.ko
Reading symbols from /usr/lib/oss/modules/osscore.ko.debug...done.
Loaded symbols for /usr/lib/oss/modules/osscore.ko.debug
Reading symbols from /usr/lib/oss/modules/oss_hdaudio.ko.debug...done.
Loaded symbols for /usr/lib/oss/modules/oss_hdaudio.ko.debug
Reading symbols from /boot/kernel/ng_pppoe.ko...Reading symbols from /boot/kernel/ng_pppoe.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/ng_pppoe.ko
#0 doadump () at pcpu.h:195
195 pcpu.h: No such file or directory.
in pcpu.h
(kgdb) bt
#0 doadump () at pcpu.h:195
#1 0xffffffff803336ae in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418
#2 0xffffffff80333afc in panic (fmt=0xffffffff805f905a "%s") at /usr/src/sys/kern/kern_shutdown.c:574
#3 0xffffffff8058b81c in trap_fatal (frame=0xffffff000151e6e0, eva=Variable "eva" is not available.
) at /usr/src/sys/amd64/amd64/trap.c:764
#4 0xffffffff8058c520 in trap (frame=0xfffffffef34caa50) at /usr/src/sys/amd64/amd64/trap.c:290
#5 0xffffffff80570443 in calltrap () at /usr/src/sys/amd64/amd64/exception.S:209
#6 0xffffffff80c572b2 in oss_memset (t=0xfffffffef9f70000, val=0, l=4096) at osscore.c:49
#7 0xffffffff80c33520 in do_outputintr () from /usr/lib/oss/modules/osscore.ko.debug
#8 0xffffffff80801fc0 in tdg_maxid ()
#9 0x00000000808131a8 in ?? ()
#10 0xffffff0004ef1670 in ?? ()
#11 0xffffff0004d14c10 in ?? ()
#12 0x0000000000000000 in ?? ()
#13 0x0000000000000001 in ?? ()
#14 0x0000000000000004 in ?? ()
#15 0xffffffff80c336da in audio_outputintr () from /usr/lib/oss/modules/osscore.ko.debug
#16 0xffffff00311b6010 in ?? ()
#17 0x0000000000000000 in ?? ()
#18 0x0000000080000010 in ?? ()
#19 0xffffff0001577580 in ?? ()
#20 0xffffff0001572940 in ?? ()
#21 0xffffffff80cbdd35 in hdaintr () from /usr/lib/oss/modules/oss_hdaudio.ko.debug
#22 0xffffffff80ca55c0 in ?? ()
#23 0xfffffffef34cabc0 in ?? ()
#24 0x0000000000000000 in ?? ()
#25 0xffffffff80c57606 in ossintr (arg=Variable "arg" is not available.
) at osscore.c:117
Previous frame inner to this frame (corrupt stack?)
Do you still need the trace without VDEV_SUPPORT?
Re: Kernel crashing
>[...]but I wanted to let you know that the patch you gave me on Friday seems to be working great.
>I haven't had a single kernel panic or application lockup since I rebuilt OSS with the patch.
Very interesting! I had the same problem with FreeBSD 7.2...
Is this patch scheduled to be included into the mainline OSS?
>I haven't had a single kernel panic or application lockup since I rebuilt OSS with the patch.
Very interesting! I had the same problem with FreeBSD 7.2...
Is this patch scheduled to be included into the mainline OSS?
Re: Kernel crashing
It's already in mainline. Which version of OSS are you using?
If that didn't solve your problem, get the source (you can use the port for this), and uncomment USE_SX_LOCK in kernel/OS/FreeBSD/wrapper/bsddefs.h. Then build as usual.
If that didn't solve your problem, get the source (you can use the port for this), and uncomment USE_SX_LOCK in kernel/OS/FreeBSD/wrapper/bsddefs.h. Then build as usual.
Re: Kernel crashing
>It's already in mainline. Which version of OSS are you using?
At the moment i don't have any FreeBSD machine, i remember i had this problem some months ago with version 7.2...
Now i'm planning to switch back my laptop to FreeBSD when version 8.0 will be released and this bug was crucial for me.
FreeBSD ports systems now supports OSS build 2000 so this bug should be fixed. Thank you very much!
At the moment i don't have any FreeBSD machine, i remember i had this problem some months ago with version 7.2...
Now i'm planning to switch back my laptop to FreeBSD when version 8.0 will be released and this bug was crucial for me.
FreeBSD ports systems now supports OSS build 2000 so this bug should be fixed. Thank you very much!
Re: Kernel crashing
Hi,
yesterday i installed FreeBSD 8.0 RELEASE with OSS version 2002.
I tried to play a video with mplayer but after 2/3 hours a kernel panic occurred.
Now i will try to manually compile OSS with USE_SX_LOCK uncommented.
Regards,
Maurizio Lombardi
yesterday i installed FreeBSD 8.0 RELEASE with OSS version 2002.
I tried to play a video with mplayer but after 2/3 hours a kernel panic occurred.
Now i will try to manually compile OSS with USE_SX_LOCK uncommented.
Regards,
Maurizio Lombardi
Re: Kernel crashing
Hi,
I downloaded the OSS build 2002 source code from ftp.freebsd.org,
i modified bsddef.h in order to enable USE_SX_LOCK but now i have a little problem:
When i try to run the configure script i get this error:
bsd%./configure
Using the default script
srcdir=/usr/home/maurizio/oss-tmp/oss-v4.2-build2002-src-bsd
Error: Current directory must be empty
Someone can help me to understand what is wrong please?
Thanks.
Regards,
Maurizio Lombardi
I downloaded the OSS build 2002 source code from ftp.freebsd.org,
i modified bsddef.h in order to enable USE_SX_LOCK but now i have a little problem:
When i try to run the configure script i get this error:
bsd%./configure
Using the default script
srcdir=/usr/home/maurizio/oss-tmp/oss-v4.2-build2002-src-bsd
Error: Current directory must be empty
Someone can help me to understand what is wrong please?
Thanks.
Regards,
Maurizio Lombardi
Re: Kernel crashing
Oh, you're building this manually... See this page for how to build OSS. The build system uses a separate build directory (the build directory will be the directory configure is run from). So do something like "mkdir build", "cd build", "../configure", etc.
Re: Kernel crashing
Hi,
finally i installed the modified oss b2002 (with USE_SX_LOCK enabled) on my FreeBSD 8.0 laptop.
I tried to play a video with mplayer but unfortunately it freezes after some minutes... according to top it is blocked with "STATE=oss".
It is a very annoying problem...
Best regards,
Maurizio Lombardi
finally i installed the modified oss b2002 (with USE_SX_LOCK enabled) on my FreeBSD 8.0 laptop.
I tried to play a video with mplayer but unfortunately it freezes after some minutes... according to top it is blocked with "STATE=oss".
It is a very annoying problem...
Best regards,
Maurizio Lombardi
Re: Kernel crashing
Hi,
I did some experiments today and i found that sometimes mplayer freeze when oss enters in MUTEX_INIT() and sx_init is called (os_freebsd.h):
#define MUTEX_INIT(osdev, mutex, hier) \
do { \
mutex = malloc(sizeof(*mutex), M_DEVBUF, M_WAITOK | M_ZERO); \
sx_init(mutex, "oss"); \
} while (0)
However i don't have any more kernel panics now, only software freeze....
Best regards,
Maurizio Lombardi
I did some experiments today and i found that sometimes mplayer freeze when oss enters in MUTEX_INIT() and sx_init is called (os_freebsd.h):
#define MUTEX_INIT(osdev, mutex, hier) \
do { \
mutex = malloc(sizeof(*mutex), M_DEVBUF, M_WAITOK | M_ZERO); \
sx_init(mutex, "oss"); \
} while (0)
However i don't have any more kernel panics now, only software freeze....
Best regards,
Maurizio Lombardi
Who is online
Users browsing this forum: No registered users and 2 guests