Open Bug 1790269 Opened 2 years ago Updated 1 year ago

Session restore/recovery fails when rebooting on linux

Categories

(Core :: Widget: Gtk, defect, P2)

Firefox 104
x86_64
Linux
defect

Tracking

()

People

(Reporter: rosenthalm93, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: dataloss, regressionwindow-wanted, steps-wanted)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0

Steps to reproduce:

  1. Ensure session restoration is enabled for both FF and window manager
  2. Shutdown system with FF running
  3. Restart & login

Additional context:

Actual results:

  1. Intermittently, Firefox starts a single window in a degraded state and fails to render content.
  2. New windows render in the same broken fashion
  3. Closing and restarting FF like a normal user loses all session state with no recovery prompts.
  4. However, deleting recovery.jsonlz4 before restart causes a proper restoration.
  5. I inspected the contents of recovery.jsonlz4 and the recovery.baklz4 and found that recovery.jsonlz4 was essentially an empty session while the backup had full session info.
  6. I found no .mozilla/firefox/Crash Report or any grep -i firefox ~/.xsession-errors

This seems like a race condition due to the intermittent nature. Let me know if I can provide any additional info.

Expected results:

  1. The Firefox window should have rendered properly
  2. The recovery backup should have been restored as usual
  3. Failing 1 & 2, a new empty recovery.jsonlz4 should not have been created
Component: Untriaged → Session Restore
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Same problem with Mozilla Firefox 104.0, Kubuntu 20.04.5 LTS and driver nvidia closed.
Regard.

The severity field is not set for this bug.
:dao, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dao+bmo)

Same issue on Firefox 105.0.2 (and prior), Ubuntu 22.04.1 LTS and an Intel Corporation UHD Graphics 620.

Cheers :)

(In reply to capitan.zap from comment #1)

Same problem with Mozilla Firefox 104.0, Kubuntu 20.04.5 LTS and driver nvidia closed and kwin plasma effect active.
Regard.

Hello I have tried to reproduce the issue with firefox 107.0a1(2022-10-10) on Ubuntu 22.04, unfortunately I wasn't able to reproduce the issue. Could you please answer the following questions in order to further investigate the issue

  1. Does this issue happen with a new profile? Here is a link on how to create one: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
  2. Does this issue happen in the latest nightly? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/
  3. Do you have any addons installed if so can you list them?
Flags: needinfo?(rosenthalm93)

Same here.

Firefox version: 105.0
Ubuntu: Kubuntu 20.04 LTS (KDE Plasma 5.18.8)
Hardware: Lenovo Z50-70
GPUs: Intel® HD Graphics 4400 and Nvidia GeForce N15S Gt

The problem appeared right after the installation the current OS, and it is persistent since then.
This is a very basic setup, everything is at "factory default".

I think the problem might be related to some hibernation/suspend anomaly.
For now, we completely disabled hibernation and suspend functions as a workaround.
Now it seems okay, but I'll give it some time, and will give you a feedback later.

I have installed firefox 109.0 (64 bit) from site mozilla and put it on /opt dir, and now this bug not is present.

Redirect a needinfo that is pending on an inactive user to the triage owner.
:dao, since the bug doesn't have a severity set, could you please set the severity or close the bug?

For more information, please visit auto_nag documentation.

Flags: needinfo?(rosenthalm93) → needinfo?(dao+bmo)

If someone from those who can reproduce the bug could find a regression range (https://mozilla.github.io/mozregression/), that would be helpful in order for us to understand what's going on here.

Severity: -- → S2
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(dao+bmo)
Priority: -- → P2
QA Whiteboard: [qa-regression-triage]

I can not reproduce either on my system, however, I might be missing a configuration:
How can I enable session restore "for the window manager"?
I assume this issue happened in the past when the Firefox window opens automatically after logging back into Linux and not my manually reopening it. Is this correct?

Thank you for your contribution!

Flags: needinfo?(rosenthalm93)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:dao, since the bug has high severity and recent activity, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(rosenthalm93) → needinfo?(dao+bmo)

I can confirm that now, with Mozilla Firefox 114.0b8 on kubuntu 22.10, this no longer appears to be an issue. I attempted to reboot 3 times and did not have it happen in any instance.

Sorry it took so long for me to get back to this – after I solved an unrelated issue that was preventing my desktop from sleeping I had less cause to reboot.

In case it is still salient, by "window manager session restore" I meant "Restore last session" under "Startup and Shutdown -> Desktop Session -> When logging in"

Woops, I spoke too soon, I was able to reproduce again after about 10 reboots or so. So the issue still exists, but only happens roughly 1/10 times. The session loss issue did not happen this time, however.

I assume this issue happened in the past when the Firefox window opens automatically after logging back into Linux and not my manually reopening it. Is this correct?
This is correct. I am using snap firefox also if that matters.

Also for context, the reason I am currently repeatedly rebooting is because I am fiddling with BIOS settings for another thing I'm working on. The issue presented while using my usual settings, but it is possible that there is some difficult-to-reproduce or system-specific interaction involved there.

Given that this is an intermittent issue that only presents at reboot it seems like an absolute bear of a problem to figure out exactly what's going on.

(In reply to Michael from comment #13)

[...] The issue presented while using my usual settings, but it is possible that there is some difficult-to-reproduce or system-specific interaction involved there.

Given that this is an intermittent issue that only presents at reboot it seems like an absolute bear of a problem to figure out exactly what's going on.

Right. :/ I think I'm gonna have to downgrade this to S3 like I did for bug 1819813. If you figure out any other factors to help narrow this down, please let us know. Thanks!

Severity: S2 → S3
Flags: needinfo?(dao+bmo)
Keywords: steps-wanted
See Also: → 1819813
Blocks: 1853704

Moving to GTK component - can you provide any insight on what might be happening here?

Component: Session Restore → Widget: Gtk
Product: Firefox → Core

I saw similar behavior a few releases ago. The environment was X11 and the build was not a snap build.
Only a single Firefox window appeared. I don't recall for certain but i think the content area was blank.
I closed that window after a minute or so, either through explicit close or restarting the session.
Subsequent Firefox restarts still had only one window and the most recent session restore files did not contain history.
I found an older session restore file that didn't seem to have my most recent session, but wasn't more than weeks old.

Since then, a couple of times I've seen Firefox start with only a single window. After some minutes, something triggers session restore. I've speculated this might be focus or a remote connection from opening another url.

I wonder whether session restore might be writing a new file (either on shutdown or earlier) before completing the previous restore?

I don't have any reason to suspect this is specific to GTK.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: