Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 213841 - x11-base/xorg-server with EXA makes firefox (and others) crash with BadAlloc
Summary: x11-base/xorg-server with EXA makes firefox (and others) crash with BadAlloc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 212799 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-18 15:57 UTC by Alexandre Ghisoli
Modified: 2008-10-29 14:40 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Ghisoli 2008-03-18 15:57:09 UTC
I've updated my Thinkpad X40 to x11-drivers/xf86-video-i810-2.2.1, but FireFox is crashing on the folowing website :
https://cs.directnet.com/dn/c/cls/auth?language=fr

I've see few website making crash, but I havent saved the URL.


Here is the error message :
No running windows found
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 8693 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.)
firefox-bin exited with non-zero status (1)

Reproducible: Always

Steps to Reproduce:
1.Open firefox from a shell
2. Browse https://cs.directnet.com/dn/c/cls/auth?language=fr
3. Crash

Actual Results:  
Crash

Expected Results:  
A working browing

I was able to workaround this bug with 2 options : 

Downgrade to x11-drivers/xf86-video-i810-2.1.1

Use this in my xorg.conf :
Option          "AccelMethod"   "XAA"
Comment 1 Alexandre Ghisoli 2008-03-18 15:58:33 UTC
In fact, the two workaround are OR'ed. I mean stay with x11-drivers/xf86-video-i810-2.2.1 and the xorg.conf fixe or use the -2.1.1.

Sorry for the confusion
Comment 2 Alexandre Ghisoli 2008-04-06 15:54:01 UTC
Same bug appear on tested 2.2.99.901

Chip :
Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
        Subsystem: IBM Unknown device 0557
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at e0000000 (32-bit, prefetchable) [size=128M]
        Memory at d0000000 (32-bit, non-prefetchable) [size=512K]
        I/O ports at 1800 [size=8]
        Capabilities: [d0] Power Management version 1

Comment 3 Rémi Cardona (RETIRED) gentoo-dev 2008-04-07 06:18:00 UTC
Yeah, I can reproduce this bug on my i855GM too with firefox-bin-3_beta5.

This is more likely a firefox bug. Firefox likes to think of video memory as a pool of unlimited memory where it can allocate all the pixmaps it wants. In theory, firefox should check for BadAlloc when using the Xlib but obviously, it doesn't.

Maybe it's a different bug, but since I really don't know how to debug Firefox, I can't really say for sure. I do use firefox daily, but it is one of the apps that cause a lot of problems on X11.

I'll keep tracking this bug, because I've hit it in the past, but on the side of the Intel driver there's really nothing more to be done, unless a stack trace or something else could prove that the driver is doing something wrong.

Thanks
Comment 4 Alexandre Ghisoli 2008-04-07 11:43:36 UTC
(In reply to comment #3)

> This is more likely a firefox bug. Firefox likes to think of video memory as a
> pool of unlimited memory where it can allocate all the pixmaps it wants. In
> theory, firefox should check for BadAlloc when using the Xlib but obviously, it
> doesn't.

I really suspect something in the i810 driver, because changing the rendering method  gives better results (XAA vs EXA) and it *was* working pre -2.2.0 series.

And it seems that other apps can be impacted by this error (I cannot stay without browser so i've not see any other errors right now)

Xv as errors reported as well :
https://bugs.freedesktop.org/show_bug.cgi?id=2772

and wine :
https://bugs.freedesktop.org/show_bug.cgi?id=13779

> I'll keep tracking this bug, because I've hit it in the past, but on the side
> of the Intel driver there's really nothing more to be done, unless a stack
> trace or something else could prove that the driver is doing something wrong.

Hum, I dont know how to get a full trace here, since it die out of firefox and we should debug the driver itsef.


Comment 5 Alexandre Ghisoli 2008-04-07 11:49:42 UTC
It still crash on i810 2.2.99.902 as well. Working ok if using XAA (not EXA).
Comment 6 Rémi Cardona (RETIRED) gentoo-dev 2008-04-07 15:25:07 UTC
(In reply to comment #4)
> I really suspect something in the i810 driver, because changing the rendering
> method  gives better results (XAA vs EXA) and it *was* working pre -2.2.0
> series.

Pre 2.2.0, EXA had to be enabled by default, that could explain that issue. And before 2.2.0, EXA didn't really do much in the Intel driver.

> And it seems that other apps can be impacted by this error (I cannot stay
> without browser so i've not see any other errors right now)
> 
> Xv as errors reported as well :
> https://bugs.freedesktop.org/show_bug.cgi?id=2772
> 
> and wine :
> https://bugs.freedesktop.org/show_bug.cgi?id=13779

Yep, these do look similar. I'd say those apps try to allocate a biiig pixmap and the driver returns BadAlloc.

> Hum, I dont know how to get a full trace here, since it die out of firefox and
> we should debug the driver itsef.

True, but we should know what Firefox is really trying to do, that would be a big help for upstream devs. Could you try using EXA but also disabling the Render extension?

Adding this should be enough :

Section "Extensions"
    Option         "RENDER" "false"
EndSection

My other advice is to open a bug on freedesktop's bugzilla with this nifty url that crashes firefox instantly, that's a huge help for debugging and I'm sure upstream devs will be able to identify the issue quickly (maybe not fix it, but at least know what's happening)

Upstream devs will probably ask you to read this document http://intellinuxgraphics.org/how_to_report_bug.html

If you do file a bug upstream, please paste the URL here so I can track it too.

Thanks a lot for not giving up :)
Comment 7 Alexandre Ghisoli 2008-04-07 21:33:51 UTC
(In reply to comment #6)

> My other advice is to open a bug on freedesktop's bugzilla with this nifty url
> that crashes firefox instantly, that's a huge help for debugging and I'm sure
> upstream devs will be able to identify the issue quickly (maybe not fix it, but
> at least know what's happening)
> 
> Upstream devs will probably ask you to read this document
> http://intellinuxgraphics.org/how_to_report_bug.html
> 
> If you do file a bug upstream, please paste the URL here so I can track it too.
> 
> Thanks a lot for not giving up :)
> 

I'm not able to get a meaningfull gdb for the FireFox crash (even a break on gdk_x_error), it crash without BT information (yes, I've compiled FF with debug symbols).

It seems to be related to exa itself, not i810 driver. It seems to be fixed in
xorg commit :
http://cgit.freedesktop.org/xorg/xserver/commit/?id=bc2d516f16d94c805b4dfa8e5b9eef40ff0cbe98


More info on the bug here.
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/205599

The URL pointed out in comment from Tawsi (2008-03-26) crash my FireFox session 100% of the time.
So, the xorg git commit seems to have fixed it (not tested right now).

There is a discussion on the ML about :
http://lists.freedesktop.org/archives/xorg/2007-June/025579.html

And the debian bug : 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=471782

It seems to be a quite common bug, but I dont know how to check witch versions on Xorg are affected, and how to test it.

Thanks for your support,
Comment 8 Rémi Cardona (RETIRED) gentoo-dev 2008-04-08 06:10:55 UTC
Donnie,

The fix for this bug applies on top of xorg-server, can I apply to 1.4.0.90 (creating a -r4 in the process) ?

Thanks
Comment 9 Rémi Cardona (RETIRED) gentoo-dev 2008-04-08 08:48:40 UTC
*** Bug 212799 has been marked as a duplicate of this bug. ***
Comment 10 Donnie Berkholz (RETIRED) gentoo-dev 2008-04-08 17:51:54 UTC
(In reply to comment #8)
> Donnie,
> 
> The fix for this bug applies on top of xorg-server, can I apply to 1.4.0.90
> (creating a -r4 in the process) ?

Just putting what I said on IRC here as well ... a number of bugs assigned to x11@ have the Inclusion keyword. They should all be evaluated for inclusion. One option is applying a patch to the latest git of the 1.4 branch, and then cherrypicking other patches as needed.
Comment 11 Donnie Berkholz (RETIRED) gentoo-dev 2008-05-09 08:24:54 UTC
I pulled this patch into my local 1.4 branch and requested that upstream take it.
Comment 12 Rémi Cardona (RETIRED) gentoo-dev 2008-10-29 14:40:20 UTC
Fixed with xorg-server 1.4.1 and newer.

Thanks