Bug 310841 - PATCH: fix crash with BadAlloc X-error when using yuv overlay on i810 vga
PATCH: fix crash with BadAlloc X-error when using yuv overlay on i810 vga
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: SDL (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Thomas Woerner
Fedora Extras Quality Assurance
:
Depends On:
Blocks: c->xlib.lock
  Show dependency treegraph
 
Reported: 2007-09-28 09:10 EDT by Hans de Goede
Modified: 2008-01-22 10:47 EST (History)
0 users

See Also:
Fixed In Version: 1.2.13-1.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-22 10:47:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
PATCH: fix crash with BadAlloc X-error when using yuv overlay on i810 vga (4.45 KB, patch)
2007-09-28 09:10 EDT, Hans de Goede
no flags Details | Diff

  None (edit)
Description Hans de Goede 2007-09-28 09:10:50 EDT
When running boswars: "yum install boswars" on a machine with intel
integrated graphics it crashes when it tries to play the initial theora
splashscreen video:
X Error of failed request:  BadAlloc (insufficient resources for operation)
  Major opcode of failed request:  140 (XVideo)
  Minor opcode of failed request:  19 ()
  Serial number of failed request:  25
  Current serial number in output stream:  26
boswars: xcb_xlib.c:41: xcb_xlib_lock: Assertion `!c->xlib.lock' failed.
Aborted

I recognized this problem from a few years back, when I encountered it while
working on the Xv blitter for xmame. The problem is that for some reason
creation the Xvport and XvImage succeeds, and failure (lack of resources / hw
capability?) is only indicated during the first XvPut[Shm]Image. I've written a
patch (attached) for SDL using the work around for this I developed for xmame
(and which is still used successfully in xmame after many years of usage).

I've also reported this upstream:
http://bugzilla.libsdl.org/show_bug.cgi?id=495
Comment 1 Hans de Goede 2007-09-28 09:10:50 EDT
Created attachment 210281 [details]
PATCH: fix crash with BadAlloc X-error when using yuv overlay on i810 vga
Comment 2 Thomas Woerner 2007-10-02 05:16:10 EDT
Do you know if there is a fix planned for the i810 driver? I think it should get
fixed there.
Comment 3 Hans de Goede 2007-10-02 08:49:42 EDT
This has been filed upstream long ago:
https://bugs.freedesktop.org/show_bug.cgi?id=6849

Notice there are other reports like this one. Upstream's reaction is always to add:
Option "LinearAlloc" "<value>"

With value something of 6Mb or more to xorg.conf, this reserves a buffer when
starting X before graphics memory becomes fragmented (I think) and thus works
around this at the cost of memory use.

It might be an idea to add this option to xorg.conf's generated during install,
thereby fixing this for things like playing high ress ogg videos too, but even
then we will still need this workaround for exisiting setup's, as an upgrade
doesn't regenerate xorg.conf.

If you agree this option should be in generated xorg.conf by default (I have my
doubts, why isn't it the default in the driver then?), then I'll file a seperate
bug for that.
Comment 4 Adam Jackson 2007-10-30 13:40:01 EDT
We shouldn't need to bother anymore, afaict.  Textured video is the default now,
which doesn't have this problem.  And at least one major fix to Xv allocation
bugs has been made in our F8 driver.
Comment 5 Hans de Goede 2007-10-30 14:10:39 EDT
Hmm, I developed and tested this patch on a pretty up2date rawhide system, since
when is it the default? And is it the default for all chips or only for newer
models?
Comment 6 Bill Nottingham 2007-10-30 19:54:24 EDT
There have been three different Xv changes to the intel driver since 10/15.
Comment 7 Hans de Goede 2007-10-31 03:46:41 EDT
Bos Wars may be copied only under the terms of the GNU General Public License
which must be distributed with this program.

DISCLAIMER:
This software is provided as-is.  The author(s) can not be held liable for any
damage that might arise from the use of this software.
Use it at your own risk.

X Error of failed request:  BadAlloc (insufficient resources for operation)
  Major opcode of failed request:  140 (XVideo)
  Minor opcode of failed request:  19 ()
  Serial number of failed request:  27
  Current serial number in output stream:  28
boswars: xcb_xlib.c:41: xcb_xlib_lock: Assertion `!c->xlib.lock' failed.
Aborted

[hans@localhost ~]$ rpm -q xorg-x11-drv-i810
xorg-x11-drv-i810-2.1.1-7.fc8
[hans@localhost ~]$

---

Note that this i810 bug has been around for atleast 3 years, I first encountered
and worked around it before I joined Fedora, when I was still working on xmame.

It would be great for this bug to fixed at the driver level, but seeing how long
it already exists I don't see this happening.
Comment 8 Fedora Update System 2008-01-11 17:11:15 EST
SDL-1.2.13-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update SDL'
Comment 9 Fedora Update System 2008-01-22 10:47:12 EST
SDL-1.2.13-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

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