Page 1 of 1

Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Sun Nov 22, 2015 9:16 am
by amloessb
Hello,

I'm having an issue where NoScript, in conjunction with KeeFox and a specific configuration of Classic Theme Restorer (having the address bar on a second toolbar) causes Firefox to have issues when opening pop-up windows with no toolbars. When clicking a link that opens a pop-up, Firefox's CPU usage jumps to 15% and stays there, and the RAM usage starts steadily increasing. This continues even if you close the pop-up window.

Image

Continuing to browse under such conditions results in general slowness, especially when scrolling, entering text, or closing tabs. Eventually (and especially if multiple pop-up windows are triggered), Firefox's GUI stops responding to mouse input altogether, although Windows does not mark it as "Not Responding".

System information:
  • Intel Core i7-4790K (8 logical cores)
  • Windows 8.1 (64-bit)
  • Firefox 42.0
Steps to reproduce:
  1. Create a new Firefox profile
  2. Install the following addons
  3. Set up the toolbars
    1. Right-click on toolbar > Additional Toolbar
    2. Right-click on toolbar > Customize...
    3. Drag the address bar to the second toolbar
  4. Save this code as a .html file, open it, allow scripts on the page, and click the link:

    Code: Select all

    <html>
    	<head>
    		<title>Let's break Firefox!</title>
    	</head>
    	<body>
    		<script type="text/javascript">
    			function popUp(URL,w,h) { 
    				window.open(URL,"_pu"+(Math.random()+"").replace(/0\./,""),"toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+w+",height="+h+",left="+((screen.width-w)/2)+",top="+((screen.height-h)/2));
    				return false;
    			}
    		</script>
    		<p>
    			Prerequisites to break:
    			<ul>
    				<li><strong>NoScript 2.6.9.39</strong> (be sure scripts are allowed on this page)</li>
    				<li><strong>KeeFox 1.5.3 (or 1.5.4beta1)</strong> (no need to actually have a KeePass archive open)</li>
    				<li><strong>Classic Theme Restorer 1.4.3 (or 1.4.4beta2)</strong> with the address bar on a second toolbar:
    					<ol>
    						<li>Right-click on toolbar > <em>Additional Toolbar</em></li>
    						<li>Right-click on toolbar > <em>Customize...</em></li>
    						<li>Drag the address bar to the second toolbar</li>
    					</ol>
    				</li>
    			</ul>
    		</p>
    		<p>
    			<a href="#" onclick="return popUp('about:blank',350,320)">Click to break!</a>
    		</p>
    	</body>
    </html>
    
The "popUp" Javascript code is lifted directly from the website where I first noticed this issue.

Posts on other add-ons' forums: Thanks in advance for your help!

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Sun Nov 22, 2015 2:10 pm
by barbaz
After it gets to the point that it hangs, can you deliberately crash the hanged Firefox and submit a crash report?
(I don't know how to do this on Windows, but on Unix systems kill it with SIGABRT. If it has child processes then kill the parent process.)

@therube, can you please post instructions for Windows?

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Fri Dec 11, 2015 11:33 pm
by amloessb
My apologies for my delay in responding; I was out of town for a while and away from my primary computer.

I have not yet been able to replicate the complete hang I was experiencing before, but the proof-of-concept code that I posted still produces the high CPU usage and general slowdown and lag in the browser. I have manually crashed Firefox using crashfirefox.exe while the bug was occurring:
Please let me know if there's anything else I can do to assist. Thanks.

P.S.: Here's what the Threads view of Process Explorer looked like just prior to me manually crashing it:

Image

P.P.S.: Still occurs with NoScript 2.7, KeeFox 1.5.4.

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Sat Dec 12, 2015 12:47 am
by barbaz
That sounds from the crash report like it might actually be a Firefox bug exposed by that combination of addons? Image

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Sat Dec 12, 2015 4:23 am
by amloessb
Which part of the report, specifically, makes you think that?

If that's the case, I can open a bug with FF as well, and point to this crash data.

Thanks.

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Sat Dec 12, 2015 3:28 pm
by therube
Nvidia driver, so does the issue persist if you disable Hardware Acceleration in FF (& then restart FF)?

Any change if you restart your computer in Safe Mode with Networking?
Or otherwise disable your A/V (Norton)?

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Sat Dec 12, 2015 5:38 pm
by barbaz
amloessb wrote:Which part of the report, specifically, makes you think that?
I'm just looking at those related bugs and making a guess...

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Sat Dec 12, 2015 11:15 pm
by amloessb
therube wrote:Nvidia driver, so does the issue persist if you disable Hardware Acceleration in FF (& then restart FF)?

Any change if you restart your computer in Safe Mode with Networking?
Or otherwise disable your A/V (Norton)?
Unfortunately, no to all three, the issue is reproducible in each of those cases.
barbaz wrote:
amloessb wrote:Which part of the report, specifically, makes you think that?
I'm just looking at those related bugs and making a guess...
I believe the "related bugs" are populated based on the crash signature, so I don't think they would be helpful, given that I manually crashed Firefox using a tool, rather than the bug itself causing the crash. Put another way, I would imagine that the crash signatures for all manually-induced crashes are similar, and therefore would show up in the "related bugs."

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Sun Dec 13, 2015 12:11 am
by barbaz
amloessb wrote: I would imagine that the crash signatures for all manually-induced crashes are similar,
No they're not. If it worked this way then manually crashing Firefox would be pointless and no one would ask you to do that as part of troubleshooting a hang.

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Thu Dec 31, 2015 4:53 am
by amloessb
barbaz wrote:
amloessb wrote: I would imagine that the crash signatures for all manually-induced crashes are similar,
No they're not. If it worked this way then manually crashing Firefox would be pointless and no one would ask you to do that as part of troubleshooting a hang.
Well, I'm not a Firefox developer, so I won't argue any further about the usefulness of the specific crash signature w.r.t. this specific issue.

I would, however, like to know if any of the NoScript developers can replicate the problems I have detailed above using the stated procedure, and if so, if they can tell anything about its cause. If it does, indeed, turn out to be a bug on the Firefox side, I'm fine with opening a bug in Bugzilla and taking it from there, but I'd like to have some more information to give to them than just "this weird thing happens, and I don't know why."

Thanks.

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Thu Dec 31, 2015 5:52 pm
by barbaz
amloessb wrote:I would, however, like to know if any of the NoScript developers
Giorgio Maone is the only NoScript developer. I will try to bring this to his attention.

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Thu Dec 31, 2015 6:23 pm
by Giorgio Maone
Thanks barbaz for notifying me. I'm traveling right now, but I'm gonna look into this first thing next week.
Happy new year everybody :)

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Sat Jan 02, 2016 1:06 am
by amloessb
Thanks, and happy new year to you all as well!

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Mon Jan 04, 2016 12:11 pm
by Giorgio Maone
Should be fixed in latest dev build 2.9.0.1rc1, thank you.

Re: Add-on interaction problems: NoScript, KeeFox, and CTR

Posted: Tue Jan 05, 2016 6:50 am
by amloessb
Thanks for the quick fix! It looks good so far, but I'll let you know if I encounter any issues.