Re: diagnosing freezes (DRI?)

From: Robert Noland <rnoland_at_FreeBSD.org>
Date: Fri, 20 Nov 2009 17:28:39 -0600
On Fri, 2009-11-20 at 20:56 +0000, deeptech71_at_gmail.com wrote:
> Robert Noland wrote:
> > Ok, try this one... It should address all of the copyin/copyout paths in
> > radeon.  the r300_cmdbuf.c bits worry me a little, but I'm running this
> > way now....
> >
> > http://people.freebsd.org/~rnoland/drm_radeon-copyin-fix-try2.patch
> 
> Well, patched worked well, my system was stable

I"m not sure that I even have that patch in my repo now... I need to
re-examine all of the copyin/copyout stuff for a more correct fix.  Just
dropping the lock isn't always appropriate.

robert.

> ...until this day. I ran startx, which loaded up Enlightenment. Ran a
> 3D application (Tremulous) (2 of them actually). Then, I opened up so
> much xterm windows that Enlightenment didn't respond. I switched to
> the virtual terminals and CTRL+C'd the startx script/whatever. I ran
> startx again (Enlightenment, ...). But I noticed that Tremulous was
> not shut down (with the CTRL+C) and was still running in the
> background (somehow without a window), eating CPU. I ran "killall
> tremulous.x86". Panic!
> 
> #kgdb kernel.debug /var/crash/vmcore.5
> 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:
> Kernel page fault with the following non-sleepable locks held:
> exclusive sleep mutex drmdev (drmdev) r = 0 (0xc369b860) locked _at_
> /usr/src/sys/modules/drm/drm/../../../dev/drm/drm_drv.c:791
> KDB: stack backtrace:
> db_trace_self_wrapper(c0c72e66,d679aa1c,c08c0d35,c3f19970,317,...) at
> db_trace_self_wrapper+0x26
> kdb_backtrace(c3f19970,317,ffffffff,c0f02dc4,d679aa54,...) at kdb_backtrace+0x29
> _witness_debugger(c0c752de,d679aa68,4,1,0,...) at _witness_debugger+0x25
> witness_warn(5,0,c0ca9363,c0c68062,c41ead48,...) at witness_warn+0x1fd
> trap(d679aaf4) at trap+0x173
> calltrap() at calltrap+0x6
> --- trap 0xc, eip = 0xc3eb693b, esp = 0xd679ab34, ebp = 0xd679ab90 ---
> radeon_cp_cmdbuf(c369b800,c38f33b0,c38c9940,317,c0c69ae0,...) at
> radeon_cp_cmdbuf+0xcb
> drm_ioctl(c38ccb00,80106450,c38f33b0,3,c396a900,...) at drm_ioctl+0x356
> devfs_ioctl_f(c44ba508,80106450,c38f33b0,c419cb00,c396a900,...) at
> devfs_ioctl_f+0xf8
> kern_ioctl(c396a900,5e,80106450,c38f33b0,8ba670,...) at kern_ioctl+0x1fd
> ioctl(c396a900,d679acf8,c,c0c76875,c0d55288,...) at ioctl+0x134
> syscall(d679ad38) at syscall+0x2a3
> Xint0x80_syscall() at Xint0x80_syscall+0x20
> --- syscall (54, FreeBSD ELF32, ioctl), eip = 0x283d755f, esp =
> 0xbfbfd6ec, ebp = 0xbfbfd708 ---
> 
> 
> Fatal trap 12: page fault while in kernel mode
> cpuid = 1; apic id = 01
> fault virtual address   = 0x148
> fault code              = supervisor read, page not present
> instruction pointer     = 0x20:0xc3eb693b
> stack pointer           = 0x28:0xd679ab34
> frame pointer           = 0x28:0xd679ab90
> 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         = 1075 (initial thread)
> trap number             = 12
> panic: page fault
> cpuid = 1
> Uptime: 3m1s
> Physical memory: 494 MB
> Dumping 102 MB: 87 71 55 39 23 7
> 
> Reading symbols from
> /boot/kernel.GENERIC.r196193.copyin2.debug/snd_es137x.ko...Reading
> symbols from /boot/kernel.GENERIC.r196193.copyin2.debug/snd_es137x.ko.symbols...done.
> done.
> Loaded symbols for /boot/kernel.GENERIC.r196193.copyin2.debug/snd_es137x.ko
> Reading symbols from
> /boot/kernel.GENERIC.r196193.copyin2.debug/sound.ko...Reading symbols
> from /boot/kernel.GENERIC.r196193.copyin2.debug/sound.ko.symbols...done.
> done.
> Loaded symbols for /boot/kernel.GENERIC.r196193.copyin2.debug/sound.ko
> Reading symbols from
> /boot/kernel.GENERIC.r196193.copyin2.debug/ntfs.ko...Reading symbols
> from /boot/kernel.GENERIC.r196193.copyin2.debug/ntfs.ko.symbols...done.
> done.
> Loaded symbols for /boot/kernel.GENERIC.r196193.copyin2.debug/ntfs.ko
> Reading symbols from
> /boot/kernel.GENERIC.r196193.copyin2.debug/linprocfs.ko...Reading
> symbols from /boot/kernel.GENERIC.r196193.copyin2.debug/linprocfs.ko.symbols...done.
> done.
> Loaded symbols for /boot/kernel.GENERIC.r196193.copyin2.debug/linprocfs.ko
> Reading symbols from
> /boot/kernel.GENERIC.r196193.copyin2.debug/linux.ko...Reading symbols
> from /boot/kernel.GENERIC.r196193.copyin2.debug/linux.ko.symbols...done.
> done.
> Loaded symbols for /boot/kernel.GENERIC.r196193.copyin2.debug/linux.ko
> Reading symbols from /usr/local/modules/rtc.ko...done.
> Loaded symbols for /usr/local/modules/rtc.ko
> Reading symbols from
> /boot/kernel.GENERIC.r196193.copyin2.debug/radeon.ko...Reading symbols
> from /boot/kernel.GENERIC.r196193.copyin2.debug/radeon.ko.symbols...done.
> done.
> Loaded symbols for /boot/kernel.GENERIC.r196193.copyin2.debug/radeon.ko
> Reading symbols from
> /boot/kernel.GENERIC.r196193.copyin2.debug/drm.ko...Reading symbols
> from /boot/kernel.GENERIC.r196193.copyin2.debug/drm.ko.symbols...done.
> done.
> Loaded symbols for /boot/kernel.GENERIC.r196193.copyin2.debug/drm.ko
> #0  doadump () at pcpu.h:246
> 246             __asm __volatile("movl %%fs:0,%0" : "=r" (td));
> (kgdb) up
> #1  0xc087fa1e in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:419
> 419                     doadump();
> (kgdb)
> #2  0xc087fcf2 in panic (fmt=Variable "fmt" is not available.
> ) at /usr/src/sys/kern/kern_shutdown.c:575
> 575             boot(bootopt);
> (kgdb)
> #3  0xc0baeac3 in trap_fatal (frame=0xd679aaf4, eva=328)
>     at /usr/src/sys/i386/i386/trap.c:933
> 933                     panic("%s", trap_msg[type]);
> (kgdb)
> #4  0xc0baf3e1 in trap (frame=0xd679aaf4) at /usr/src/sys/i386/i386/trap.c:325
> 325                             trap_fatal(frame, eva);
> (kgdb)
> #5  0xc0b918ab in calltrap () at /usr/src/sys/i386/i386/exception.s:165
> 165             call    trap
> Current language:  auto; currently asm
> (kgdb)
> #6  0xc3eb693b in radeon_cp_cmdbuf (dev=0xc369b800, data=0xc38f33b0,
>     file_priv=0xc38c9940)
>     at /usr/src/sys/modules/drm/radeon/../../../dev/drm/radeon_state.c:2879
> 2879            VB_AGE_TEST_WITH_RETURN(dev_priv);
> Current language:  auto; currently c
> (kgdb)
> #7  0xc3f13ad6 in drm_ioctl (kdev=0xc38ccb00, cmd=2148557904,
>     data=0xc38f33b0 "\200\002", flags=3, p=0xc396a900)
>     at /usr/src/sys/modules/drm/drm/../../../dev/drm/drm_drv.c:793
> 793                     retcode = -func(dev, data, file_priv);
> (kgdb)
> #8  0xc08034a8 in devfs_ioctl_f (fp=0xc44ba508, com=2148557904,
>     data=0xc38f33b0, cred=0xc419cb00, td=0xc396a900)
>     at /usr/src/sys/fs/devfs/devfs_vnops.c:659
> 659             error = dsw->d_ioctl(dev, com, data, fp->f_flag, td);
> (kgdb)
> #9  0xc08c43ad in kern_ioctl (td=0xc396a900, fd=94, com=2148557904,
>     data=0xc38f33b0 "\200\002") at file.h:262
> 262             return ((*fp->f_ops->fo_ioctl)(fp, com, data, active_cred, td));
> (kgdb)
> #10 0xc08c4534 in ioctl (td=0xc396a900, uap=0xd679acf8)
>     at /usr/src/sys/kern/sys_generic.c:678
> 678             error = kern_ioctl(td, uap->fd, com, data);
> (kgdb)
> #11 0xc0baef83 in syscall (frame=0xd679ad38)
>     at /usr/src/sys/i386/i386/trap.c:1073
> 1073                    error = (*callp->sy_call)(td, args);
> (kgdb)
> #12 0xc0b91910 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:261
> 261             call    syscall
> Current language:  auto; currently asm
> (kgdb)
> #13 0x00000033 in ?? ()
> (kgdb)
> Previous frame inner to this frame (corrupt stack?)
> (kgdb)
> Initial frame selected; you cannot go up.
> (kgdb) quit
> 
> #uname -a
> FreeBSD  8.0-BETA2 FreeBSD 8.0-BETA2 #0 r196195M: Fri Nov 20 17:17:00
> UTC 2009     devhc_at_:/usr/obj/usr/src/sys/GENERIC  i386
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
-- 
Robert Noland <rnoland_at_FreeBSD.org>
FreeBSD
Received on Fri Nov 20 2009 - 22:28:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:58 UTC