Summary: | can't allocate enough memory for Xv | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Philipp Zerelles <philipp> | ||||||||||
Component: | Driver/nVidia (open) | Assignee: | Egbert Eich <eich> | ||||||||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||||||
Severity: | normal | ||||||||||||
Priority: | high | CC: | ace, again, ajax, alan, andreas, andrew, andrew, billy.biggs, bp35, ccradu, chris, cryst, dberkholz, erik.andren, fdbugs, fufutos610, greg, jaanus, joe, jonahlomu, list, marius.andreiana, maze, mgarski, mrmailer, nate, noa, rich, rmj, simon, tim.w.connors, v.merkatz, wtanaka, zhirnyi | ||||||||||
Version: | 6.8.2 | ||||||||||||
Hardware: | x86 (IA32) | ||||||||||||
OS: | Linux (All) | ||||||||||||
Whiteboard: | |||||||||||||
i915 platform: | i915 features: | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 351 | ||||||||||||
Attachments: |
|
Description
Philipp Zerelles
2004-04-14 12:59:33 UTC
Created attachment 255 [details]
Xorg.log
similar problem for me using xine and vlc with standard Xorg drivers (neomagic) also on a system that worked properly under XFree86: X Error of failed request: BadAlloc (insufficient resources for operation) Major opcode of failed request: 141 (XVideo) Minor opcode of failed request: 19 () Serial number of failed request: 4776 Current serial number in output stream: 4778 See attached Xorg.0.log I have a tvtime user who complains that tvtime can't get enough video memory using an ATI 9800 with the 3.7.6 drivers. If mozilla is not running, tvtime works fine. The problem does not exist for them with the xfree server. I get the same problem with every video application. When there are too much programs in memory, I get the error as stated above or I just get a black video screen (sound only). There are no problems in XFree86 though. I am also seeing this problem using the mga driver with a G550. It also happens with DRI disabled, just takes longer to show up. XFree86 4.3 worked fine. More info can be seen here: http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=123996 Same problem here. System is a matrox g400. Everything worked just great with XFree but breaks with x.org. However, the problem is also partly color-depth dependant. running mplayer on 24bit depth gives the following error: "VO: [xv] 352x240 => 352x264 Planar YV12 X11 error: BadAlloc (insufficient resources for operation) 0.0% 2 0 39% MPlayer interrupted by signal 6 in module: flip_page" running in 16bit colordepth makes mplayer able to play movies. however, opening xmms, mozilla or any other application that uses a lot of pixmaps prevents mplayer from playing the files in 16bit colordepth. Billy Riggs from tvtime adds the following: <vektor_wrk> i suspect someone broke the memory allocator with dri somehow <vektor_wrk> xmms must be using a lot of pixmaps. <vektor_wrk> Like, the problem is that XVIDEO should preempt any pixmaps in video memory, I think. <vektor_wrk> Since pixmaps can be stored in system RAM, but XVIDEO surfaces cannot. <vektor_wrk> XVIDEO must take priority. I changed the title of this bug since it seems it is not specific to the ATI driver. Same problem with g450, using xorg-x11-6.7.0-2 from fedora. Mplayer and xine die when trying to use xvideo: [xv] dx: 0 dy: 0 dw: 640 dh: 480 X11 error: BadAlloc (insufficient resources for operation) Type: 0, display: 85a8e18, resourceid: 3c00001, serial: 58 Error code: b, request code: 90, minor code: 13 Here's a link to the same problem under Gentoo, using the binary ATi drivers: http://bugs.gentoo.org/show_bug.cgi?id=47755 I confirm this bug as well. No more tvtime... I'm using Xorg 6.7.0 from Mandrakelinux Cooker and ATI drivers. I have 512 MB of RAM and Radeon 9000 with 128 MB of Video RAM (should be enough for everyone) I now have standard FC2 (xorg 6.7.x) and Matrox G550 and I am running fluxbox window manager With this configuration mplayer (and lve) fails to open their video windows (and program exits) with message: X Error of failed request: BadAlloc (insufficient resources for operation) If I run X in failsafe mode (i.e only one xterm running and nothing else) or additionally to that run twm. Both mplayer and lve works fine. Does any of you have same behaviour ? Tomi > Does any of you have same behaviour ?
Yes. This usually happens after some program has stuffed the X server with
pixmaps. Mozilla in my case, ~20-40M of pixmap data according to xrestop.
Now, XAA normally tries to put pixmaps in offscreen memory for accelerated draws
into them. These pixmaps should be purged if room for an Xv overlay is needed
but this somehow doesn't happen.
Workaround: Option "XaaNoOffscreenPixmaps"
(XFree86 4.4.0, G400, DRI)
The workaround given in Comment #12 doesn't solve the problem for me: ... (==) RADEON(0): Write-combining range (0xc0000000,0x8000000) (II) RADEON(0): Wrote: rd=12, fd=164, pd=1 (WW) RADEON(0): Direct rendering not yet supported on Radeon 9500 and newer cards (II) RADEON(0): Memory manager initialized to (0,0) (1408,8191) (II) RADEON(0): Reserved area from (0,1050) to (1408,1052) (II) RADEON(0): Largest offscreen area available: 1408 x 7139 (**) RADEON(0): Option "XaaNoOffscreenPixmaps" "on" (II) RADEON(0): Using XFree86 Acceleration Architecture (XAA) ... MPlayer still crashes: ... SwScaler: using unscaled Planar YV12 -> Planar YV12 special converter VO: [xv] 640x480 => 640x480 Planar YV12 [fs] [vm] [zoom] XF86VM: Selected video mode 640x480 for image size 640x480. X11 error: BadMatch (invalid parameter attributes) ... X.org 6.7.0, Radeon 9600 Pro, 'radeon' driver "BadMatch (invalid parameter attributes)" is at least completely different to "BadAlloc (insufficient resources for operation)." Either an MPlayer bug or too many fancy/incompatible command line options. You're probably right. However, the problem appears with just fs=yes and vm=yes both set - so, not too much fancy options. I will try to investigate it and report a bug to MPlayer lists if I have some evidence. *** Bug 923 has been marked as a duplicate of this bug. *** I've been encountering this issue with Xorg 6.7.0, ATI proprietary driver 3.9.0. Screen res: 1280x1024@24bpp. Card: ATI Radeon 9800Pro (128MB) Video played using the xv extension works fine initially, but eventually, I start getting BadAlloc errors from the application (kaffeine in this case). I ran xrestop, but nothing in particular is hogging many resources: xrestop - Display: localhost:0 Monitoring 27 clients. XErrors: 0 Pixmaps: 12593K total, Other: 123K total, All: 12717K total res-base Wins GCs Fnts Pxms Misc Pxm mem Other Total PID Identifier 2c00000 316 10 1 52 10 1339K 8K 1348K ? kmix 1e00000 21 9 1 27 10 1324K 1K 1326K ? kwalletmanager 0e00000 2 11 1 16 8 1311K 1K 1313K 24572 knotify 1200000 3 6 1 16 4 1311K 1K 1313K 24570 kaccess [...] XV Video was working a few minutes ago, with even more pixmap memory in use - but now it fails. Note: everything else works - its just the XV extension that claims to have insufficient resources. I'm unsure if this worked in XFree - been using Xorg for so long now. Could be an ATI bug. Are there any other tools I can use to try and track it down? (xvinfo always works BTW) I recently brought this bug up on the xorg mailing list here: http://freedesktop.org/pipermail/xorg/2004-July/001260.html Also, see this response from Egbert: http://freedesktop.org/pipermail/xorg/2004-July/001282.html I have this problem too on a ATI Mobility 9000 using the radeon driver. Function can be restored to mplayer/xine if enough programs are closed but the line seems fuzzy. Running xorg-x11-6.7.0-r1 on Gentoo. Links to the same problem: http://freedesktop.org/bugzilla/show_bug.cgi?id=590 http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=126307 *** Bug 590 has been marked as a duplicate of this bug. *** I'm sorry for my impatience, but there has been no word about any progress in this bug for a long time. Is there a chance it will be fixed in upcoming 6.8.0 release. Someone with enough privilages should marked this bug as a release blocker, so it will be fixed in upcoming 6.8.0. From what I can tell, this bug should be considered as a potential release blocker. Assigning it to myself. Created attachment 750 [details] [review] Fix. I hope this fix takes care of the problem. The fix has just been committed to CVS. Please test!!! If anything breaks please reopen! This is old news by now, but I've stumbled across similar behavior under both XFree post 4.3 (4.3.99, 4.4) and X.org 6.7.0 with my MGA G200 on FreeBSD; 4.3 and prior were more immune. A contributing factor seems to be mplayer failing to clean up SysV shared memory segments when crashing gracelessly (e.g., the verbose complaining from mplayer is usually preceded by an attempt to play where appropriate Xv magic fails somewhere midway, leaving mplayer locked and forcing a kill -9), and failing to do recognize its leftovers when next run. Weeding out 'orphaned' segments with the 'ipcs' and 'ipcrm' commands (ipcs -mp and some ps/awk/xargs mojo can be helpful) will generally return things to health. Sample MPlayer failure, under 6.7.0: --- MPlayer 1.0pre4-3.3.3 (C) 2000-2004 MPlayer Team [...] VO: [xv] 588x384 => 588x384 Planar YV12 X11 error: BadAlloc (insufficient resources for operation) 0.0% 0 0 0% MPlayer interrupted by signal 6 in module: flip_page - MPlayer crashed. This shouldn't happen. It can be a bug in the MPlayer code _or_ in your drivers _or_ in your gcc version. If you think it's MPlayer's fault, please read DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and won't help unless you provide this information when reporting a possible bug. Xlib: unexpected async reply (sequence 0x5b)! --- More detail (icps -ma and ipcs -M output) available on request; have yet to test the impact of the patch. (In reply to comment #28) Pardon, the verbose and *useful* output of my case would be: using Xvideo port 69 for hw scaling [xv] dx: 0 dy: 0 dw: 588 dh: 384 *** [vo] Allocating (slices) mp_image_t, 592x384x12bpp YUV planar, 340992 bytes [xv] dx: 0 dy: 0 dw: 588 dh: 384 XXX initial v_pts=0.033 a_pos=7680 (0.480) / 1 0% 0% 0.0% 0 0 0% *** [vo] Allocating (slices) mp_image_t, 592x384x12bpp YUV planar, 340992 bytes X11 error: BadAlloc (insufficient resources for operation) Type: 0, display: 8664000, resourceid: 1a00001, serial: 58 Error code: b, request code: 8e, minor code: 13 (In reply to comment #27) > The fix has just been committed to CVS. > Please test!!! WFM, 'radeon' driver, Radeon 9600 PRO. (In reply to comment #27) > The fix has just been committed to CVS. > Please test!!! > If anything breaks please reopen! Also WFM, mga driver, Matrox G550. I've only applied the patch to the Mandrake xorg-x11 rpm, haven't used cvs. (In reply to comment #27) > The fix has just been committed to CVS. > Please test!!! WFM FireGL T2, proprietary ATI fglrx driver. Thanks! > Also WFM, mga driver, Matrox G550. > I've only applied the patch to the Mandrake xorg-x11 rpm, haven't used cvs. I added this mentioned patch http://freedesktop.org/bugzilla/attachment.cgi?id=750 to stock FC2 xorg-x11-6.7.0-5 src.rpm, and rebuild with rebuild -bb SPECS/xorg-x11.spec Installed 15 new rpms, but I still get errors: With mplayer (vo=xv fs=no zoom=yes) Starting playback... VDec: vo config request - 720 x 576 (preferred csp: Planar YV12) VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 1,33:1 - prescaling to correct movie aspect. VO: [xv] 720x576 => 768x576 Planar YV12 [zoom] X11 error: BadAlloc (insufficient resources for operation) 0,0% 1 0 49% MPlayer interrupted by signal 6 in module: flip_page - MPlayer crashed. This shouldn't happen. With mythtv frontend (using mplayer) lots of there (and sound with no picture): X Error: BadAlloc (insufficient resources for operation) 11 Major opcode: 141 Minor opcode: 19 Resource id: 0x0 I have FC2 Millenium G450, Mythtv-cvs, MPlayer-1.0pre5 Using vo=x11 everything is fine (exept it's very slow) Created attachment 931 [details]
Xorg.0.log for xorg-cvs-6.8.1
(In reply to comment #33) Update: I just compiled and installed XORG-6_8_1 from cvs. (Duron 1,8GHz, 750MB, FC2+Gnome, Millenium G450, PVR-350) Result: same error, only slightly different: With "mplayer -vo xv my.mpg": X11 error: BadAlloc (insufficient resources for operation) 0,0% 1 0 13% Xlib: unexpected async reply (sequence 0x5a)! With "mythfrontend" XV can only show very small videos, fullscreen-mode gives me blue screen with sound. In the terminal I see: X Error: BadAlloc (insufficient resources for operation) 11 Major opcode: 140 Minor opcode: 19 Resource id: 0x0 X Error: BadAlloc (insufficient resources for operation) 11 Major opcode: 140 Minor opcode: 19 Resource id: 0x0 X Error: BadAlloc (insufficient resources for operation) 11 Major opcode: 140 Minor opcode: 19 Resource id: 0x0 etc... Xorg.0.log attached "insufficient resources for operation" may be the simple truth. From your log: ... (--) MGA(0): VideoRAM: 16384 kByte ... (II) MGA(0): Memory manager initialized to (0,0) (1280,1227) (II) MGA(0): Largest offscreen area available: 1280 x 203 ... You have only 16M VideoRAM and XFree86/X.Org/DRI's video memory management isn't particularly clever. Try lowering resolution, depth. Turn off DRI. having same problem here. athlonxp 2200+ 256mb ram ati radeon 9600 256mb // ati drivers v. 3.12.0 (latest ones now) slackware 10.0 X11 6.8.1 (tgz package from linuxpackages.net) // same with 6.7.0 using dual head configuration.. XVideo extension. getting strange green artifacts on LCD screen (1) when watching videos with mplayer on TV (Tv-Out, 2). max resolution for dvd-divx playback is 640x480. in 800x600 i get the video with strange flickering green or pink lines. using the "XaaNoOffscreenPixmaps" option. can't unload DRI because without it I lose the dual head and the 2nd screen (TV) messes up. without the "XaaNoOffscreenPixmaps" option, only root can play dvds in 640*480, other users get "unsufficient resources for operation" error. same problem here: - fc2 with updates - xorg-x11-6.7.0-5 - Intel Corp. 82852/855GM Integrated Graphics Device - MPlayer interrupted by signal 6 in module: flip_page - X11 error: BadAlloc (insufficient resources for operation) - adding option -vo x11 helps in mplayer i also observe, when playing or pausing mplayer or xine parts of flash programs or animated gifs loaded by mozilla, even if mozilla is minimized. this is really strange. any solution in sight? regards ianus This is a know bug for 6.7.0. Unless someone volunteers to do a bugfix release it wont get fixed for 6.7. Therefore please don't report incidents for 6.7. 6.8.x has this problem fixed. The problems seen with 6.8 appear to be real limitations or wrong allocations by drivers. In any case they are not the same problem any more. Please investigate those further (ie does it help to run the video player with a 'simple' window manager which doesn't allocate so much offscreen memory, does closing applications help) and file a new bug report. I am having the same problem on Suse 9.2 with xorg 6.8.1. So what's the deal? Isn't the problem supposed be fixed in 6.8.1? I just realized the problem I reported earlier is video-driver dependent. If I use the nvidia driver from Nvidia, the problem is gone. If I use the open-source nv driver, then I see the problem. The bad thing is that I cannot use the binary nvidia drive because it disables the suspend-to-disk (ram) ACPI feature on laptops. (Sigh, when will Linux become a worry-free toy?) Unless you see a regression from an earlier XFree86 version (exactly the same setup (depth, screen size, window manager, applications just other server) everything works as expected. If you do see this regression please reopen and attach the log files of both servers. Hi Egbert, I'm reopening this one as it's also been reported downstream, and reported to work with the binary nVidia driver: https://bugzilla.ubuntu.com/show_bug.cgi?id=6299. I've pinged the submitter for more information, and will post it here when it comes. Cheers. I'm seeing a similar problem with x.org 6.8 and the latest ATI binary drivers. May or may not be related. xv works with low res video, but fails on any highdef source: ----------- mplayer: VO: [xv] 1920x1080 => 1152x648 Planar YV12 aspect: Warning: no suitable new res found! X11 error: BadAlloc (insufficient resources for operation) ??,?% 0 0 11% MPlayer interrupted by signal 6 in module: vo_check_events ----------- xvinfo | grep max maximum XvImage size: 2048 x 2048 ----------- I've got a Radeon 9600 w. 128 M ram. Also reported here: http://itdp.fh-biergarten.de/mplayer-users/2005-01/msg00121.html John Veysey I see this problem with X.org 6.8.2 (compiled by Ubuntu). mplayer often fails to start up with the error: VO: [xv] 720x576 => 768x576 Planar YV12 X11 error: BadAlloc (insufficient resources for operation) ??,?% 2 0 65% Killing firefox usually frees up enough resources to make it work. My Xorg.0 log: http://www.annexia.org/tmp/Xorg.0.log My xvinfo: http://www.annexia.org/tmp/xvinfo.txt Note this machine has "only" 16MB of video RAM. I have similar problem running mozilla-firefox on large sites (ex: http://www.sg.hu/cikkek/37667 ) The output: lama@khiraly:~$ mozilla-firefox The program 'Gecko' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAlloc (insufficient resources for operation)'. (Details: serial 6035 error_code 11 request_code 53 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) lama@khiraly:~$ I use the nvidia driver (1.0.7174) on 2.4.27-2-386 debian kernel. I have X.org (debian sid) with version: X Window System Version 6.8.2 (Debian 6.8.2.dfsg.1-8 20051005041959 David Nusinow <dnusinow@debian.org>) I have tried to run mozilla-firefox with the '--sync' option (as suggested), but no luck. Best regards, Khiraly Whats the status using a current version of xorg? Closing this bug due to the lack of activity. If the problem still persists, please reopen the bug. I get this using FC5 trying to run mplayer, still... X11 error: BadAlloc (insufficient resources for operation)7.7% 2 0 0% 2 years and still not fixed? :x I'm suffering this with my ati mach64 card; can only view videos with mplayer by using -vf scale=320:240. If I try a bit higher xv resolution, it crashes. The card (3d rage II pro DVD) is supposed to be capable of lots more, and the screen resolution is only set at 800x600x24. 2.6.17-1.2139_FC5: After repeated uninstall/install of kmod-fglrx & ATI fglrx drivers (beginning with kernel 2133,) my tvtime has begun to display this behaviour, whereas it had not before. Now, when I move tvtime from Monitor1 to Monitor0 on my Xinerama non-clone Xorg 7.0.0 desktop, I get: Cannot allocate enough off-screen video memory. This may be fixed by: 1. Closing or restarting large X applications. 2. Lowering the input width of tvtime (--inputwidth parameter). 3. Lowering your colour depth or highest configured resolution. 4. Increasing the amount of video memory in your X config file (for example, if you are using the i810 XFree86 driver.) See http://tvtime.net/ for more information. Thank you for using tvtime. The reason for the cyclic install / uninstall cycle is a non-functional DRI configuration, so my Xorg.0.log reflects that. I believe this is unrelated however. Can't post Xorg.o.log due to comment length restrictions (In reply to comment #51) > Can't post Xorg.o.log due to comment length restrictions Just attach your comment as an attachment to the bug Hi! I'm also getting this error when using any media player which utilize xv to play for example a DVD: X11 error: BadAlloc (insufficient resources for operation)?,?% 0 0 However, I can play low-res videos with xv. The un-accelerated x11 driver always works. Regards Christian Created attachment 7892 [details]
Xorg.0.log for version 7.1.1
X Window System Version 7.1.1
Release Date: 12 May 2006
X Protocol Version 11, Revision 0, Release 7.1.1
Build Operating System: UNKNOWN
Current Operating System: Linux acer 2.6.18-suspend2 #29 Fri Nov 17 09:59:49
CET
2006 i686
Build Date: 07 November 2006
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future. Will try to close this bug since the original issue seems fixed. Please open _separate_ bugs describing your specific case even if you think that you are bitten by this bug. Given the state of this bug, it much more probable to get your issue fixed that way. (In reply to comment #56) > Please open _separate_ bugs describing your specific case even if you think > that you are bitten by this bug. Given the state of this bug, it much more > probable to get your issue fixed that way. And please post the bug number here after doing that -- so that we can avoid filing duplicate bugs. |
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.