Startup crashes are not detected on Linux and macOS when Firefox is started by another Firefox process
Categories
(Toolkit :: Startup and Profile System, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: jmendez, Assigned: jmendez)
Details
Attachments
(1 external file)
TLDR: Checking if the "XRE_PROFILE_PATH" env var is set should check both whether the env var exists and whether it has a value.
At the end of XRE_main, SaveToEnv("XRE_PROFILE_PATH=") clears the variable set for restarts. On Windows _putenv deletes it, but on Unix it stays in the environment with an empty value, and any Firefox process started by this one inherits it.
nsAppStartup::TrackStartupCrashBegin skips crash detection when XRE_PROFILE_PATH is set (bug 731613), and it only checks that PR_GetEnv returns non-null. So in a Firefox process started by another one on Linux or macOS, startup crashes are never counted and automatic Safe Mode is never offered.
This matters for the Firefox Enterprise launcher, which starts every browser process, but it applies to any Firefox launched from Firefox.
The fix is to also require the value to be non-empty, as Firefox Enterprise's nsAppRunner already does when it reads the same variable for profile selection. toolkit/components/startup/tests/unit/test_startup_crash.js can cover both the set and the emptied cases.
On Unix, clearing the variable at startup leaves it empty in the environment of
any Firefox process this one launches, which turned off startup crash detection
there.
Comment 3•13 days ago
|
||
| bugherder | ||
Updated•4 days ago
|
Description
•