Closed Bug 1833104 Opened 1 year ago Closed 1 year ago

JOG stats jogfile.json in the appdir on the main thread before opening first browser window for artifact builds but has no exception in `browser_startup_mainthreadio.js`

Categories

(Toolkit :: Telemetry, defect)

Desktop
Windows
defect

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

Details

Attachments

(1 file)

We should have caught this immediately with the mainthreadio test in bug 1831406 but we didn't because the test accidentally got disabled across all platforms. The stack looks like this:

(root) []
XREMain::XRE_main []
XPCWrappedJS method call []
js::RunScript []
observe [resource://gre/modules/addonManager.js:72:9]
startup [resource://gre/modules/AddonManager.jsm:3665:9]
startup [resource://gre/modules/AddonManager.jsm:609:9]
_startProvider [resource://gre/modules/AddonManager.jsm:545:16]
callProvider [resource://gre/modules/AddonManager.jsm:240:21]
js::RunScript []
startup [resource://gre/modules/addons/XPIProvider.jsm:2496:9]
checkForChanges [resource://gre/modules/addons/XPIProvider.jsm:3043:17]
processFileChanges [resource://gre/modules/addons/XPIDatabase.jsm:3504:20]
js::RunScript []
addMetadata [resource://gre/modules/addons/XPIDatabase.jsm:3062:13]
syncLoadManifest [resource://gre/modules/addons/XPIInstall.jsm:765:25]
awaitPromise [resource://gre/modules/addons/XPIProvider.jsm:211:21]
nsIThreadManager.spinEventLoopUntil []
SpinEventLoopUntil XPIProvider.jsm:awaitPromise []
promise callback []
js::RunScript []
AsyncFunctionNext [self-hosted:894:26]
loadManifestFromWebManifest [resource://gre/modules/addons/XPIInstall.jsm:436:42]
loadManifest [resource://gre/modules/Extension.jsm:1725:20]
parseManifest [resource://gre/modules/Extension.jsm:1329:21]
lazyInit [resource://gre/modules/ExtensionParent.jsm:181:10]
get [resource://gre/modules/ExtensionParent.jsm:2235:11]
getStore [resource://gre/modules/ExtensionParent.jsm:2210:16]
js::RunScript []
get dataPromise [resource://gre/modules/ExtensionParent.jsm:2164:17]
_readData [resource://gre/modules/ExtensionParent.jsm:2139:17]
nsLocalFile::ResolveAndStat []

perhaps this only happens on artifact builds? It's hard to be sure off-hand.

(In reply to :Gijs (he/him) from comment #0)

perhaps this only happens on artifact builds? It's hard to be sure off-hand.

Looks like this is indeed enforced via a pref and conditioned on MOZ_ARTIFACT_BUILDS. I don't really understand why this uses a pref rather than defining MOZ_ARTIFACT_BUILDS in AppConstants, but I guess it works...

Assignee: nobody → gijskruitbosch+bugs
Summary: JOG stats jogfile.json in the appdir on the main thread before opening first browser window → JOG stats jogfile.json in the appdir on the main thread before opening first browser window for artifact builds but has no exception in `browser_startup_mainthreadio.js`

(In reply to :Gijs (he/him) from comment #1)

(In reply to :Gijs (he/him) from comment #0)

perhaps this only happens on artifact builds? It's hard to be sure off-hand.

Looks like this is indeed enforced via a pref and conditioned on MOZ_ARTIFACT_BUILDS. I don't really understand why this uses a pref rather than defining MOZ_ARTIFACT_BUILDS in AppConstants, but I guess it works...

The short of it is we need this information in C++ and reading AppConstants in C++ didn't appear to be something that is done anywhere. Rather than invent a new pattern, I went with a pref (and this way, if I end up needing it in Rust, too, it's right there). Plus, that makes it easier to manipulate for testing. Documentation for FOG's defines and prefs is here, though it doesn't contain any more information than you now have.

See Also: → 1820241
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/256aac2b8a71 add exception for artifact-only jogfile.json stat, r=mconley

Yeah this wasn't actually a problem with this part of the patch, so I'll reland this bit...

Flags: needinfo?(gijskruitbosch+bugs)
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/4c3c77ede182 add exception for artifact-only jogfile.json stat, r=mconley
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: