Closed Bug 1649615 Opened 1 year ago Closed 8 months ago

PlacesBackups.jsm imports OS.File during startup

Categories

(Toolkit :: OS.File, task)

task

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: barret, Assigned: emalysz)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

According to this startup profile, PlacesBackups.jsm runs during startup and imports osfile.jsm. We should migrate this to the new IOUtils replacement for osfile.jsm when possible.

Stack:

(root) []
XREMain::XRE_main []
XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) [libxul.so]
XREMain::XRE_mainRun() [libxul.so]
nsAppStartup::Run() [libxul.so]
nsBaseAppShell::Run() [libxul.so]
MessageLoop::Run() [libxul.so]
mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [libxul.so]
nsThread::ProcessNextEvent(bool, bool*) [libxul.so]
mozilla::CycleCollectedJSContext::AfterProcessTask(unsigned int) [libxul.so]
promise callback []
mozilla::PromiseJobRunnable::Run(mozilla::AutoSlowOperation&) [libxul.so]
mozilla::dom::PromiseJobCallback::Call(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::ErrorResult&) [libxul.so]
JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) [libxul.so]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [libxul.so]
PromiseReactionJob(JSContext*, unsigned int, JS::Value*) [libxul.so]
AsyncFunctionResume(JSContext*, JS::Handle<js::AsyncFunctionGeneratorObject*>, ResumeKind, JS::Handle<JS::Value>) [libxul.so]
js::CallSelfHostedFunction(JSContext*, JS::Handle<js::PropertyName*>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) [libxul.so]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [libxul.so]
js::RunScript []
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [libxul.so]
AsyncFunctionNext [self-hosted:688:26]
0xff4eaa5ea9f []
js::jit::InterpretResume(JSContext*, JS::Handle<JSObject*>, JS::Value*, JS::MutableHandle<JS::Value>) [libxul.so]
js::CallSelfHostedFunction(JSContext*, JS::Handle<js::PropertyName*>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) [libxul.so]
js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [libxul.so]
js::RunScript []
InterpretGeneratorResume [self-hosted:1146:33]
PB_getMostRecentBackup [resource://gre/modules/PlacesBackups.jsm:245:54]
PB_getMostRecentBackup/< [resource://gre/modules/PlacesBackups.jsm:246:18]
PB_getBackupFiles [resource://gre/modules/PlacesBackups.jsm:140:44]
PB_getBackupFiles/< [resource://gre/modules/PlacesBackups.jsm:141:18]
PB_getBackupFolder [resource://gre/modules/PlacesBackups.jsm:116:46]
> PB_getBackupFolder/< [resource://gre/modules/PlacesBackups.jsm:117:18]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [libxul.so]
Interpret(JSContext*, js::RunState&) [libxul.so]
js::NativeGetExistingProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<js::NativeObject*>, JS::Handle<js::Shape*>, JS::MutableHandle<JS::Value>) [libxul.so]
js::CallGetter(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) [libxul.so]
js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [libxul.so]
mozilla::dom::module_getter::ModuleGetter(JSContext*, unsigned int, JS::Value*) [libxul.so]
mozJSComponentLoader::Import(JSContext*, nsTSubstring<char> const&, JS::MutableHandle<JSObject*>, JS::MutableHandle<JSObject*>, bool) [libxul.so]
profiler_get_backtrace() [libxul.so]
Registers::SyncPopulate() [libxul.so]
Depends on: 1671035
Depends on: 1673038
Assignee: nobody → emalysz
Status: NEW → ASSIGNED
Pushed by emalysz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/143c0cc67d52
remove OS.File usages from PlacesBackups.jsm r=Gijs

Backed out for assertion failures on AlreadyAddRefed.h

backout: https://hg.mozilla.org/integration/autoland/rev/edae79dc3fd5fd134d4a57795723423343e0cbed

push: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=143c0cc67d525ca22929f01a41903c1c204370d0&selectedTaskRun=N-tfUTTSRyaRWnhrjo6RtA.0

failure log: https://treeherder.mozilla.org/logviewer?job_id=321999889&repo=autoland&lineNumber=3648

[task 2020-11-17T01:13:05.451Z] 01:13:05 INFO - GECKO(2116) | > JavaScript error: resource://activity-stream/lib/ASRouterNewTabHook.jsm, line 61: TypeError: can't access property "uninit", this._router is null
[task 2020-11-17T01:13:05.467Z] 01:13:05 INFO - GECKO(2116) | > console.error: "Error while calling actor 'parentProcessTarget's method 'detach'" (void 0)
[task 2020-11-17T01:13:05.468Z] 01:13:05 INFO - GECKO(2116) | console.warn: "Error while detaching the browsing context target:" (new Error("wrongState from: server1.conn0.parentProcessTarget2", "resource://devtools/shared/protocol/Front.js", 361))
[task 2020-11-17T01:13:05.524Z] 01:13:05 INFO - GECKO(2116) | > [2642, Main Thread] WARNING: unable to post continuation event: file /builds/worker/checkouts/gecko/xpcom/io/nsStreamUtils.cpp:454
[task 2020-11-17T01:13:05.525Z] 01:13:05 INFO - GECKO(2116) | > [2642, Main Thread] WARNING: unable to post continuation event: file /builds/worker/checkouts/gecko/xpcom/io/nsStreamUtils.cpp:454
[task 2020-11-17T01:13:06.089Z] 01:13:06 INFO - GECKO(2116) | > Assertion failure: !mRawPtr, at /builds/worker/workspace/obj-build/dist/include/mozilla/AlreadyAddRefed.h:129
[task 2020-11-17T01:13:06.107Z] 01:13:06 INFO - Initializing stack-fixing for the first stack frame, this may take a while...
[task 2020-11-17T01:13:19.231Z] 01:13:19 INFO - GECKO(2116) | > #01: mozilla::dom::IOUtils::GetChildren(mozilla::dom::GlobalObject&, nsTSubstring<char16_t> const&) [dom/system/IOUtils.cpp:422]
[task 2020-11-17T01:13:19.248Z] 01:13:19 INFO - GECKO(2116) | #02: mozilla::dom::IOUtils_Binding::getChildren(JSContext*, unsigned int, JS::Value*) [s3:gecko-generated-sources:78caf11e57db78d4419b4bc00253b230c972ccd2f052658430742ba18f31d6890a017937ee1ee16fbef2763511655dde567fa75c64661c6fcf26847611a9ce44/dom/bindings/IOUtilsBinding.cpp::1542]
[task 2020-11-17T01:13:19.248Z] 01:13:19 INFO - GECKO(2116) | > #03: mozilla::dom::StaticMethodPromiseWrapper(JSContext*, unsigned int, JS::Value*) [dom/bindings/BindingUtils.cpp:3268]
[task 2020-11-17T01:13:19.249Z] 01:13:19 INFO - GECKO(2116) | #04: CallJSNative(JSContext*, bool ()(JSContext, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) [js/src/vm/Interpreter.cpp:502]
[task 2020-11-17T01:13:19.249Z] 01:13:19 INFO - GECKO(2116) | #05: js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [js/src/vm/Interpreter.cpp:594]
[task 2020-11-17T01:13:19.249Z] 01:13:19 INFO - GECKO(2116) | #06: InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [js/src/vm/Interpreter.cpp:659]
[task 2020-11-17T01:13:19.249Z] 01:13:19 INFO - GECKO(2116) | #07: Interpret(JSContext*, js::RunState&) [js/src/vm/Interpreter.cpp:3310]
[task 2020-11-17T01:13:19.249Z] 01:13:19 INFO - GECKO(2116) | #08: js::RunScript(JSContext*, js::RunState&) [js/src/vm/Interpreter.cpp:472]
[task 2020-11-17T01:13:19.250Z] 01:13:19 INFO - GECKO(2116) | > #09: js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [js/src/vm/Interpreter.cpp:631]
[task 2020-11-17T01:13:19.250Z] 01:13:19 INFO - GECKO(2116) | > #10: InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) [js/src/vm/Interpreter.cpp:659]
[task 2020-11-17T01:13:19.250Z] 01:13:19 INFO - GECKO(2116) | #11: js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) [js/src/vm/Interpreter.cpp:676]
[task 2020-11-17T01:13:19.250Z] 01:13:19 INFO - GECKO(2116) | #12: js::CallSelfHostedFunction(JSContext*, JS::Handle<js::PropertyName*>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) [js/src/vm/SelfHosting.cpp:1698]
[task 2020-11-17T01:13:19.250Z] 01:13:19 INFO - GECKO(2116) | > #13: js::jit::InterpretResume(JSContext*, JS::Handle<JSObject*>, JS::Value*, JS::MutableHandle<JS::Value>) [js/src/jit/VMFunctions.cpp:1450]
[task 2020-11-17T01:13:19.253Z] 01:13:19 INFO - GECKO(2116) | #14: ??? (???:???)
[task 2020-11-17T01:13:19.253Z] 01:13:19 INFO - GECKO(2116) | > ExceptionHandler::GenerateDump cloned child 2721
[task 2020-11-17T01:13:19.253Z] 01:13:19 INFO - GECKO(2116) | ExceptionHandler::SendContinueSignalToChild sent continue signal to child
[task 2020-11-17T01:13:19.253Z] 01:13:19 INFO - GECKO(2116) | > ExceptionHandler::WaitForContinueSignal waiting for continue signal...

Also failing on:

Flags: needinfo?(emalysz)
Pushed by emalysz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0a8c4664555a
remove OS.File usages from PlacesBackups.jsm r=Gijs

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:emalysz, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(emalysz)
Pushed by emalysz@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3026229625d1
remove OS.File usages from PlacesBackups.jsm r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
Flags: needinfo?(emalysz)
You need to log in before you can comment on or make changes to this bug.