Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264252 - xorg-server-1.5.3-r5 + xf86-video-intel-2.6.3 crashes under gentoo-sources-2.6.29 (amd64)
Summary: xorg-server-1.5.3-r5 + xf86-video-intel-2.6.3 crashes under gentoo-sources-2....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo X packagers
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
Depends on: 260582
Blocks:
  Show dependency tree
 
Reported: 2009-03-30 07:29 UTC by Andrew Church
Modified: 2009-05-15 17:22 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Xorg.0.log (Xorg.0.log,13.64 KB, text/plain)
2009-03-30 07:31 UTC, Andrew Church
Details
Crash log from xf86-video-intel-2.7.0 (Xorg-intel270.log,12.48 KB, text/plain)
2009-05-06 11:59 UTC, Andrew Church
Details
Log from xorg-server-1.6.1 with xf86-video-intel-2.7.0 (Xorg-161-intel270.log,12.45 KB, text/plain)
2009-05-06 13:34 UTC, Andrew Church
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Church 2009-03-30 07:29:53 UTC
Under gentoo-sources-2.6.29 on amd64, X.org crashes shortly after startup with the backtrace below.  The same configuration behaves normally (no crash) under gentoo-sources-2.6.28{,-r1}.

Backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f657cb406f0 (LWP 9108)]
0x00007f65794878fd in drm_intel_gem_bo_unreference_locked (bo=0x4cb8890)
    at intel_bufmgr_gem.c:581
581     intel_bufmgr_gem.c: No such file or directory.
        in intel_bufmgr_gem.c
(gdb) bt
#0  0x00007f65794878fd in drm_intel_gem_bo_unreference_locked (bo=0x4cb8890)
    at intel_bufmgr_gem.c:581
#1  0x00007f657948795f in drm_intel_gem_bo_unreference (bo=0x4cb8890)
    at intel_bufmgr_gem.c:595
#2  0x00007f6579483a94 in drm_intel_bo_unreference (bo=0x4cb8890)
    at intel_bufmgr.c:73
#3  0x00007f65796f0192 in i830_uxa_destroy_pixmap (pixmap=0x4cb8840)
    at i830_exa.c:933
#4  0x0000000000594c3d in damageDestroyPixmap (pPixmap=0x4cb8840)
    at damage.c:1680
#5  0x00007f657a22011e in XvDestroyPixmap (pPix=0x4cb8840) at xvmain.c:381
#6  0x000000000056e560 in FreePicture (value=0x4cb89b0, pid=18874425)
    at picture.c:1528
#7  0x0000000000431e7f in FreeResource (id=18874425, skipDeleteFuncType=0)
    at resource.c:561
#8  0x0000000000570cbf in ProcRenderFreePicture (client=0x4c992f0)
    at render.c:690
#9  0x0000000000574e16 in ProcRenderDispatch (client=0x4c992f0)
    at render.c:2097
#10 0x00000000004495fe in Dispatch () at dispatch.c:454
#11 0x000000000042ee97 in main (argc=9, argv=0x7fff84b5c618, 
    envp=0x7fff84b5c668) at main.c:438

Relevant packages:
    gentoo-sources-2.6.29
    xorg-server-1.5.3-r5
    xorg-video-intel-2.6.3-r1
    libdrm-2.4.5

emerge --info:
Portage 2.1.6.11 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.29-gentoo x86_64)
=================================================================
System uname: Linux-2.6.29-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_U9300_@_1.20GHz-with-glibc2.2.5
Timestamp of tree: Mon, 30 Mar 2009 02:45:01 +0000
app-shells/bash:     3.2_p48-r1
dev-lang/python:     2.5.4-r2
dev-python/pycrypto: 2.0.1-r8
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.6
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O0 -pipe -march=nocona -g"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O0 -pipe -march=nocona -g"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks fixpackages protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.gg3.net"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://192.168.0.1/gentoo-portage"
USE="aac acl alsa amd64 berkdb bzip2 cjk cli crypt cups dri dvd fortran gdbm gif gpm iconv ipv6 isdnlog joystick jpeg jpeg2k lame live mad midi mmx mp3 mudflap multilib ncurses nptl nptlonly ogg openmp oss perl png pppd python quicktime readline reflection sdl session spl sse sse2 ssl sysfs theora tiff truetype unicode vorbis x264 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Andrew Church 2009-03-30 07:31:52 UTC
Created attachment 186719 [details]
Xorg.0.log

Please advise if any other information would be useful.
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2009-03-30 10:30:27 UTC
I did have the same problem.

I tried xorg-1.6 from x11 overlay and works fine so far
Comment 3 Scott 2009-04-01 11:54:53 UTC
This is the same as Bug 261783
Comment 4 Rémi Cardona (RETIRED) gentoo-dev 2009-05-05 11:45:16 UTC
Marking as a blocker on the Xserver 1.6 tracker.

Thanks
Comment 5 Andrew Church 2009-05-06 11:51:42 UTC
Unfortunately, I'm still not having any luck with xorg-1.6.  Here's a table of how things look with the latest versions from the x11 overlay:

2.6.28-r5  1.5.3-r5  2.6.3-r1 | OK
2.6.28-r5  1.5.3-r5  2.7.0    | OK
2.6.28-r5  1.6.1     2.6.3-r1 | OK
2.6.28-r5  1.6.1     2.7.0    | OK
2.6.29-r3  1.5.3-r5  2.6.3-r1 | Crash (*1)
2.6.29-r3  1.5.3-r5  2.7.0    | Crash (*2), (*4)
2.6.29-r3  1.6.1     2.6.3-r1 | Freeze (*3)
2.6.29-r3  1.6.1     2.7.0    | Freeze (*3), (*4)

(*1) This combination crashed as described in the original report.

(*2) This combination succeeded in starting up to the point of allowing mouse pointer movement into and out of the single terminal started in my .xinitrc, but attempting to either open a second window or exit X via the window manager caused a crash.

(*3) These combinations froze when exiting X via the window manager.  There was nothing abnormal in Xorg.0.log; the system just failed to return to the original virtual console (and wouldn't accept any keyboard input, including Alt-Fn or SysRq magic keys).

(*4) For these combinations, the displayed graphics were corrupt, with lines scattered horizontally across the screen as though the framebuffer line stride was set incorrectly.  The graphic data itself appeared to be correct, judging from window frame color changes that occurred when I moved the mouse pointer to where the window was supposed to be (as a side note, the mouse pointer itself was displayed correctly).
Comment 6 Andrew Church 2009-05-06 11:59:18 UTC
Created attachment 190498 [details]
Crash log from xf86-video-intel-2.7.0

This is for the crash-on-exit case (note 2 in my last comment), just in case it's desired.  The crash itself seems to be in the same place, judging from the backtrace.

Also, sorry for forgetting to add headers to the table columns; in case it's not clear, the version numbers are for gentoo-sources, xorg-server, and xf86-video-intel respectively.
Comment 7 Rémi Cardona (RETIRED) gentoo-dev 2009-05-06 12:03:52 UTC
(In reply to comment #6)
> Also, sorry for forgetting to add headers to the table columns; in case it's
> not clear

Wow, no, it's perfectly clear! Thanks a bunch for running such extensive tests :)

Reading your log file, I see you've built xorg-server before we started enabling DRI2 in it. Could you try rebuilding xorg-server again, making sure that the "dri2" module is loaded and the intel driver try to use DRI2 instead of DRI1?

Thanks
Comment 8 Andrew Church 2009-05-06 13:34:26 UTC
Created attachment 190502 [details]
Log from xorg-server-1.6.1 with xf86-video-intel-2.7.0

As far as I can tell, the xorg-server-1.6.1 builds were already using DRI2, judging from the line:
    (II) intel(0): direct rendering: DRI2 Enabled
in the logfile.  I rebuilt 1.5.3-r5 and added an explicit "LoadModule dri2" to xorg.conf, and that resulted in an immediate crash using either intel-2.6.3-r1 or intel-2.7.0.
Comment 9 Andrew Church 2009-05-06 13:38:01 UTC
Actually, it looks like the LoadModule "dri2" didn't do anything at all for 1.5.3-r5; maybe that version didn't have DRI2 support to begin with?  (And since there was no change, I guess the delayed crash I saw before was just the luck of the draw.)
Comment 10 Andrew Church 2009-05-06 13:38:54 UTC
By "LoadModule dri2" I did of course mean:

Section "Module"
...
Load "dri2"
EndSection
Comment 11 Rémi Cardona (RETIRED) gentoo-dev 2009-05-06 13:55:45 UTC
Whatever DRI2 was available in 1.5.3 has been completely disabled because it wasn't ready when upstream made the 1.5 branch.

But does anything new happen with DRI2 on X 1.6.1 ? Do you still get lock ups/crashes?

Thanks
Comment 12 Andrew Church 2009-05-06 13:58:34 UTC
Sorry if I wasn't clear -- the latest log (Xorg-161-...) is an instance of the freezes I mentioned earlier, which were already using DRI2.  So no, there have been no changes.
Comment 13 Rémi Cardona (RETIRED) gentoo-dev 2009-05-06 14:22:54 UTC
Ok, I get it.

Please open a bug in FreeDesktop's bugzilla and add "remi@gentoo.org" as a CC on that bug so I can track it. There's little else I can do here as you're using the latest recommended bits by upstream.

Here's a little document that should help you save time when filing the bug : http://intellinuxgraphics.org/how_to_report_bug.html

Thanks
Comment 14 Andrew Church 2009-05-06 15:28:14 UTC
Opened a bug on the freeze issue as:
    https://bugs.freedesktop.org/show_bug.cgi?id=21596
There's also a separate bug about the crash that links back here:
    https://bugs.freedesktop.org/show_bug.cgi?id=21245

As a side note, the graphics corruption issue I mentioned seems to be fixed by a patch mentioned in #21246 on freedesktop.org, namely:

http://git.kernel.org/?p=linux/kernel/git/anholt/drm-intel.git;a=commit;h=f544847fbaf099278343f875987a983f2b913134

Applied it to 2.6.29-r3 and it fixed the corruption, though not the freeze.
Comment 15 Rémi Cardona (RETIRED) gentoo-dev 2009-05-06 15:45:41 UTC
Alright, that's great. Thanks a bunch for taking this upstream, let's track the bugs there.

Don't hesitate to ping me here if the upstream bug is fixed and I forgot to backport whatever patches need to be backported.

Thanks
Comment 16 Scott 2009-05-06 23:42:58 UTC
Hi,

The above kernel patch does fix the graphics errors for me as well.

On my system however, X will crash whenever i edit a line of text (in gedit) or when i try to execute a long command. But only the first time i run it after rebooting.

Regards,

Scott
Comment 17 Rémi Cardona (RETIRED) gentoo-dev 2009-05-07 06:20:36 UTC
@kernel folks,

Could you guys make sure that the patch linked in comment 14 is applied to the stable 2.6.29 branch or to the gentoo-sources patchset?

Thanks for your help
Comment 18 Andrew Church 2009-05-15 15:45:34 UTC
The patch from comment 14 was included in kernel 2.6.29.3, so gentoo-sources-2.6.29-r4 should have it.

It turns out the "freeze" in comment 5 was kernel modesetting taking over the console from the VGA console driver and not restoring it afterwards.  According to upstream, this is designed behavior and you have to use the framebuffer console driver with KMS, but there will (eventually, though I don't see it yet) be a kernel config patch to force-enable fbcon if KMS is selected.

Either disabling KMS or enabling fbcon resolved the freeze for me.  I haven't checked the status of the crash with xorg-server 1.5, but I noticed a changelog entry in the Intel driver talking about BO reference counts or some such, so that may be fixed in the current git version.
Comment 19 Rémi Cardona (RETIRED) gentoo-dev 2009-05-15 17:21:54 UTC
Alright, thanks for the follow up. In any case, this bug will be fixed in the kernel directly where selecting KMS will automatically enable fbcon.

Cheers
Comment 20 Rémi Cardona (RETIRED) gentoo-dev 2009-05-15 17:22:14 UTC
And closing with the proper resolution.

Thanks