Bug 5784 - savage DRI: kernel oops when running glxgears in second X.org session
Summary: savage DRI: kernel oops when running glxgears in second X.org session
Status: RESOLVED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: i386 Linux
: P2 high
Assignee: drivers_video-dri
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-26 08:08 UTC by Alex Villacis Lasso
Modified: 2006-01-14 03:41 UTC (History)
0 users

See Also:
Kernel Version: 2.6.15-rc6
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Alex Villacis Lasso 2005-12-26 08:08:38 UTC
Distribution:
Fedora Core 4

Machine has a ProSavage chipset on-board. The output of the corresponding devices
by /sbin/lspci is:

00:01.0 PCI bridge: VIA Technologies, Inc. VT8633 [Apollo Pro266 AGP]
01:00.0 VGA compatible controller: S3 Inc. VT8375 [ProSavage8 KM266/KL266]

Test program is glxgears, built from patched X.org CVS with savage DRM support.
Execution of glxgears in first X session runs OK. If the first X session is 
terminated (for any reason), and a second one is started, execution of the same 
program, glxgears (or any OpenGL client) systematically crashes with a segmentation
fault. 

When output of dmesg is examined, the following shows up in the kernel log:

Unable to handle kernel paging request at virtual address 00010001
 printing eip:
deaaeadd
*pde = 00000000
Oops: 0002 [#1]
PREEMPT 
Modules linked in: savage drm ipv6 lp autofs4 af_packet p4_clockmod
speedstep_lib binfmt_misc nls_cp437 vfat fat thermal processor fan button
battery ac uhci_hcd ehci_hcd parport_pc parport via_agp agpgart i2c_viapro
snd_via82xx_modem snd_via82xx gameport snd_ac97_codec snd_ac97_bus snd_seq_dummy
snd_seq_oss snd_seq_midi_event snd_seq snd_pcm_oss snd_mixer_oss snd_pcm
snd_timer snd_page_alloc snd_mpu401_uart snd_rawmidi snd_seq_device snd
soundcore via_rhine mii floppy ide_cd cdrom usbcore ext3 jbd
CPU:    0
EIP:    0060:[<deaaeadd>]    Not tainted VLI
EFLAGS: 00210246   (2.6.15-rc6) 
EIP is at savage_dma_flush+0x13d/0x27b [savage]
eax: 00010001   ebx: 0000002e   ecx: dd709000   edx: 001fffff
esi: dc730400   edi: e0000080   ebp: 00000000   esp: d4317ecc
ds: 007b   es: 007b   ss: 0068
Process glxgears (pid: 2572, threadinfo=d4316000 task=d3c08030)
Stack: 082d7d00 00000000 00000000 00000000 00000002 08085460 dc730400 00000001 
       00000000 deab2132 da1fb800 00000000 08087590 082d7cf8 00000013 080853c8 
       00000013 00000000 00000000 08087590 00010000 00000000 082d7cf8 00000001 
Call Trace:
 [<deab2132>] savage_bci_cmdbuf+0x323/0x3a9 [savage]
 [<deab1e0f>] savage_bci_cmdbuf+0x0/0x3a9 [savage]
 [<deabb82a>] drm_ioctl+0x11a/0x15b [drm]
 [<c0158c13>] do_ioctl+0x47/0x5d
 [<c0158e7a>] vfs_ioctl+0x16c/0x17e
 [<c0158ed2>] sys_ioctl+0x46/0x60
 [<c0102b79>] syscall_call+0x7/0xb
Code: 89 f8 0b 46 3c 50 68 52 23 ab de 68 c0 28 ab de e8 fc 7f 66 e1 83 c4 10 ba
03 00 00 00 89 f0 ff 96 2c 01 00 00 8b 86 d0 00 00 00 <c7> 00 51 00 01 96 0b 7e
3c 89 78 04 d1 eb 8d 53 ff 81 ca 00 00 

Keywords: savage drm dri opengl kernel oops

Kernel version: Linux version 2.6.15-rc6 (alex@karlalex.palosanto.com) (gcc
versi
Comment 1 Joachim Frieben 2005-12-28 10:23:42 UTC
I had posted 2 corresponding bug reports 3 weeks ago at:

  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=174906
  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=174975

The bug might be furthermore related to:

  https://bugs.freedesktop.org/show_bug.cgi?id=3835

The good news is that by building "drm.ko" and "savage.ko"
kernel modules from current "savage-2005xxxx-linux.i386.tar.bz2
snapshots corresponding to "DRM" version 1.0.1 instead of
1.0.0 of the current Linux kernel, the issue is settled.
Comment 2 Alex Villacis Lasso 2005-12-29 08:54:51 UTC
Tried http://dri.freedesktop.org/snapshots/savage-20051220-linux.i386.tar.bz2
and the kernel oops went away. I am glad that this was solved, but also annoyed
that this drm version is not being pushed into the main kernel tree. Thanks
anyway for the links.
Comment 3 Dave Airlie 2005-12-30 02:19:03 UTC
It is going into the kernel.. I'm just not sure whats changed.. my git tree
might have it already in it... the savage driver hasn't moved in 4 months or so...
Comment 4 Joachim Frieben 2005-12-30 02:26:43 UTC
I have found out that not the very update to "DRM" version 1.0.1 keeps
"Mesa" from segfaulting. As a matter of fact, what made the difference
for me was loading the "savage.ko" module explicitly. Appending
"modprobe savage" to "rc.sysinit" makes it impossible for me to reproduce
the segmentation faults reported earlier. Before, I loaded the compiled
"savage.ko" built from current "DRI" snapshots and corresponding to
"DRM" version 1.0.1 via "insmod".
However, even loading the original kernel module delivered as part of
kernel 2.6.14-1.1653_FC4 and corresponding to "DRM" version 1.0.0 makes
the reported behaviour disappear.
When you tried out the new "DRM" version, did you load the module
"by hand" via "insmod" or did you copy it to
"/lib/modules/`uname -r`/kernel/drivers/char/drm"?
As pointed out above, even the current module works. At least when you
"modprobe" it in "rc.sysinit" as I did. Setting the status to "RESOLVED
PATCH_ALREADY_AVAILABLE" is hence a bit premature because after updating
the kernel "DRM", one might still encounter the reported problem.
Comment 5 Joachim Frieben 2005-12-30 04:14:54 UTC
Essentially the same problem occurs after bootig from a Ubuntu 6.04
alpha Live CD. The (modular) X server release is 7.0.0 RC4. The bug is
thus not Red Hat specific. I have been able to trigger one segmentation
fault aborting the X session. Most of the time however, the "glxgears"
window simply remains black. After a couple of seconds, "glxgears"
aborts. There is an error message in "dmesg":

  [4295522.874000] [drm:savage_bci_wait_event_shadow] *ERROR* failed!

which points a the origin of the trouble.
Comment 6 Joachim Frieben 2005-12-30 05:08:25 UTC
After rebuilding "drm.ko" and "savage.ko" from the current "DRI"
snapshot "savage-20051220-linux.i386.tar.bz2" and pushing the
kernel modules into /lib/modules/`uname -r`/kernel/drivers/char/drm,
I am not able to reproduce kernel oopses or segmentation faults
as before. This seems to indicate that a corresponding kernel tree
update might actually resolve the issue.
In contrast with previous cases, I have spotted an aditional entry
in "/var/log/dmesg" which reads:

  [drm] Used old pci detect: framebuffer loaded

Hopefully, integration of the "dri.freedesktop.org" branch into the
kernel tree and subsequent modifications won't alter the status quo.
Comment 7 Joachim Frieben 2006-01-14 03:41:13 UTC
Seems to have been fixed in kernel 2.6.15-git9 thanks to a "DRM" update
to version 1.0.1 by D. Airlie. Please check!

Note You need to log in before you can comment on or make changes to this bug.