putenv is called too late during initialization
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox66 wontfix, firefox67 fixed)
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(2 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
1.64 KB,
patch
|
Details | Diff | Splinter Review |
This has at least two known side effects:
- This prevents from the instrumentation part of PGO to use the LLVM_PROFILE_FILE environment variable
- This prevents from using MOZ_DEBUG_LINKER to enable the linker debug log (which used to work before because putenv was called earlier).
Assignee | ||
Comment 1•5 years ago
|
||
There are at least two known side effects of initializing it after
loading libxul:
- We can't set LLVM_PROFILE_FILE for the instrumentation part of PGO to
make the compiler-rt static initializer pick it. - We can't set MOZ_DEBUG_LINKER to enable the linker debug log (which
used to work when environment variables were set earlier).
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/85fce02180b6 Initialize environment variables before loading libxul. r=snorp
Comment 3•5 years ago
|
||
Backed out changeset 85fce02180b6 (bug 1531632) for android failures
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=android%2C7.0%2Cx86-64%2Copt&revision=85fce02180b629cd6db4261c5730b61f5dc5a53e
Backout:
https://hg.mozilla.org/integration/autoland/rev/942dd126731278108778aba254469079e3697f9f
Assignee | ||
Comment 4•5 years ago
|
||
This appears in the log:
No implementation found for void org.mozilla.gecko.mozglue.GeckoLoader.putenv(java.lang.String) (tried Java_org_mozilla_gecko_mozglue_GeckoLoader_putenv and Java_org_mozilla_gecko_mozglue_GeckoLoader_putenv__Ljava_lang_String_2)
which is interesting, because it suggests libmozglue is not loaded, which I guess makes sense, but why is it a problem only on x86_64?
(In reply to Mike Hommey [:glandium] from comment #4)
This appears in the log:
No implementation found for void org.mozilla.gecko.mozglue.GeckoLoader.putenv(java.lang.String) (tried Java_org_mozilla_gecko_mozglue_GeckoLoader_putenv and Java_org_mozilla_gecko_mozglue_GeckoLoader_putenv__Ljava_lang_String_2)
which is interesting, because it suggests libmozglue is not loaded, which I guess makes sense, but why is it a problem only on x86_64?
I don't see that it attempted any tests on ARM, so I'm sure it fails there too.
Assignee | ||
Comment 6•5 years ago
|
||
I ran ARM tests on try before landing, and they didn't fail.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=cb14e5ada4968d076e5b628f15d9738cbe1b34e8
Updated•5 years ago
|
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/b57ec6985cd1 Initialize environment variables before loading libxul. r=snorp
Comment 8•5 years ago
|
||
Backed out changeset b57ec6985cd1 (bug 1531632) for Geckoview failures. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=232297090&repo=autoland&lineNumber=1533
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=b57ec6985cd10cc916c572b21cd5335ab4971f5a
Backout:
https://hg.mozilla.org/integration/autoland/rev/99b3207cda021ab6c393dac4533321284772afbd
This fixes it for me. You need to wait for init() to be called, and it was happening too late (and doesn't need to wait for LIBS_READY state).
Assignee | ||
Comment 11•5 years ago
|
||
Comment on attachment 9049174 [details] [diff] [review] wait-init.diff Review of attachment 9049174 [details] [diff] [review]: ----------------------------------------------------------------- Thank you!
Comment 12•5 years ago
|
||
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/bf9beb4c67a5 Initialize environment variables before loading libxul. r=snorp
Comment 13•5 years ago
|
||
Backed out changeset bf9beb4c67a5 (Bug 1531632) for causing multiple failures in remoteautomation.py CLOSED TREE
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=232563498&repo=autoland&lineNumber=1404
Backout: https://hg.mozilla.org/integration/autoland/rev/686e97ccf53ab544398a63a3734b5a806a536173
Comment 14•5 years ago
|
||
Assignee | ||
Comment 15•5 years ago
|
||
Oh, I missed the removal of the state check.
Comment 16•5 years ago
|
||
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/920cfaa83fd8 Initialize environment variables before loading libxul. r=snorp
Comment 17•5 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•