Date: Wed, 03 Sep 2008 15:51:52 -0400 From: Robert Noland <rnoland@FreeBSD.org> To: Steve Kargl <sgk@troutmask.apl.washington.edu> Cc: freebsd-current@FreeBSD.org Subject: Re: drm causes kernel panic Message-ID: <1220471512.11763.9.camel@squirrel.corp.cox.com> In-Reply-To: <20080903051228.GA2475@troutmask.apl.washington.edu> References: <20080903011612.GA1242@troutmask.apl.washington.edu> <1220416793.1848.1.camel@wombat.2hip.net> <20080903051228.GA2475@troutmask.apl.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-hnEUpu1d9OLtU7kYgntx Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 2008-09-02 at 22:12 -0700, Steve Kargl wrote: > On Wed, Sep 03, 2008 at 12:39:53AM -0400, Robert Noland wrote: > > On Tue, 2008-09-02 at 18:16 -0700, Steve Kargl wrote: > > > #0 doadump () at pcpu.h:195 > > > #1 0xffffffff802ee4da in boot (howto=3D260) > > > at /usr/src/sys/kern/kern_shutdown.c:418 > > > #2 0xffffffff802ee947 in panic (fmt=3DVariable "fmt" is not availabl= e. > > > ) > > > at /usr/src/sys/kern/kern_shutdown.c:572 > > > #3 0xffffffff803301ca in witness_unlock (lock=3D0xffffffff806f3d60, = flags=3D8,=20 > > > file=3D0xffffffff8055dc88 "/usr/src/sys/dev/drm/drm_pci.c", line= =3D77) > > > at /usr/src/sys/kern/subr_witness.c:1460 > > > #4 0xffffffff802e20c6 in _mtx_unlock_flags (m=3D0xffffff00017b41a8, = opts=3D0,=20 > > > file=3D0xffffffff8055dc88 "/usr/src/sys/dev/drm/drm_pci.c", line= =3D77) > > > at /usr/src/sys/kern/kern_mutex.c:199 > > > #5 0xffffffff8021a945 in drm_pci_alloc (dev=3DVariable "dev" is not = available. > > > ) > > > at /usr/src/sys/dev/drm/drm_pci.c:77 > > > #6 0xffffffff80214654 in drm_addmap (dev=3D0xffffff00017b4000, offse= t=3D0,=20 > > > size=3D16384, type=3D_DRM_CONSISTENT, flags=3DVariable "flags" is= not available. > > > ) > > > at /usr/src/sys/dev/drm/drm_bufs.c:247 > > > #7 0xffffffff80214b8b in drm_addmap_ioctl (dev=3D0xffffff00017b4000,= =20 > > > data=3D0xffffff000576c480, file_priv=3DVariable "file_priv" is no= t available. > > > ) > > > at /usr/src/sys/dev/drm/drm_bufs.c:291 > >=20 > > I can't quite tell how we got here from this trace... What graphics > > hardware are you using and can you tell me what was going on when it > > paniced? > >=20 >=20 > From dmesg: >=20 > vgapci0: <VGA-compatible display> port 0xb000-0xb0ff mem 0xfd000000-0xfdf= fffff,0 > xfeaff000-0xfeafffff irq 18 at device 6.0 on pci3 > drm0: <Rage XL> on vgapci0 > info: [drm] Initialized mach64 2.0.0 20060718 Ok, I've found the problem... It is easy enough to fix your specific situation, but doing so will cause problems for other drivers... Which is the reason that I made that change to begin with. The big problem is that drm_pci_alloc gets called from a variety of places, some of which already hold locks while others don't. We aren't allowed to hold locks over some of the bus_dma functions, so I have to go through all of these paths and figure out if it is generally safe to always drop the locks, or if I need to restructure the code somehow... If you want a patch to just get you going temporarily, just let me know... robert. > From pciconf -vl >=20 > vgapci0@pci0:3:6:0: class=3D0x030000 card=3D0x80081002 chip=3D0x47521= 002 rev=3D0x27 hdr=3D0x00 > vendor =3D 'ATI Technologies Inc' > device =3D 'Rage XL PCI' > class =3D display > subclass =3D VGA >=20 > IIRC, Motherboard is a Tyan Thunder K8SD Pro. >=20 > I was using startx to start Xorg with a .xinitrc of=20 >=20 > #xsetroot -solid '#7332AE12B0A3' > xset s on > display -window root pics/freefield_1280x1024.jpg > fvwm2 & > xclock -geometry 85x85-5+3 -fg black -bg red & > xload -geometry 85x85-5+103 -fg blue -bg yellow & > xhost atlas troutmask hpc & > coolmail -geometry 85x85-5+203 -f /var/mail/kargl & > /usr/local/bin/ical -iconposition 1210,1000 & > xterm -fn '10x20' -geometry 80x24 -iconic -name login -sb -sl 512 -fg bla= ck -bg BlanchedAlmond -cr red -ms red=20 >=20 > The panic appears to have occurred during the xhost command, but > I believe it is related to loading Xorg's dri module. If I disable > dri in my xorg.conf file, the system does not panic. If Xorg tries > to load its dri module, I get an error message in Xorg's log file. > Unfortunately, I don't have a copy of the message laying around > here at home. I can panic the system tomorrow to get that=20 > message if you think it is required. >=20 > I suspect that I need to recompile the Xorg server port, but > that isn't mentioned anywhere in src/UPDATING. >=20 --=-hnEUpu1d9OLtU7kYgntx Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEABECAAYFAki+6tgACgkQM4TrQ4qfRONWmQCcDTKLGf5dV/8VpL+5Zh/OpJhj 4hEAoIYVkUR/HKqfkeEOXMduqSOyFH+D =b1Mg -----END PGP SIGNATURE----- --=-hnEUpu1d9OLtU7kYgntx--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1220471512.11763.9.camel>