7.1-STABLE crashing

After recent changes in DRI system is crashing on reboot/shutdown iniciated from X server or commad line when X server is running.

Code:
#0  0x285d2977 in kill () from /lib/libc.so.7
No symbol table info available.
#1  0x284f4147 in raise () from /lib/libthr.so.3
No symbol table info available.
#2  0x285d14ea in abort () from /lib/libc.so.7
No symbol table info available.
#3  0x080a128d in ddxGiveUp ()
No symbol table info available.
#4  0x0812bfad in AbortServer ()
No symbol table info available.
#5  0x0812c4f6 in FatalError ()
No symbol table info available.
#6  0x080b95c3 in xf86SigHandler ()
No symbol table info available.
#7  <signal handler called>
No symbol table info available.
#8  0x286639e6 in __glXDeassociateContext ()
   from /usr/local/lib/xorg/modules/extensions//libglx.so
No symbol table info available.
#9  0x2865f8d3 in __glXContextDestroy ()
   from /usr/local/lib/xorg/modules/extensions//libglx.so
No symbol table info available.
#10 0x28662c81 in __glXDRIcontextDestroy ()
---Type <return> to continue, or q <return> to quit---
   from /usr/local/lib/xorg/modules/extensions//libglx.so
No symbol table info available.
#11 0x28661dc4 in __glXFreeContext ()
   from /usr/local/lib/xorg/modules/extensions//libglx.so
No symbol table info available.
#12 0x28661e17 in ContextGone ()
   from /usr/local/lib/xorg/modules/extensions//libglx.so
No symbol table info available.
#13 0x0806e2c9 in FreeResourceByType ()
No symbol table info available.
#14 0x2865e4b7 in __glXDisp_DestroyContext ()
   from /usr/local/lib/xorg/modules/extensions//libglx.so
No symbol table info available.
#15 0x28662026 in __glXDispatch ()
   from /usr/local/lib/xorg/modules/extensions//libglx.so
No symbol table info available.
#16 0x080850d4 in Dispatch ()
No symbol table info available.
#17 0x0806bbda in main ()
No symbol table info available.

Any ideas?
 
What driver? Any chance you can compile xorg-server with WITH_DEBUG defined? (pkg_delete -f 'xorg-server-*' && make -C /usr/ports/x11-servers/xorg-server -DWITH_DEBUG install)
 
Nothing in the backtrace points to drm (not saying it can't be drm related, it just isn't in there). If you want to get to the bottom of this, there's 2 ways to go about it:
0) Create a reproducable scenario

1) Revert drm changes in 7-STABLE by selecting specific timestamps for sys/dev/drm OR:
2) Build xorg-server and graphics/libGL with debugging symbols and keep the build directory available when running gdb.

This should give some info about the problem.
 
I analyzed kernel dump, here is the result
Code:
Unread portion of the kernel message buffer:
<118>Mar 13 23:24:17 devil syslogd: exiting on signal 15
info: [drm] Num pipes: 1


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x10
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc4a39d69
stack pointer           = 0x28:0xc3ea1c3c
frame pointer           = 0x28:0xc3ea1c4c
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         = 12 (swi4: clock sio)
trap number             = 12
panic: page fault
cpuid = 0
Uptime: 7m0s
Physical memory: 1010 MB
Dumping 150 MB: 135 119 103 87 71 55 39 23 7

Reading symbols from /boot/kernel/acpi.ko...Reading symbols from /boot/kernel/acpi.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/acpi.ko
Reading symbols from /boot/kernel/linux.ko...Reading symbols from /boot/kernel/linux.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/linux.ko
Reading symbols from /usr/local/modules/rtc.ko...done.
Loaded symbols for /usr/local/modules/rtc.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 /boot/kernel/drm.ko...Reading symbols from /boot/kernel/drm.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/drm.ko
#0  doadump () at pcpu.h:196
196             __asm __volatile("movl %%fs:0,%0" : "=r" (td));
(kgdb) bt full
#0  doadump () at pcpu.h:196
No locals.
#1  0xc07d6706 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418
        _giantcnt = Variable "_giantcnt" is not available.
(kgdb) backtrace
#0  doadump () at pcpu.h:196
#1  0xc07d6706 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418
#2  0xc07d69ee in panic (fmt=Variable "fmt" is not available.
) at /usr/src/sys/kern/kern_shutdown.c:574
#3  0xc0a606ac in trap_fatal (frame=0xc3ea1bfc, eva=16)
    at /usr/src/sys/i386/i386/trap.c:939
#4  0xc0a6091b in trap_pfault (frame=0xc3ea1bfc, usermode=0, eva=16)
    at /usr/src/sys/i386/i386/trap.c:852
#5  0xc0a61312 in trap (frame=0xc3ea1bfc) at /usr/src/sys/i386/i386/trap.c:530
#6  0xc0a45deb in calltrap () at /usr/src/sys/i386/i386/exception.s:159
#7  0xc4a39d69 in radeon_get_vblank_counter (dev=0xc4354400, crtc=0)
    at /usr/src/sys/modules/drm/radeon/../../../dev/drm/radeon_irq.c:308
#8  0xc4a6114e in vblank_disable_fn (arg=0xc4354400)
    at /usr/src/sys/modules/drm/drm/../../../dev/drm/drm_irq.c:91
#9  0xc07e9576 in softclock (dummy=0x0) at /usr/src/sys/kern/kern_timeout.c:274
#10 0xc07b42cb in ithread_loop (arg=0xc408b280)
    at /usr/src/sys/kern/kern_intr.c:1088
#11 0xc07b0d74 in fork_exit (callout=0xc07b40f0 <ithread_loop>,
    arg=0xc408b280, frame=0xc3ea1d38) at /usr/src/sys/kern/kern_fork.c:810
#12 0xc0a45e60 in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:264

It looks like last vblank changes are the cause of crashing
 
My system

My testing configuration is IBM Lenovo Z60m with ATI X600 Mobility Radeon, kernel compiled with no additional extra CFLAGS/COPTFLAGS.
 
I would file a PR for this. This is a clear backtrace pointing to drm and the maintainer is quite active.
You may want to CC freebsd-stable in the PR.
 
Back
Top