Open Bug 1837010 Opened 2 years ago Updated 9 months ago

All open private tabs occasionally crash

Categories

(Firefox for Android :: General, defect, P3)

Firefox 115
All
Android
defect

Tracking

()

People

(Reporter: Webworkr, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: crash)

Attachments

(5 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Android 13; Mobile; rv:109.0) Gecko/115.0 Firefox/115.0

Steps to reproduce:

  1. Open one or more new tabs in private mode.
  2. Switch to standard mode or open another app (multitasking).
  3. Return to the private mode.

Actual results:

Sometimes private tabs are closed when you return.

Expected results:

Private tabs remain open.

This bug is based on https://github.com/mozilla-mobile/fenix/issues/19852 and also occurs under changed hardware and Android version.

Private tabs only kept in memory (not persisted on disk), if you run ram
demanding apps while firefox is in the background, the OS may kill
firefox from ram losing your private session.

In comparison, Google Chrome crashes much less often. Private tabs usually stay open as well, as long as the browser app is.

Have you disabled the private browsing notification? Generally the
notification should keep the private tabs alive. If you do not get the
notification check your Android Settings for notifications. Some
aggressive task killers or battery saver modes can hard kill the Firefox
process. The other case where this can happen is if Play updates
Firefox. This will cause a full restart of the app. There is not
anything that can be done for the cases outlined. If you can get
reproducible steps that don't cover the above known behavior please open
a new issue with the details and we can evaluate it.

I'm not aware of specifically disabling notifications for private Firefox browsing.

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

For more information, please visit BugBot documentation.

Flags: needinfo?(jonalmeida942)

The phenomenon still occurs occasionally:

Nightly
119.0a1 (Build #2015974145), afe25e2fd9+
GV: 119.0a1-20230914093829
AS: 119.20230914050403

Hi Denis,

I would like to clarify one point here. What do you mean by closed? Can you not see the tabs in the tabs bottom sheet, or it is just the tabs reloading when you go back to the app? According to your answer, I will either put this under Tabs Reloading meta ticket or consider this as a separate one for missing the tabs from tabs tray. Thank you.

Severity: -- → S3
Flags: needinfo?(jonalmeida942) → needinfo?(bugzilla.mozilla.org)
Priority: -- → P3

Hello Kayacan,

the tabs are actually closed. The individual tabs are no longer visible.

Greetings Denis

Flags: needinfo?(bugzilla.mozilla.org)

Recreated screenshot

The phenomenon still occurs occasionally:

Nightly
124.0a1 (Build #2016000071), c8248adb27+
GV: 124.0a1-20240127092204
AS: 124.20240127050245

Attachment #9385953 - Attachment is obsolete: true

The phenomenon still occurs occasionally:

Nightly
125.0a1 (Build #2016007271), 7ae5f4f95a+
GV: 125.0a1-20240304212558
AS: 125.20240302000149

Keywords: crash

The phenomenon still occurs occasionally:

Nightly
126.0a1 (Build #2016013391), hg-68ef8d3216be+
GV: 126.0a1-20240405214302
AS: 126.20240403050706

The phenomenon still occurs occasionally:

Nightly
127.0a1 (Build #2016015303), hg-61472b53afe5+
GV: 127.0a1-20240415203932
AS: 126.20240410050314

The phenomenon still occurs occasionally:

128.0a1 (Build #2016020879), hg-b2c1906d3f6e+
GV: 128.0a1-20240514215634
AS: 128.20240514050332

Maybe related to bug 1862661?

Maybe related to bug 1898868?

The phenomenon still occurs occasionally:

129.0a1 (Build #2016026447), hg-157e7e735044+
GV: 129.0a1-20240612215151
AS: 129.20240612050250

Originally posted by @kbrosnan in https://github.com/mozilla-mobile/fenix/issues/19852#issuecomment-856181532

[...] Some aggressive task killers or battery saver modes can hard kill the Firefox process. [...]

Yesterday I changed the default setting for the battery to "Unrestricted". This did not bring any improvement.

Originally posted by @kbrosnan in https://github.com/mozilla-mobile/fenix/issues/19852#issuecomment-856181532

Have you disabled the private browsing notification? Generally the notification should keep the private tabs alive. If you do not get the notification check your Android Settings for notifications. Some aggressive task killers or battery saver modes can hard kill the Firefox process. […]

The notifications are active by default and I don't delete these push notifications.

PUSH notification to maintain private mode

The phenomenon still occurs occasionally:

130.0a1 (Build #2016031439), hg-162448b8b7cd+
GV: 130.0a1-20240708220117
AS: 129.20240704050322

Originally posted by @kbrosnan in https://github.com/mozilla-mobile/fenix/issues/19852#issuecomment-856181532

The other case where this can happen is if Play updates Firefox. This will cause a full restart of the app.

The browser update process is explicitly not the subject of my error report.

The phenomenon still occurs occasionally:

131.0a1 (Build #2016037311), hg-22f4cf67e8ad+
GV: 131.0a1-20240808093537
AS: 131.20240806050256

"Settings" menu > "About Firefox Nightly" > "Crashes":

The crash of the private tabs is not logged.

See Also: → 1913616

The phenomenon still occurs occasionally:

132.0a1 (Build #2016042863), hg-9df162c80958+
GV: 132.0a1-20240906093607
AS: 132.20240904050246

Severity and priority have already been assigned. However, this bug is still unconfirmed. What's the problem?

I've locally confirmed this case when the main process of the app is getting killed in the background and in that case we recreate the app process once we go back to the application. Due to the private app session recreation and not persisting the users' state, the new app session will have no private tabs saved. So it looks like it is not actually a crash but rather the death of main app process. Worth mentioning, this issue would not happen if main process continued living but child (tab) processes died, in which case, a tab reload would happen and the private tabs would still be kept.

This issue will be addressed by the improvements being worked on under Tab Reloading issue where our aim is to keep our app processes alive longer.
Worth mentioning that, this issue is also dependent on other external factors such as the amount of resource pressure being put on by the other applications while the Fenix is in the background. (e.g. if too much memory is being consumed by another foregrounded app, eventually it may result OS killing backgrounded apps in order to provide enough resources to the system and the app in the foreground. Therefore, the improvements being currently worked on is aiming to increase the lifespan of the processes but cannot guarantee that this issue will never happen again.)

ni'ing Roger to take a look at the linked ticket (regarding crash reporting of the private tabs, and whether it is sth we would want to have). That ticket would help us make sure if there's a user-perceived crash on child processes or it is indeed what I just described, ie. main process death signaled by the OS due to excessive resource usage and/or system under memory pressure. Anyways, I'll still be linking this to Tab Reloading ticket, until we prove otherwise.

Status: UNCONFIRMED → NEW
Depends on: 1752594
Ever confirmed: true
Flags: needinfo?(royang)
See Also: → 1917480

The phenomenon still occurs occasionally:

133.0a1 (Build #2016047847), hg-5e05e4e4f2ac+
GV: 133.0a1-20241002095009
AS: 133.20241001050328

I can confirm that this issue is not related to private tab crashes but rather to Fenix being terminated by Android OS in the background. Currently, we do not persist private tabs to ensure user privacy, so whether Fenix is closed manually by the user or by Android OS (a distinction we can't reliably detect), we don’t face the risk of unintentionally restoring private tabs.

Moving forward, I believe the focus should be on preventing Fenix from being killed by the OS (through upcoming performance and memory optimizations), rather than persisting private tabs, which could introduce privacy risks.

Flags: needinfo?(royang)

The phenomenon still occurs occasionally:

134.0a1 (Build #2016052927), hg-20aa234dca65+
GV: 134.0a1-20241028212656
AS: 133.20241027050311

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

Attachment

General

Created:
Updated:
Size: