drm causes kernel panic

Robert Noland rnoland at FreeBSD.org
Wed Sep 3 19:52:01 UTC 2008


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=260)
> > >     at /usr/src/sys/kern/kern_shutdown.c:418
> > > #2  0xffffffff802ee947 in panic (fmt=Variable "fmt" is not available.
> > > )
> > >     at /usr/src/sys/kern/kern_shutdown.c:572
> > > #3  0xffffffff803301ca in witness_unlock (lock=0xffffffff806f3d60, flags=8, 
> > >     file=0xffffffff8055dc88 "/usr/src/sys/dev/drm/drm_pci.c", line=77)
> > >     at /usr/src/sys/kern/subr_witness.c:1460
> > > #4  0xffffffff802e20c6 in _mtx_unlock_flags (m=0xffffff00017b41a8, opts=0, 
> > >     file=0xffffffff8055dc88 "/usr/src/sys/dev/drm/drm_pci.c", line=77)
> > >     at /usr/src/sys/kern/kern_mutex.c:199
> > > #5  0xffffffff8021a945 in drm_pci_alloc (dev=Variable "dev" is not available.
> > > )
> > >     at /usr/src/sys/dev/drm/drm_pci.c:77
> > > #6  0xffffffff80214654 in drm_addmap (dev=0xffffff00017b4000, offset=0, 
> > >     size=16384, type=_DRM_CONSISTENT, flags=Variable "flags" is not available.
> > > )
> > >     at /usr/src/sys/dev/drm/drm_bufs.c:247
> > > #7  0xffffffff80214b8b in drm_addmap_ioctl (dev=0xffffff00017b4000, 
> > >     data=0xffffff000576c480, file_priv=Variable "file_priv" is not available.
> > > )
> > >     at /usr/src/sys/dev/drm/drm_bufs.c:291
> > 
> > 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?
> > 
> 
> From dmesg:
> 
> vgapci0: <VGA-compatible display> port 0xb000-0xb0ff mem 0xfd000000-0xfdffffff,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
> 
> vgapci0 at pci0:3:6:0:     class=0x030000 card=0x80081002 chip=0x47521002 rev=0x27 hdr=0x00
>     vendor     = 'ATI Technologies Inc'
>     device     = 'Rage XL PCI'
>     class      = display
>     subclass   = VGA
> 
> IIRC, Motherboard is a Tyan Thunder K8SD Pro.
> 
> I was using startx to start Xorg with a .xinitrc of 
> 
> #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 black -bg BlanchedAlmond -cr red -ms red 
> 
> 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 
> message if you think it is required.
> 
> I suspect that I need to recompile the Xorg server port, but
> that isn't mentioned anywhere in src/UPDATING.
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20080903/fd587b28/attachment.pgp


More information about the freebsd-current mailing list