Bug 505285 - X crashes when xvideo is used
X crashes when xvideo is used
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: xorg-x11-drv-intel (Show other bugs)
11
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Adam Jackson
Fedora Extras Quality Assurance
card_i830
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-11 06:54 EDT by Andreas Petzold
Modified: 2009-11-15 20:06 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-11-15 20:06:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
xorg.conf (1.92 KB, text/plain)
2009-06-11 06:54 EDT, Andreas Petzold
no flags Details
Xorg.0.log (40.50 KB, text/plain)
2009-06-11 06:57 EDT, Andreas Petzold
no flags Details
Proposed patch: Avoid X server crash if XV buffer allocation fails (543 bytes, patch)
2009-06-27 18:33 EDT, Ingo van Lil
no flags Details | Diff

  None (edit)
Description Andreas Petzold 2009-06-11 06:54:27 EDT
Created attachment 347374 [details]
xorg.conf

Description of problem:
X crashes when a video is played and xvideo is used.

Version-Release number of selected component (if applicable):
xorg-x11-drv-intel-2.7.0-7.fc11.i586

How reproducible:
always

Steps to Reproduce:
1. Download sample video http://www.redhat.com/v/magazine/ogg/NET_MAN.ogg
2. Configure mplayer or totem to use xvideo
3. Play sample video and watch your session crash
  
Actual results:
X crashes

Expected results:
Video is played with xvideo acceleration 

Additional info:

My hardware:

00:02.0 VGA compatible controller [0300]: Intel Corporation 82830 CGC [Chipset Graphics Controller] [8086:3577] (rev 04)

See attachments for xorg.conf and Xorg.0.log. Xorg.0.log contains a backtrace, but I'm not sure how useful it is. Let me know if more info is needed to track down the problem.
Comment 1 Andreas Petzold 2009-06-11 06:57:28 EDT
Created attachment 347375 [details]
Xorg.0.log
Comment 2 Andreas Petzold 2009-06-11 07:11:43 EDT
The actual error message from Xorg.0.log is 

(EE) intel(0): Failed to pin xv buffer

This led me to the following commit in xorg

http://lists.freedesktop.org/archives/xorg-commit/2009-February/020346.html

I'm pretty sure this has something to do with the crash.
Comment 3 Matěj Cepl 2009-06-11 10:39:00 EDT
Backtrace:
0: /usr/bin/X(xorg_backtrace+0x3b) [0x812d07b]
1: /usr/bin/X(xf86SigHandler+0x9e) [0x80c061e]
2: [0xad3400]
3: /usr/lib/libdrm_intel.so.1(drm_intel_gem_bo_start_gtt_access+0x44) [0x247004]
4: /usr/lib/xorg/modules/drivers//intel_drv.so [0x1e7269]
5: /usr/lib/xorg/modules/drivers//intel_drv.so [0x1ec5f6]
6: /usr/bin/X [0x80d6c2e]
7: /usr/lib/xorg/modules/extensions//libextmod.so(XvdiPutImage+0x17e) [0x12fdae]
8: /usr/lib/xorg/modules/extensions//libextmod.so [0x133a48]
9: /usr/lib/xorg/modules/extensions//libextmod.so(ProcXvDispatch+0x3a) [0x134a2a]
10: /usr/bin/X(Dispatch+0x347) [0x80864d7]
11: /usr/bin/X(main+0x395) [0x806baf5]
12: /lib/libc.so.6(__libc_start_main+0xe6) [0x600a66]
13: /usr/bin/X [0x806afa1]

Fatal server error:
Caught signal 11.  Server aborting
Comment 4 Guido Aulisi 2009-06-15 12:24:44 EDT
I have the same problem on an IBM Thinkpad R51, Fedora 11 with mplayer.
I can't play videos with xv EXA no KMS, but I can play videos with gl extension.

If I activate KMS, X can't load xv extension.

Stack trace:
(EE) intel(0): Failed to pin xv buffer

Backtrace:
0: /usr/bin/Xorg(xorg_backtrace+0x3b) [0x812d07b]
1: /usr/bin/Xorg(xf86SigHandler+0x9e) [0x80c061e]
2: [0xae7400]
3: /usr/lib/libdrm_intel.so.1(drm_intel_gem_bo_start_gtt_access+0x44) [0x1e0004]
4: /usr/lib/xorg/modules/drivers//intel_drv.so [0x783269]
5: /usr/lib/xorg/modules/drivers//intel_drv.so [0x7885f6]
6: /usr/bin/Xorg [0x80d6c2e]
7: /usr/lib/xorg/modules/extensions//libextmod.so(XvdiPutImage+0x17e) [0x1b8dae]
8: /usr/lib/xorg/modules/extensions//libextmod.so [0x1bca48]
9: /usr/lib/xorg/modules/extensions//libextmod.so(ProcXvDispatch+0x3a) [0x1bda2a]
10: /usr/bin/Xorg(Dispatch+0x347) [0x80864d7]
11: /usr/bin/Xorg(main+0x395) [0x806baf5]
12: /lib/libc.so.6(__libc_start_main+0xe6) [0x51ea66]
13: /usr/bin/Xorg [0x806afa1]

Fatal server error:
Caught signal 11.  Server aborting
Comment 5 Ingo van Lil 2009-06-27 18:32:13 EDT
Same problem here, Thinkpad R51 with Intel 855GM and Fedora 11.

The reason for the crash is actually quite simple: When the "Failed to pin xv buffer" message is displayed in i830_video.c the buffer object is unreferenced, but the pointer is not reset to NULL. When the function is called once again it will think that the buffer is already valid and try to reuse the freed memory.

I have created a patch to NULL the pointer after unreferencing it, at least it keeps my X server from crashing as soon as I launch mplayer. Now, why the driver fails to allocate an XV buffer in the first place... beats me.

Regards,
Ingo
Comment 6 Ingo van Lil 2009-06-27 18:33:52 EDT
Created attachment 349676 [details]
Proposed patch: Avoid X server crash if XV buffer allocation fails
Comment 7 Amir R. 2009-07-07 20:45:07 EDT
Same problem here. Running FC11 on a Dell Dimenstion 2400 with Intel 82845G.
The crash happens when "nomodesetting" is used. Otherwise, XV is disabled.
XV used to work smoothly with FC10.
I suggest "priority: high" since this is a final release and "severity: high" since it causes the X server to crash.
==========================================
/var/log/Xorg.0.log:

(EE) intel(0): Failed to pin xv buffer

Backtrace:
0: /usr/bin/X(xorg_backtrace+0x3b) [0x812d07b]
1: /usr/bin/X(xf86SigHandler+0x9e) [0x80c061e]
2: [0xff4400]
3: /usr/lib/libdrm_intel.so.1(drm_intel_gem_bo_start_gtt_access+0x44) [0xb08004]
4: /usr/lib/xorg/modules/drivers//intel_drv.so [0xc61269]
5: /usr/lib/xorg/modules/drivers//intel_drv.so [0xc665f6]
6: /usr/bin/X [0x80d6c2e]
7: /usr/lib/xorg/modules/extensions//libextmod.so(XvdiPutImage+0x17e) [0x8b5dae]
8: /usr/lib/xorg/modules/extensions//libextmod.so [0x8b9a48]
9: /usr/lib/xorg/modules/extensions//libextmod.so(ProcXvDispatch+0x3a) [0x8baa2a]
10: /usr/bin/X(Dispatch+0x347) [0x80864d7]
11: /usr/bin/X(main+0x395) [0x806baf5]
12: /lib/libc.so.6(__libc_start_main+0xe6) [0x17ba66]
13: /usr/bin/X [0x806afa1]
============================================
/var/log/messages:

Jul  7 16:51:32 cardon kernel: X[1790]: segfault at 10034 ip 00b053dc sp bffb1330 error 4 in libdrm_intel.so.1.0.0[b04000+8000]
Jul  7 16:51:32 cardon kernel: [drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 1
============================================
Comment 8 Matěj Cepl 2009-07-24 09:13:56 EDT
Looks awfully like duplicate of bug 501435, but that has its patch as well and many votes, so I won't close it.
Comment 9 Callum Lerwick 2009-07-24 22:03:55 EDT
I'm seeing this same exact problem on a Toshiba Satellite 1100, Intel 830M chipset. First time error, second time X server crash. Can't play video unless I force everything to use xshm. Which is slow.

http://www.smolts.org/client/show/pub_cfc61f77-d39b-475c-ab3d-d5b8c566d8d3

Modesetting disabled due to bz #513735
Comment 10 Matěj Cepl 2009-11-05 13:31:16 EST
Since this bugzilla report was filed, there have been several major updates in various components of the Xorg system, which may have resolved this issue. Users who have experienced this problem are encouraged to upgrade their system to the latest version of their packages. For packages from updates-testing repository you can use command

yum upgrade --enablerepo='*-updates-testing'

Alternatively, you can also try to test whether this bug is reproducible with the upcoming Fedora 12 distribution by downloading LiveMedia of F12 Beta available at http://alt.fedoraproject.org/pub/alt/nightly-composes/ . By using that you get all the latest packages without need to install anything on your computer. For more information on using LiveMedia take a look at https://fedoraproject.org/wiki/FedoraLiveCD .

Please, if you experience this problem on the up-to-date system, let us now in the comment for this bug, or whether the upgraded system works for you.

If you won't be able to reply in one month, I will have to close this bug as INSUFFICIENT_DATA. Thank you.

[This is a bulk message for all open Fedora Rawhide Xorg-related bugs. I'm adding myself to the CC list for each bug, so I'll see any comments you make after this and do my best to make sure every issue gets proper attention.]
Comment 11 Ingo van Lil 2009-11-05 13:43:34 EST
I have already upgraded to F12 Beta about one week ago, because my laptop was barely usable in F11 and I saw that there was a newer version of the Intel drivers available. The system runs *much* better since: I can use KMS, there's no need for a custom xorg.conf any longer, GLX works and I could even enable compositing. There's still no xvideo support (xvinfo says "no adaptors present"), but I believe that's by design. Full-screen video with GLX is reasonably fast, so that's fine for me.
Comment 12 Amir R. 2009-11-06 13:23:47 EST
I'm running FC11 updated with '*-updates-testing' and X still crashes when xvideo is used. I repeat that this problem only happens with 'nomodesetting' option.

Here is the relevant part of Xorg.0.log :

(EE) intel(0): Failed to pin xv buffer

Backtrace:
0: /usr/bin/Xorg(xorg_backtrace+0x3b) [0x812d8eb]
1: /usr/bin/Xorg(xf86SigHandler+0x9e) [0x80c0e0e]
2: [0xcdf400]
3: /usr/lib/libdrm_intel.so.1(drm_intel_gem_bo_start_gtt_access+0x44) [0x134184]
4: /usr/lib/xorg/modules/drivers//intel_drv.so [0x651269]
5: /usr/lib/xorg/modules/drivers//intel_drv.so [0x6565f6]
6: /usr/bin/Xorg [0x80d74ee]
7: /usr/lib/xorg/modules/extensions//libextmod.so(XvdiPutImage+0x186) [0x11be36]
8: /usr/lib/xorg/modules/extensions//libextmod.so [0x11fb28]
9: /usr/lib/xorg/modules/extensions//libextmod.so(ProcXvDispatch+0x3a) [0x120b3a]
10: /usr/bin/Xorg(Dispatch+0x35f) [0x80869df]
11: /usr/bin/Xorg(main+0x395) [0x806bbf5]
12: /lib/libc.so.6(__libc_start_main+0xe6) [0xa28a66]
13: /usr/bin/Xorg [0x806b0a1]

Fatal server error:
Caught signal 11.  Server aborting


Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
Please also check the log file at "/var/log/Xorg.0.log" for additional information.
Comment 13 Andreas Petzold 2009-11-09 05:17:08 EST
Since I've updated to F12Beta, my old laptop is actually usable again! I've seen no problems with xvideo. I haven't tried compositing yet.

Great work!
Comment 14 Andreas Petzold 2009-11-09 15:12:36 EST
I tried to activate the desktop effects in GNOME, which caused an immediate hang of my machine. No messages in /var/log/Xorg.0.log or /var/log/messages. OBTW, I'm using nomodeset.
Comment 15 Matěj Cepl 2009-11-15 20:06:22 EST
For crashing i830 we have bug 513820. This one could be closed.

Thank you for helping us to fix this issue.

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