Extremely major all-browser javascript memory leak issue

Starting a couple days ago, the browser i was using (chrome) started getting into weird memory leak situations where the CPU would max out, and ram usage would climb infinitely. I switched to safari -> problem continued. I took the security/software updates to safari that i was holding off on -> problem continued. I reset safari ( safari itself is vanilla with no extensions) -> problem continues. This problem occurs on a vast majority of websites. Next i tried firefox which again had this same issue, however firefox was able to pinpoint the issue to javascript


Error dialog:

"A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.


Script: http://www.facebook.com/plugins/like.php?href=http://www.kriesi.at/archives/50-w ebsites-that-make-amazing-use-of-javascript&layout=standard&show_faces=true&widt h=450&action=like&font=arial&colorscheme=light&height=80:204"


Sure enough, disabling javascript on my various browsers allowed me to browse properly again... other than having no javascript support, which is a huge issue at times. Typically, when i enter a problematic site, what occurs is, my RAM usage starts spiking up and along with it the processor maxes out. How fast this occurs depends on the website, sometimes in a matter of seconds the browser is rendered unresponsive, and sometimes it takes around a minute before im completely frozen. Looking at activity monitor shows that the RAM usage can just continue indefinitely. In safari this comes in the form of the "Safari web content" whereas in chrome, looking at it's internal task manager the window containing the offending tabs grows in size/usage.


http://www.kriesi.at/archives/50-websites-that-make-amazing-use-of-javascript

This link is one i picked out that has near instantaneous effect, and the javascript seems to be related to the LIKE button (well, the error dialog from FF above shows it coming from like.php). This is the case in some other places as well.


Ran a bunch of onyx stuff to clean out my system, did permissions, reset caches, did updates. Only turning off JS avoids the issue, but that is problematic since some sites i visit often cannot function properly without it. Any ideas?


OSX 10.6.8

iMac 2.66GHz core 2 duo

2GB 800Mhz DDR2 SDRAM

Safari-OTHER, Mac OS X (10.6.8)

Posted on Mar 1, 2012 3:40 PM

Reply
7 replies

Mar 1, 2012 4:25 PM in response to Carolyn Samit

How is getting ram going to help when having 20 tabs open a week ago took at most 1GB of ram on a browser, and right now opening a single page with a javascript will max my ram and continue increasing it until everything freezes. Considering the rate at which this happens on some pages, id say adding 4GB of ram will last me a good 10 seconds before im frozen again.

Mar 2, 2012 1:26 PM in response to DPSSFD

A few notes:

• one of the computers I tested had 8GB of memory.

• The stalled script seems to always point back to FaceBook (example: Script:http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.abcya.com%2F&layo ut=button_count&show_faces=false&width=100&action=like&font=arial&layout=button_ count:204

• Browsers lock up and may sometimes free themselves briefly

• Looking at activity monitor 'Safari Web Content' process on the computer with 8GB filled up all free memory

• Quiting 'Safari Web Content' process allowed the pages to start to reload but would soon freeze up again

• Unblocking FaceBook did not appear to fix the issue (we origianlly blocked FaceBook at the firewall)

• Thought maybe FaceBook started a new ad campaign that was causing the problem because we blocked FaceBook

Mar 12, 2012 9:06 AM in response to DPSSFD

DPSSFD Wrote:


"Added a glimmerblock filter against their domain (ie FaceBook) and the problem is gone"


I tested with GlimmerBlock while adding a filter to FaceBook and it does fix the problem for us.


Still do not know why faulty FaceBook scripts added to websites causes this issue. Though my research shows it happening on both windows and mac platforms. And on the mac our three main browsers Safari, FireFox and Chrome are all affected.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Extremely major all-browser javascript memory leak issue

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.