Logging to terminal at shutdown: "You are running in background task mode" and "headless mode", followed by console.error about "storage/to-be-removed" and glean
Categories
(Core :: Storage: Quota Manager, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr102 | --- | unaffected |
firefox112 | --- | unaffected |
firefox113 | --- | verified |
firefox114 | --- | verified |
People
(Reporter: dholbert, Assigned: saschanaz)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-release+
|
Details | Review |
STR:
- Start Firefox from the terminal with a fresh profile -- e.g. on Linux:
mkdir /tmp/fresh-profile; firefox -no-remote -profile /tmp/fresh-profile
- Quit Firefox (Ctrl+Q , or Alt+F4, or File|Quit)
ACTUAL RESULTS:
My terminal output ends with these lines:
*** You are running in background task mode. ***
*** You are running in headless mode.
console.error: "/tmp/fresh-profile/storage" "to-be-removed" 0 "" "Quota"
console.error: "started removing /tmp/fresh-profile/storage/to-be-removed"
console.error: "done removing /tmp/fresh-profile/storage/to-be-removed. removed 1 entries."
console.error: "Pinged glean, waiting for submission."
EXPECTED RESULTS:
We probably don't want to be unconditionally dumping all of this logging, to avoid clutter and user confusion/concern. (This is for both the "You are running in {background task | headless} mode" as well as the console.error
lines).
It looks like the "Pinged glean, waiting for submission" line at least was added in bug 1788986; adding dependency on that bug.
Reporter | ||
Comment 1•2 years ago
|
||
I'm using Firefox Nightly 114.0a1 (2023-04-27)
Reporter | ||
Comment 2•2 years ago
|
||
This is a recent regression. mozregression -P stdout
(to avoid hiding the terminal output) gives me this range:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=cc809f6d6009b554e9f7b8ab0630bad00e11c1a7&tochange=d2159dc8d275d0d78f9591657e7753f0fe04ac91
which indicates this is a regression from bug 1827390.
Reporter | ||
Comment 3•2 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #0)
ACTUAL RESULTS:
My terminal output ends with these lines:[...] console.error: "Pinged glean, waiting for submission."
Side note -- when run from mozregression, this^^ last line of terminal output looks like this instead:
console.warn: "Skipping Glean as no metrics id is passed"
(Presumably that variation is due to some mozregression-imposed default configuration.)
The rest of the log lines from comment 0 are the same, though (aside from the profile directory being different).
Assignee | ||
Comment 4•2 years ago
|
||
This is "regression" as the task is now being incorrectly triggered with empty directory even when no shutdown cleanup happened. I can fix it, but it will not prevent the task itself from logging the message to the terminal. Are we okay with that?
Assignee | ||
Comment 5•2 years ago
|
||
Comment 6•2 years ago
|
||
(In reply to Kagami [:saschanaz] from comment #4)
This is "regression" as the task is now being incorrectly triggered with empty directory even when no shutdown cleanup happened. I can fix it, but it will not prevent the task itself from logging the message to the terminal. Are we okay with that?
You can avoid this, if you would like, by using the mechanism of Bug 1768961.
Comment 7•2 years ago
|
||
Set release status flags based on info from the regressing bug 1827390
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 8•2 years ago
|
||
IMO it makes sense to have logs on debug builds even after shutdown.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Comment 10•2 years ago
|
||
bugherder |
Assignee | ||
Comment 11•2 years ago
|
||
Comment on attachment 9330723 [details]
Bug 1830384 - Skip cleanup when no sanitization happened r=hpeuckmann
Beta/Release Uplift Approval Request
- User impact if declined: Users who run Firefox from terminal will see some unrelated logs every time they close Firefox, saying it entered background/headless mode, removed something, and pinged about that. That may look cryptic or even suspicious for some people.
(For now the log will still happen when the user opts in for cleaning site data on cleanup. This bug is for users who did not opt in.)
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: 1. Run Firefox from the terminal on macOS or Linux with a clean new profile. (Windows isn't affected AFAIK)
- See if closing Firefox triggers some logs including "You are running in background task mode".
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The patch only prevents running a background task when not needed, which was the original behavior before https://bugzilla.mozilla.org/show_bug.cgi?id=1827390.
- String changes made/needed:
- Is Android affected?: No
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 12•2 years ago
|
||
Actually let me land another patch in a separate bug.
Comment 13•2 years ago
|
||
Comment on attachment 9331137 [details]
Bug 1830384 - Disable removeDirectory logging on non-debug builds r=nalexander
Revision D176909 was moved to bug 1831154. Setting attachment 9331137 [details] to obsolete.
Comment 14•2 years ago
|
||
Comment on attachment 9330723 [details]
Bug 1830384 - Skip cleanup when no sanitization happened r=hpeuckmann
113 was merged to the release branch on Monday. Moving the approval request over.
Updated•2 years ago
|
Updated•2 years ago
|
Comment hidden (obsolete) |
Updated•2 years ago
|
Comment 16•2 years ago
|
||
Reproduced the issue with Firefox 114.0a1 (2023-04-27) on Ubuntu 20.04 by following str from comment 0. After Firefox is closed the console logs from comment 0 are displayed.
I can no longer see these errors on macOS 12 and Ubuntu 20.04 by following the same str after closing Firefox 114.0a1 (2023-05-03). I tried on Windows 10x64 as well but no console logs are displayed.
Comment 17•2 years ago
|
||
Comment on attachment 9330723 [details]
Bug 1830384 - Skip cleanup when no sanitization happened r=hpeuckmann
Low-risk fix that just reverts us back to prior behavior to avoid needless log spam. Approved for 113.0 RC2.
Comment 18•2 years ago
|
||
bugherder uplift |
Comment 19•2 years ago
|
||
Verified fixed with Firefox 113.0RC2 on macOS 12, Ubuntu 22.04 and Ubuntu 20.04. Errors from comment 0 are no longer displayed after Firefox is closed.
Comment 20•9 months ago
|
||
This may have caused a regression, bug 1930378.
Description
•