Bug 6365 - i810 driver segfault in I830DRIDoMappings()
Summary: i810 driver segfault in I830DRIDoMappings()
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Alan Hourihane
QA Contact:
URL:
Whiteboard:
Keywords: have-backtrace
Depends on:
Blocks:
 
Reported: 2006-03-24 04:42 UTC by Konstantin A. Lepikhov
Modified: 2006-04-20 02:49 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.crash.i810.1.5.2.log.gz (8.03 KB, application/octet-stream)
2006-03-24 04:43 UTC, Konstantin A. Lepikhov
no flags Details
dmesg.gz (5.96 KB, application/octet-stream)
2006-03-24 04:43 UTC, Konstantin A. Lepikhov
no flags Details
xorg.conf.gz (595 bytes, application/octet-stream)
2006-03-24 04:44 UTC, Konstantin A. Lepikhov
no flags Details
lspci.gz (1.29 KB, application/octet-stream)
2006-03-24 04:44 UTC, Konstantin A. Lepikhov
no flags Details
Xorg.crash.intel.1.6.0.git20060417.log.gz (8.10 KB, application/octet-stream)
2006-04-18 08:17 UTC, Konstantin A. Lepikhov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin A. Lepikhov 2006-03-24 04:42:13 UTC
I'm using xorg-x11-server 1.0.2, xorg-x11-drv-i810 1.5.2 from cvs, latest Mesa
and DRM kernel modules (Mesa from 2006.02.23 and DRM from 2006.03.23).

OS: x86_64 EMT64T ALTLinux Sisyphus w/kernel 2.6.16-rc6.git10 w/-ck1 patchset
(also checked w/ vanilla 2.6.16 kernel from kernel.org).

When dri enabled xserver segfault. Without dri all works fine.
Comment 1 Konstantin A. Lepikhov 2006-03-24 04:43:21 UTC
Created attachment 5034 [details]
Xorg.crash.i810.1.5.2.log.gz

Xorg.0.log crash log w/ backtrace
Comment 2 Konstantin A. Lepikhov 2006-03-24 04:43:52 UTC
Created attachment 5035 [details]
dmesg.gz
Comment 3 Konstantin A. Lepikhov 2006-03-24 04:44:16 UTC
Created attachment 5036 [details]
xorg.conf.gz
Comment 4 Konstantin A. Lepikhov 2006-03-24 04:44:42 UTC
Created attachment 5038 [details]
lspci.gz

lspci -v log
Comment 5 Konstantin A. Lepikhov 2006-03-24 22:19:52 UTC
cc'ed dri-devel for additional help.
Comment 6 Alan Hourihane 2006-04-12 23:31:12 UTC
You might want to try the latest CVS.
Comment 7 Alan Hourihane 2006-04-18 08:03:42 UTC
I'll add that the current CVS works for me.
Comment 8 Konstantin A. Lepikhov 2006-04-18 08:14:24 UTC
Still segfaults.

some info about installed packages:

$ rpm -qa|egrep "xorg\-x11\-(server|drv|dri)"
xorg-x11-dri-i810-6.5-alt0.cvs20060418
xorg-x11-server-1.0.2-alt3
xorg-x11-drv-intel-1.6.0-alt0.git20060417
xorg-x11-server-common-1.0.2-alt3

I don't change drm modules, looks like it's not changed.
Comment 9 Konstantin A. Lepikhov 2006-04-18 08:17:13 UTC
Created attachment 5349 [details]
Xorg.crash.intel.1.6.0.git20060417.log.gz
Comment 10 Michel Dänzer 2006-04-19 18:08:03 UTC
This has been reported to Debian at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=363451 . Looks like a 64 bit
specific issue?
Comment 11 Kevin Epsworth 2006-04-19 21:08:34 UTC
I had the same issue on a Gentoo ~amd64 box:

$ uname -a
Linux tc9 2.6.16-gentoo-r2 #1 Thu Apr 13 11:43:48 BST 2006 x86_64 Intel(R)
Pentium(R) 4 CPU 3.20GHz GNU/Linux
$ /usr/sbin/lspci | grep Graphics
00:02.0 VGA compatible controller: Intel Corporation 945G/GZ Express Integrated
Graphics Controller (rev 02)
00:02.1 Display controller: Intel Corporation 945G/GZ Express Integrated
Graphics Controller (rev 02)

I don't pretend to understand the code, but tracked down the crash to a null
pointer dereference within i830_dri.c.  The following patch fixed it for me:

**************
*** 771,777 ****
--- 771,779 ----
     sarea->depth_handle = 0;
     sarea->tex_handle = 0;

+    xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Setting pScreen.  pScreen:
0x%08x, pScrn: 0x%08x, pScrn->pScreen: 0x%08x\n",pScreen,pScrn,pScrn->pScreen);
     /* Need to initialize pScreen now to let RandR know. */
+    pScrn->pScreen=pScreen;
     pScrn->pScreen->width = pScrn->virtualX;
     pScrn->pScreen->height = pScrn->virtualY;

...I'm guessing what pScrn->pScreen should actually be set to, but this seems to
work OK.
Comment 12 Konstantin A. Lepikhov 2006-04-19 22:27:00 UTC
Thanks Kevin! This patch also fix segfault on my EMT64 box. Alan, could you
commit it into mainline?
Comment 13 Alan Hourihane 2006-04-20 19:49:43 UTC
Done. 


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.