Page 1 of 1
NoScript causes 100% CPU on FreeBSD Firefox 3.6.8
Posted: Wed Aug 25, 2010 8:19 pm
by MightyD
I'm running Firefox 3.6.8 on FreeBSD 8.0 built out of ports from a brand new profile, where all I've done is install NoScript as an add-on. Once firefox restarts, it begins to consume 100% CPU time.
Looking real quick at the output of ktrace...here's what firefox is doing:
Code: Select all
80110 firefox-bin CALL gettimeofday(...
80110 firefox-bin RET gettimeofday 0
80110 firefox-bin CALL gettimeofday(...
80110 firefox-bin CALL gettimeofday(...
80110 firefox-bin RET gettimeofday 0
80110 firefox-bin CALL poll(...,0x2,0x3e7fc18)
80110 firefox-bin RET poll 1
I don't know if this helps at all. I have the entire idea isolated here as a testbed. Please let me know if there is anything I can do to help debug this, I'm not afraid of complex ideas. Thanks in advance.

Re: NoScript causes 100% CPU on FreeBSD Firefox 3.6.8
Posted: Fri Sep 10, 2010 7:55 am
by guido
I can confirm that this also happens on Firefiox 3.5.12. The only noscript version that seems not to have this problem is version 1.10. Note that even when I start Firefox with a blank page, with all add-ons disabled except noscript, I get 100% cpu.
Re: NoScript causes 100% CPU on FreeBSD Firefox 3.6.8
Posted: Fri Sep 10, 2010 9:07 am
by Giorgio Maone
Do you manage to use the UI?
If so, could you try disabling the "WAN IP belongs to LOCAL" option from
NoScript Options|Advanced|ABE?
If you can't, please start in safe mode and set the
noscript.ABE.wanIpAsLocal about:config preference to false, then restart the browser normally.
Re: NoScript causes 100% CPU on FreeBSD Firefox 3.6.8
Posted: Mon Sep 13, 2010 7:09 am
by guido
I disabled this option and after I restart Firefox, the CPU is back to normal (read: no longer 100%cpu).
Can you please explain why this "solved" the problem? From my understanding of the meaning of WAN-IP in local, is that it should not result in 100% cpu...
Thanks!
Re: NoScript causes 100% CPU on FreeBSD Firefox 3.6.8
Posted: Mon Sep 13, 2010 7:29 am
by Giorgio Maone
guido wrote:Can you please explain why this "solved" the problem?
I must confess I've got no idea.
I guessed it could be this because of the version window you gave me (the only major change was this feature) and the trace, which hinted at a timed network activity.
guido wrote:
From my understanding of the meaning of WAN-IP in local, is that it should not result in 100% cpu...
It shouldn't, in fact, and it doesn't on the "officially" supported platforms.
It may be a bug in the OS-specific networking code (either at Firefox's or the TCP stack's level), which makes the asynchronous XHR requests sent by NoScript to your router's WAN IP every 5 minutes to cause an infinite poll loop under some circumstances (e.g. if said IP is unreachable or actively refuses connections).
Re: NoScript causes 100% CPU on FreeBSD Firefox 3.6.8
Posted: Mon Sep 13, 2010 8:35 am
by guido
The Firefox I'm using is on a laptop. When I use it at home I do not have the problem. There I have a NATted network behind a FreeBSD based firewall. At work, I do have the problem. The firewall is almost identical. The only difference is that the IP adres there is part of an announced /28, so not NATting there. Perhaps the problem lies in the fact that the detected WAN IP address equals that of my laptop?
Re: NoScript causes 100% CPU on FreeBSD Firefox 3.6.8
Posted: Mon Sep 13, 2010 8:41 am
by Giorgio Maone
guido wrote:The Firefox I'm using is on a laptop. When I use it at home I do not have the problem. There I have a NATted network behind a FreeBSD based firewall. At work, I do have the problem. The firewall is almost identical. The only difference is that the IP adres there is part of an announced /28, so not NATting there. Perhaps the problem lies in the fact that the detected WAN IP address equals that of my laptop?
It might be. What does happen if you open http://[your ip here] in Firefox, exactly?
Re: NoScript causes 100% CPU on FreeBSD Firefox 3.6.8
Posted: Mon Sep 13, 2010 8:53 am
by guido
Hmm..weird..It seems to hang, trying to connect ("Loading on the tab; Connecting to XX.XX.XX.XX on the bottom line), but a tcpdump reveils the host does send an RST. Same on port 443.
Re: NoScript causes 100% CPU on FreeBSD Firefox 3.6.8
Posted: Mon Sep 13, 2010 9:11 am
by Giorgio Maone
guido wrote:Hmm..weird..It seems to hang, trying to connect ("Loading on the tab; Connecting to XX.XX.XX.XX on the bottom line), but a tcpdump reveils the host does send an RST. Same on port 443.
What do you mean by "hang"?
How's the CPU usage?
How long does it take to timeout?
Re: NoScript causes 100% CPU on FreeBSD Firefox 3.6.8
Posted: Mon Sep 13, 2010 10:04 am
by guido
CPU is 100%, timeout is long, certainly more than 2 minuts. When I telnet to port 80, I get an imediate response (connection refused), so it seems to be caused inside firefox.
Re: NoScript causes 100% CPU on FreeBSD Firefox 3.6.8
Posted: Mon Sep 13, 2010 10:14 am
by Giorgio Maone
guido wrote:CPU is 100%, timeout is long, certainly more than 2 minuts. When I telnet to port 80, I get an imediate response (connection refused), so it seems to be caused inside firefox.
Yes, looks like a Firefox bug: CPU should never go 100% on simple network / wait activity, which should be offloaded asynchronously.
Can you file a bug on
https://bugzilla.mozilla.org ?
No need to mention NoScript (it would make reproducing more complicated), just report the 100% CPU when opening your address (and any other address which have no responding web server?)
Re: NoScript causes 100% CPU on FreeBSD Firefox 3.6.8
Posted: Mon Sep 13, 2010 10:55 am
by guido
Of course I wont mention NOScript

Filed as bug 595823. Thanks for your effort!