7

Important:

Several SuperUser regulars are currently trying to narrow down the scope and cause of this issue. We are currently seeking willing volunteers to fill out the form here after performing the following test:

  1. Install or start a recent version of Firefox (say, 24.x or 25.x; beta would be interesting too).

  2. Watch memory and CPU usage using your platform's equivalent of the Windows Task Manager. You should have the appropriate task manager open before you open the link below.

  3. Save any unfinished work in your Firefox browser, as it may crash. We take no responsibility for any lost information.

  4. Open the following link in a new tab: http://openclipart.org/people/GR8DAN/showbizframe.svg

  5. Observe the changes in CPU and memory usage of the Firefox process before and after loading the image. If the difference between Firefox's memory usage before and after opening the above tab is very significant (1 GB or more), or if Firefox freezes/crashes, or if you see sustained high CPU usage, your system has the bug. Otherwise, you do not have the bug. In either case, fill out the form accordingly.

We are trying to narrow down the symptoms and cause in order to update a bug on the Mozilla bug tracker so that the Mozilla developers might resolve the problem. We are doing this specifically because this is potentially a wide-ranging, high-priority issue; any websites that allow image embedding could be vulnerable to a Denial of Service attack against a significant subset of users visiting the page, if this starts to be used maliciously.

Update 11/29/2013: The bug has been isolated to the following:

  • It's platform-independent. The bug has been reproduced on Linux, Mac, and Windows.

  • The problem has been reproduced with AMD, Intel, and Nvidia graphics cards.

  • It only occurs on Firefox and derivatives. Chrome, IE, Opera are not impacted.

  • The problem has been produced on Firefox 25.0.1, Firefox 26 Beta, Firefox 27 Alpha, and the Nightly build of the trunk as of 11/28/2013.

  • Not all users are experiencing a Firefox crash or a system-wide Out of Memory (OOM) situation. This behavior appears limited to GNU/Linux systems with 4 GB of RAM or less.

  • On Firefox 27 Alpha and Nightly, the behavior differs slightly from Firefox 25 and 26 Beta: on the newer two versions, high CPU and memory consumption will eventually settle down if you let the image load for an extended period of time (10 to 20 seconds on most systems). Once it's "settled", memory and CPU conditions return to normal. But on the older two releases, the CPU and memory conditions persist as long as you are switched to the tab with the offending image being rendered, or until you kill Firefox entirely, or close the tab.

  • Almost all systems with recent graphics drivers can reproduce it. We only have one system on file that doesn't experience any symptoms whatsoever, and it's using an extremely old graphics driver (about 3 years). This indicates that it isn't any specific hardware, but rather, there is a bug in the very old driver that was used which, oddly enough, prevents the defective behavior from occurring.

Original Question:

I'm using Firefox firefox-25.0-3.fc19.x86_64 on Fedora 19 (kernel 3.11.9-200.fc19.x86_64). If I open this link using firefox, my system becomes unresponsive. Running htop on a second monitor shows a massive spike in memory usage, my 3954 MB of RAM gets all used up immediately, then the swap gets slowly filled, one of the processor's usage goes up to 100%, then the system becomes unresponsive, the mouse becomes slow, htop takes dozens of seconds to refresh, etc. If I kill the FF process everything goes back to normal.

Even if restarting FF in safe mode with plugins disabled the behavior is the same. I tried my coworker's machine and it has ~8000 MB RAM, the same happens (high memory usage and 1 processor reaches 100%), when it reaches ~4096 MB usage, a dialog pops up asking to kill firefox (maybe firefox is hardcoded to use only 4096 MB?).

If I use a plugin (quickjava) to disable javascript, I can open the link without the issue. However on my coworker's machine this won't work: I tried other sites to ensure JS was disabled, but the issue persists.

What is causing it?

UPDATE: The issue arises when viewing this SVG.

  • IMO it is Firefox. Have you tried Chrome / Chromium? – Austin T French Nov 27 '13 at 14:38
  • My processor is an AMD Phenom(tm) II X2 550 Processor, my friend's an Intel Core i7 – That Brazilian Guy Nov 27 '13 at 14:46
  • Currently being troubleshooted in Root Access – allquixotic Nov 27 '13 at 14:47
  • I have AMD 965 BE @ 4.0 Ghz, 12GB of RAM and certain sites are dog bad at locking up in Firefox (newer FF releases are worse than say 11 or older) and Chrome or IE 10 does fin. – Austin T French Nov 27 '13 at 14:48
  • it did freeze my FF. Machine is a Asus x54hr, core i3 / 4GB RAm / 2GB dedicated graphics card / cpu rises on 1 core to 100% / RAM usage escalates to 80% usage. had to killall firefox . OS is Manjaro Linux. – Lorenzo Von Matterhorn Nov 29 '13 at 0:35
3
  1. It's not JavaScript; it's the fact that there are many complex Scalable Vector Graphics (SVG) files being rendered by the link you posted.
  2. Fedora's hardware-accelerated graphics stack is notoriously buggy, so it is quite possible that Firefox's use of the graphics stack is causing a bug in the graphics stack (in Mesa, the Xorg DDX, or the kernel).
  3. It is also possible that the SVGs are being rendered actually in software and the software renderer is still buggy.

Let's divide and conquer:

Disable Hardware Acceleration

In FF, go to Edit -> Preferences, click Advanced, then under the General tab, in the Browsing section, uncheck "Use hardware acceleration when available".

Now try the same site again. If you don't get CPU/memory overload, then we know that the problem is either in the 2D Canvas GPU acceleration (either Firefox's use of it, or in the backend graphics stack), or in the SVG renderer.

If you do get the same CPU/memory overload with hardware accel disabled, then it could be a bug in the SVG parser, which is probably done in pure software. Although, in that case, we would probably experience the problem on Windows as well, but we aren't (tested on FF 24.1.0 on Windows and it was slow, but not consuming all CPU and RAM like yours).

I suspect some kind of memory leak in Mesa.

A few more things to try

  1. Go to about:support in Firefox, click "Copy text to clipboard", and post that here (pastebin or so). This will help those of us familiar with the problem-space to determine what the situation is with your hardware and your graphics stack.
  2. Go to about:memory in Firefox, check the "Verbose" checkbox, then click "Measure". It would be awesome if you could do this just after you go to the offending page -- if you're able to get FF to do anything at that time.
  3. Run Firefox from the terminal as follows: LIBGL_DEBUG=verbose firefox -safe-mode. Navigate straight to the site that OOMs. Let it run for just a few seconds (enough to clearly start the problem, but don't let it overwhelm your system) then kill it. Post the output here, along with the output of dmesg.

These things will give us more debug info to understand exactly where the problem is, but most of these steps are focused around the assumption that the problem is in the graphics stack. If it isn't, most of this won't be helpful.

Update: I created a raw github link that has no javascript or any tomfoolery whatsoever; it's just a laundry list of SVGs. It should crash if you have the defective behaviour, and it eliminates all other possible sources of the problem.

Update 2: The OP isolated the problem to this specific image.

  • If I disable the hardware accelleration, it still consumes all memory and CPU. The about:support output is pastebin.com/JTDRzZXG. It is impossible to click "measure", the memory is eaten too fast. The debug envvar outputs no message (with or without hw accell), and dmesg gets no new messages. – That Brazilian Guy Nov 27 '13 at 17:08
  • @allquixotic I can load and watch perfectly the trouble image from Kubuntu, Debian, Arch Linux, Mac OS. So it looks quite likely it is something Fedora-specific. – MariusMatutiae Nov 27 '13 at 18:11
  • @MariusMatutiae can you please let us know what your graphics card make and model is? thanks! come to Root Access if you want to help more. – allquixotic Nov 27 '13 at 18:49
  • @MariusMatutiae It is, definitely, not Fedora specific. Various regular chat users have reported the bug on Windows and various linux distros. Please help us by filling the form here to help track the bug, thanks! – That Brazilian Guy Nov 27 '13 at 19:20
  • k, I use chromium, that's why – MariusMatutiae Nov 27 '13 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.