Bug 20525 - xf86-video-intel-2.6.3: Xv crashes X server
Summary: xf86-video-intel-2.6.3: Xv crashes X server
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: 7.4 (2008.09)
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Wang Zhenyu
QA Contact: Xorg Project Team
URL: http://bugs.gentoo.org/show_bug.cgi?i...
Whiteboard:
Keywords:
Depends on:
Blocks: 20276
  Show dependency treegraph
 
Reported: 2009-03-07 12:10 UTC by Bob Raitz
Modified: 2009-04-19 06:20 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log under intel-2.6.1 (24.48 KB, text/plain)
2009-03-07 23:58 UTC, Bob Raitz
no flags Details
Xorg.0.log under intel-2.6.3, with various errors. (24.13 KB, text/plain)
2009-03-08 00:09 UTC, Bob Raitz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Raitz 2009-03-07 12:10:50 UTC
After updating to xf86-video-intel-2.6.3, the computers in question would no longer play DVD's in kaffeine. When the attempt was made to play any DVD, the unit in question would immediately drop to a CLI. If X was restarted after this, the machine would lock up coming when exiting X. Downgrading to xf86-video-intel-2.6.1 solved the problem.

This bug was later verified on a second system. Same exact symptoms.

Creating this bug report was requested by Gentoo Bugzilla. Please check the URL for the Gentoo bug report.

Here is the lspci of the primary afflicted system:

pappy-lap ~ # lspci
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
06:00.0 Network controller: Broadcom Corporation BCM4311 802.11b/g WLAN (rev 01)
08:08.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)


Will give any other needed information.
Comment 1 Gordon Jin 2009-03-07 17:30:09 UTC
Please attach Xorg.0.log.

Are you able to use git-bisect to find which commit breaks?
Comment 2 Bob Raitz 2009-03-07 23:54:08 UTC
(In reply to comment #1)
> Please attach Xorg.0.log.
> 
In functional (2.6.1) and non-functional (2.6.3) forms? If so, I'll send the good one first, since I'm currently up on that machine, and it's running the functional driver.

> Are you able to use git-bisect to find which commit breaks?
> 
Not quite sure what that means. 2.6.2 worked, 2.6.3 didn't. Give me a git url, and I'll see what I can find.

Attachment to follow...
Comment 3 Bob Raitz 2009-03-07 23:58:15 UTC
Created attachment 23648 [details]
Xorg.0.log under intel-2.6.1

Xorg.0.log with everything working right, and xf86-video-intel-2.6.1
Comment 4 Bob Raitz 2009-03-08 00:09:17 UTC
Created attachment 23649 [details]
Xorg.0.log under intel-2.6.3, with various errors.

The machine in question is currently showing a black screen. I can ssh to it, and this is the file that was created as soon as things crashed. I think it's pretty interesting there at the end.
Comment 5 Wang Zhenyu 2009-03-09 00:20:38 UTC
Could you get gdb backtrace?
Comment 6 Michael Fu 2009-03-09 02:36:55 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Are you able to use git-bisect to find which commit breaks?
> > 
> Not quite sure what that means. 2.6.2 worked, 2.6.3 didn't. Give me a git url,
> and I'll see what I can find.
> 

here are some tutorial about how to use git bisect. if it works on 2.6.2 while breaks on 2.6.3, it won't take long to pin which commit is the culprit...

http://www.kernel.org/pub/software/scm/git/docs/git-bisect.html

Comment 7 Bob Raitz 2009-03-10 01:06:14 UTC
I am currently ironing out problems getting the Gentoo ebuild to work with git. I am hoping to get things going tomorrow.
Comment 8 Bob Raitz 2009-03-12 13:38:51 UTC
(In reply to comment #5)
> Could you get gdb backtrace?
> 

No accelerated IMDCT transform found
(EE) intel(0): Failed to pin xv buffer
X Error: BadAlloc (insufficient resources for operation) 11
  Major opcode:  140
  Minor opcode:  19
  Resource id:  0x3e00001
Backtrace:
0: X(xorg_backtrace+0x3c) [0x8124950]
1: X(xf86SigHandler+0x4e) [0x80c48ca]
2: [0xffffe400]
3: /usr/lib/xorg/modules/drivers//intel_drv.so [0xb79a125e]
4: /usr/lib/xorg/modules/drivers//intel_drv.so [0xb79a3ecf]
5: X [0x80b36de]
6: /usr/lib/xorg/modules/extensions//libextmod.so(XvdiPutImage+0x174) [0xb7a0e30a]
7: /usr/lib/xorg/modules/extensions//libextmod.so [0xb7a11c05]
8: /usr/lib/xorg/modules/extensions//libextmod.so(ProcXvDispatch+0x35) [0xb7a12fec]
9: X(Dispatch+0x33d) [0x8087cea]
10: X(main+0x457) [0x806f02d]
11: /lib/libc.so.6(__libc_start_main+0xd5) [0xb7a82715]
12: X [0x806e461]
Fatal server error:
Caught signal 11.  Server aborting
kdeinit: Fatal IO error: client killed

I get this after X dies. Still working out the git problems.

Comment 9 Bob Raitz 2009-03-12 22:46:22 UTC
# git bisect start
# git bisect good xf86-video-intel-2.6.1
# git bisect bad 2.6.2
Bisecting: 22 revisions left to test after this
[8cb4d68089109f6cef0ce94429ba6f944910c646] Quirk MSI IM-945GSE-A LVDS, TV outputs.

# git bisect good
Bisecting: 11 revisions left to test after this
[173270d49f218b7bcae7f887dd9e2d23343c6070] KMS: Hook up crtc::gamma_set. (cherry picked from commit 723b6065093adb56a2d7204bd990ceae41bfafc9)

# git bisect good
Bisecting: 5 revisions left to test after this
[6314b9178a252292a79e21a64d47d740e23df28d] uxa: Ask for BOs ready for rendering for pixmaps.

# git bisect bad
Bisecting: 2 revisions left to test after this
[3937756ae4cae78b6c6c72714ac8898f155844f6] Fix i915 textured video to work with the i830_memory -> bo change.
Should I follow it to the very end, or is this what you wanted?

# git bisect bad
Bisecting: 0 revisions left to test after this
[be56ce2c4cdeabaf655c53ca177ec35b8536bd9b] Make Xv used a buffer object instead of i830_memory.

# git bisect bad
be56ce2c4cdeabaf655c53ca177ec35b8536bd9b is first bad commit
commit be56ce2c4cdeabaf655c53ca177ec35b8536bd9b
Author: Kristian Høgsberg <krh@redhat.com>
Date:   Wed Feb 18 17:26:06 2009 -0500

    Make Xv used a buffer object instead of i830_memory.

    We still pin the buffer object in case of overlay, but for textured video
    we're now no longer using i830_memory for Xv anymore.
    (cherry picked from commit 872aadc7102bd5131e1582ede081e22672911ba2)

:040000 040000 322035cc99ace724f09bed12c55913c5227a1c8b 83814192ca02cdd2759c46d134c25b7d9c793457 M      src
Comment 10 Rémi Cardona 2009-03-14 01:40:27 UTC
Confirming on my 855GM laptop with any app that uses Xv (totem and mplayer in my tests).

Reverting the following four patches on top of 2.6.3 works around the issue for now (I did those four to avoid merge conflicts) :

 - "Access the Xv buffer through the GTT for the non-KMS case."
 - "Fix i915 textured video to work with the i830_memory -> bo change."
 - "Dont allocate overlay registers in KMS mode."
 - "Make Xv used a buffer object instead of i830_memory."

Is it safe to assume overlay Xv is broken on all pre-965 chips?

Thanks
Comment 11 Gordon Jin 2009-03-14 17:53:02 UTC
Does this also happen on 2.7 or master branch? If so, I'd suggest increasing priority.
Comment 12 Wang Zhenyu 2009-03-15 18:32:46 UTC
Does this fixed by 
commit 2026c57cf0a352d9e6f9d208cfb7d4d550614477
Author: Kalev Lember <kalev@smartlink.ee>
Date:   Fri Mar 13 21:32:08 2009 +0200

    Fix Xv crash with overlay video.
    
    Bug #20585.

Comment 13 Rémi Cardona 2009-03-16 00:11:15 UTC
(In reply to comment #12)
> Does this fixed by 
> commit 2026c57cf0a352d9e6f9d208cfb7d4d550614477
> Author: Kalev Lember <kalev@smartlink.ee>
> Date:   Fri Mar 13 21:32:08 2009 +0200
> 
>     Fix Xv crash with overlay video.
> 
>     Bug #20585.
> 

Thanks Zhenyu, that indeed fixes the crashes for me.

Could this patch be nominated for the 2.6 and 2.7 branches as well?

Thanks
Comment 14 Wang Zhenyu 2009-03-16 00:13:56 UTC
yeah, this bug has already blocked 2.7. And you can put it back to 2.6 for your dist.

Thanks for verify, close. 
Comment 15 Bob Raitz 2009-03-16 00:35:13 UTC
Thanks for letting me do the testing for this. It was fun once I figured out what was happening.
Comment 16 Bob Raitz 2009-03-24 12:53:56 UTC
Please re-open. xf86-video-intel-2.6.3-r1 causes the same issues, with the exception of not showing a green screen. It still causes locks coming out of X, and my computer with an i830 video chipset fails attempting to play a DVD. Things remain workable with xf86-video-intel-2.6.1.
Comment 17 Wang Zhenyu 2009-03-24 17:57:57 UTC
Could  you test with git master to see if this's fixed upstream?
Comment 18 Bob Raitz 2009-03-24 21:18:45 UTC
(In reply to comment #17)
> Could  you test with git master to see if this's fixed upstream?
> 

I thought the error was already found. As far as I can see, it's the same error I was dealing with when I started this report. The only difference is the green screen is gone. The i830 machine dies whenever DVD play starts (original complaint), caused by whatever commit was nailed down as the root cause. The other machine loses display coming out of X. No return of the frame buffer at all. The machine can be rebooted via ssh, or by a press of the power button. ACPI is a good thing.
Comment 19 Anthoine Bourgeois 2009-04-16 12:20:05 UTC
The issue remains on 2.6.3 branch with the i965 video.

I've bisect the failed patch.
# git bisect start
# git bisect good xf86-video-intel-2.6.1
# git bisect bad 2.6.3

I find this commit :
8ef4eb50193a849cb9fd0d7a85c6814e1d473101 is first bad commit
commit 8ef4eb50193a849cb9fd0d7a85c6814e1d473101
Author: Eric Anholt <eric@anholt.net>
Date:   Mon Jan 19 14:43:20 2009 -0800

    Do check_aperture_space and batch_start_atomic for i965 video.


The previous fix to this bug only fix i945 video. (I think, I can't test it, I've got only a i965)
commit 2026c57cf0a352d9e6f9d208cfb7d4d550614477
Author: Kalev Lember <kalev@smartlink.ee>
Date:   Fri Mar 13 21:32:08 2009 +0200

    Fix Xv crash with overlay video.

Can I reopen the bug ? How can I help more ?
Comment 20 Rémi Cardona 2009-04-19 06:20:11 UTC
(In reply to comment #19)
> Can I reopen the bug ? How can I help more ?

Let's keep the issues separate, please open a new bug with the information you've found so far, it'll make it easier to help.

Don't forget to add "remi@gentoo.org" as a CC on that bug.

Thanks


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.