Opened 14 months ago

Last modified 2 months ago

#23719 needs_information defect

Make sure WebExtensions are spared from JIT disabling in higher security settings (Medium-High)

Reported by: cypherpunks Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Major Keywords: tbb-performance
Cc: fdsfgs@… Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

This could for example negatively affect HTTPS Everywhere's performance. I have however no data on whether JIT is disabled for WebExtensions in this case.

Child Tickets

Change History (10)

comment:1 Changed 13 months ago by tokotoko

Cc: fdsfgs@… added

comment:2 Changed 12 months ago by cypherpunks

Keywords: ff59-esr added

comment:3 Changed 12 months ago by cypherpunks

Keywords: tbb-performance added; ff59-esr removed
Severity: NormalMajor

I just confirmed it, at Medium-High security setting, JIT is disabled for WebExtensions resulting in lower performance.

comment:4 Changed 5 months ago by cypherpunks

Can this be given a higher prio? It's seems to severely affect my browsing as some tabs take a while to even start loading with Safer-Safest (seems related to NoScript doing its work).

comment:5 in reply to:  4 ; Changed 5 months ago by gk

Status: newneeds_information

Replying to cypherpunks:

Can this be given a higher prio? It's seems to severely affect my browsing as some tabs take a while to even start loading with Safer-Safest (seems related to NoScript doing its work).

Is that reproducible (e.g. by loading a particular URL)? I am curious where the NoScript relation is coming from.

comment:6 in reply to:  5 ; Changed 5 months ago by cypherpunks

Replying to gk:

Is that reproducible (e.g. by loading a particular URL)? I am curious where the NoScript relation is coming from.

Thanks for taking interest in this. It's a bit difficult to reproduce immediately but sometimes when I'm on a page and I ctrl+click on a link so that it opens in a new tab, the cpu usage gets to 100% on one core for about 10sec and it's taking 20sec or so just to starting loading up the page, from the browser console I see NoScript doing its thing (i.e. the CSP hack) during that time. (on 8.0a9 of course) It doesn't happen always so it's difficult to give clear ways to reproduce other than "just browse with safer security setting and ctrl+click on links".

comment:7 in reply to:  6 ; Changed 5 months ago by gk

Replying to cypherpunks:

Replying to gk:

Is that reproducible (e.g. by loading a particular URL)? I am curious where the NoScript relation is coming from.

Thanks for taking interest in this. It's a bit difficult to reproduce immediately but sometimes when I'm on a page and I ctrl+click on a link so that it opens in a new tab, the cpu usage gets to 100% on one core for about 10sec and it's taking 20sec or so just to starting loading up the page, from the browser console I see NoScript doing its thing (i.e. the CSP hack) during that time. (on 8.0a9 of course) It doesn't happen always so it's difficult to give clear ways to reproduce other than "just browse with safer security setting and ctrl+click on links".

Is that on Windows? Or Linux? Or...

comment:8 in reply to:  7 Changed 5 months ago by cypherpunks

Replying to gk:

Is that on Windows? Or Linux? Or...

Yeah Linux.

comment:9 Changed 5 months ago by cypherpunks

Maybe it has nothing to do with JIT after all (though that doesn't mean that this ticket shouldn't be addressed) but such relief came when ye finally catch the fish:

[NoScript] Cannot collect noscript activity data Error: Could not establish connection. Receiving end does not exist.
Stack trace:
collectSeen@moz-extension://[NoScript's UUID]/bg/main.js:265:38
 Could not establish connection. Receiving end does not exist. collectSeen@moz-extension://[NoScript's UUID]/bg/main.js:265:38
  log.js:12:5
	error moz-extension://[NoScript's UUID]/lib/log.js:12:5
	collectSeen moz-extension://[NoScript's UUID]/bg/main.js:274:10
[NoScript] Cannot collect noscript activity data Error: Could not establish connection. Receiving end does not exist.
Stack trace:
collectSeen@moz-extension://[NoScript's UUID]/bg/main.js:265:38
 Could not establish connection. Receiving end does not exist. collectSeen@moz-extension://[NoScript's UUID]/bg/main.js:265:38
  log.js:12:5
	error moz-extension://[NoScript's UUID]/lib/log.js:12:5
	collectSeen moz-extension://[NoScript's UUID]/bg/main.js:274:10
[NoScript] Cannot collect noscript activity data Error: Could not establish connection. Receiving end does not exist.
Stack trace:
collectSeen@moz-extension://[NoScript's UUID]/bg/main.js:265:38
 Could not establish connection. Receiving end does not exist. collectSeen@moz-extension://[NoScript's UUID]/bg/main.js:265:38
  log.js:12:5
	error moz-extension://[NoScript's UUID]/lib/log.js:12:5
	collectSeen moz-extension://[NoScript's UUID]/bg/main.js:274:10
[NoScript] Cannot collect noscript activity data Error: Could not establish connection. Receiving end does not exist.
Stack trace:
collectSeen@moz-extension://[NoScript's UUID]/bg/main.js:265:38
 Could not establish connection. Receiving end does not exist. collectSeen@moz-extension://[NoScript's UUID]/bg/main.js:265:38
  log.js:12:5
	error moz-extension://[NoScript's UUID]/lib/log.js:12:5
	collectSeen moz-extension://[NoScript's UUID]/bg/main.js:274:10
NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIWebNavigation.loadURIWithOptions]  browser-child.js:359
[NoScript] Cannot collect noscript activity data Error: Could not establish connection. Receiving end does not exist.
Stack trace:
collectSeen@moz-extension://[NoScript's UUID]/bg/main.js:265:38
 Could not establish connection. Receiving end does not exist. collectSeen@moz-extension://[NoScript's UUID]/bg/main.js:265:38
  log.js:12:5
	error moz-extension://[NoScript's UUID]/lib/log.js:12:5
	collectSeen moz-extension://[NoScript's UUID]/bg/main.js:274:10
NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIWebNavigation.loadURIWithOptions]  browser-child.js:359

comment:10 Changed 2 months ago by cypherpunks_reply

You can easily observe the increase in extension initialization time with different security slider settings by disabling and enabling extensions in about:addons. During this initialization time the browser UI is unresponsive.

In normal usage (on my machine anyway) this delay mostly lengthens the time during startup between Tor connecting and the browser window appearing.

With the security slider set to standard, uBlock Origin with most of the default filters enabled initializes after about 5 seconds of one cpu core pegged at 100%. With the security slider set to safer, it takes 25 seconds.

I testd with Tor Browser 8.0, Windows 10, a quad-core 3 GHz CPU and plenty of free RAM. Hardware acceleration is disabled and content processes are reduced to 1 although raising them to 2 did not change the browser startup delay or the unresponsive UI in the disable / enable scenario.

Note: See TracTickets for help on using tickets.