Open Bug 1927028 Opened 4 months ago Updated 1 day ago

Intermittent crash when opening new tab (private mode)

Categories

(Fenix :: Performance, defect)

Firefox 132
All
Android
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: joelmurphy444, Unassigned, NeedInfo)

Details

Steps to reproduce:

During normal usage of browser, usually when a tab is already open.
I always use private mode, so all my tabs are private and new tabs likewise.

Tap the three vertical dots menu in top right, then "new tab".

Actual results:

Very often, regardless of what website I was on or how many tabs I have open, the new tab opens, the cursor moves to the address bar, keyboard opens sometimes, and then Firefox freezes and eventually crashes with a Java out of memory error.

Expected results:

New tab should open and app should not crash.

This has been happening probably for over a year. Only just getting around to filing a bug report. I can attach many crash reports once I figure out how to add them to this from my phone.

This one is the only one I can find right now, but it usually happens a few times per day so from now on I'll make sure to press the submit button so that I can include more of these.

https://crash-stats.mozilla.org/report/index/4b004339-e796-4b7b-820a-fd13b0241025

I can't provide exact reproduction steps as it seems to just randomly happen. Intermittently, but reliably a few times per day.
I am using Firefox Beta, but this has been a problem for at least a year on many versions and channels of Firefox for Android.

Ah, I seem to have found another way to reproduce the same crash.

It happens if I have a text entry field active (flashing caret) and then I tap the address bar. Regardless if the keyboard is open or not.

However this way it freezes forever (to the point where Android asks me if I want to wait or kill the app) and doesn't seem to trigger any crash reporting mechanism most of the time. I might have managed to get one crash report from this one? https://crash-stats.mozilla.org/report/index/b250e4b0-e06d-4e51-a296-5f2bc0241025

Some random pastes from the "share" button in crashes menu:

1e5547d8-1cc9-4dcb-86d5-c3362fd01125
java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 134512 free bytes and 131KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
----
java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 134512 free bytes and 131KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
	at android.app.servertransaction.ClientTransaction$1.createFromParcel(ClientTransaction.java:349)
	at android.app.servertransaction.ClientTransaction$1.createFromParcel(ClientTransaction.java:347)
	at android.os.Parcel.readTypedObject(Parcel.java:4218)
	at android.app.IApplicationThread$Stub.onTransact(IApplicationThread.java:1135)
	at android.os.Binder.execTransactInternal(Binder.java:1505)
	at android.os.Binder.execTransact(Binder.java:1444)
66f4998e-06ad-4cc4-893c-36c40ac428db
java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 143664 free bytes and 140KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
[Note: links for Socorro etc. have already been shared, so I removed them from this]
java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 143664 free bytes and 140KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
	at java.lang.Long.valueOf(Long.java:1245)
	at com.sun.jna.Memory$MemoryDisposer.run(Memory.java:15)
	at com.sun.jna.internal.Cleaner$CleanerRef.clean(Cleaner.java:56)
	at com.sun.jna.internal.Cleaner$CleanerThread.run(Cleaner.java:18)

Apologies for the large quantity of comments. Last two crash logs for now:

This one shows as a "native crash" and has more info?!
https://crash-stats.mozilla.org/report/index/835b9258-4d52-4fea-8522-0a7620241025

https://crash-stats.mozilla.org/report/index/1dbbd2e1-9079-4c02-b271-55d4b0241025

I should also add, I do have extensions installed, but I was also able to reproduce this after disabling all my extensions.

(In reply to joelmurphy444 from comment #3)

Ah, I seem to have found another way to reproduce the same crash.

It happens if I have a text entry field active (flashing caret) and then I tap the address bar. Regardless if the keyboard is open or not.

However this way it freezes forever (to the point where Android asks me if I want to wait or kill the app) and doesn't seem to trigger any crash reporting mechanism most of the time. I might have managed to get one crash report from this one? https://crash-stats.mozilla.org/report/index/b250e4b0-e06d-4e51-a296-5f2bc0241025

Some random pastes from the "share" button in crashes menu:

1e5547d8-1cc9-4dcb-86d5-c3362fd01125
java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 134512 free bytes and 131KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
----
java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 134512 free bytes and 131KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
	at android.app.servertransaction.ClientTransaction$1.createFromParcel(ClientTransaction.java:349)
	at android.app.servertransaction.ClientTransaction$1.createFromParcel(ClientTransaction.java:347)
	at android.os.Parcel.readTypedObject(Parcel.java:4218)
	at android.app.IApplicationThread$Stub.onTransact(IApplicationThread.java:1135)
	at android.os.Binder.execTransactInternal(Binder.java:1505)
	at android.os.Binder.execTransact(Binder.java:1444)
66f4998e-06ad-4cc4-893c-36c40ac428db
java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 143664 free bytes and 140KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
[Note: links for Socorro etc. have already been shared, so I removed them from this]
java.lang.OutOfMemoryError: Failed to allocate a 16 byte allocation with 143664 free bytes and 140KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
	at java.lang.Long.valueOf(Long.java:1245)
	at com.sun.jna.Memory$MemoryDisposer.run(Memory.java:15)
	at com.sun.jna.internal.Cleaner$CleanerRef.clean(Cleaner.java:56)
	at com.sun.jna.internal.Cleaner$CleanerThread.run(Cleaner.java:18)

This seems to be a pretty reliable way for me to reproduce it, it happens every time, and doesn't matter whether private browsing or not.

  1. Open a site e.g google.com
  2. Open a text field such as the Google search bar, so that the caret flashes in that field
  3. Tap the address bar
  4. Crash occurs immediately (well, the address does get highlighted and the X appears at right hand side of address bar, but that's as far as it gets)

Since it's a crash, I was following these report instructions (https://support.mozilla.org/en-US/kb/how-send-crash-report-firefox-android) and selected the General component. Although perhaps it's supposed to be in another category.

Is there anything else I can do to help?

Flags: needinfo?(royang)

Looks like an OOM. Not sure if there's anything we can do here since the device ran out of memory. Moving to performance component for a better look. Thanks for reporting this.

Component: General → Performance
Flags: needinfo?(royang)

(In reply to Roger Yang [:royang] from comment #7)

Looks like an OOM. Not sure if there's anything we can do here since the device ran out of memory. Moving to performance component for a better look. Thanks for reporting this.

I'm not sure if it's a simple OOM. I think that the actual "crash" and OOM only happens after Android decides to kill it. Hence why most of the time the logs don't seem to be very useful.

I have a feeling (based on the timing of when things freeze, and when android tries to kill it, and then when Firefox "relaunches" but THEN crashes properly (with a crash report notification)) that the running out of memory is a side effect of the problem.

The device is a Pixel 7, it has 8GB RAM and barely anything running in the background, I would have thought it shouldn't really be running out of memory.

If this changes things feel free to recategorise, either way thanks for taking a look :)

Adding to our triage queue to diagnose

Performance Impact: --- → ?

There are a couple of things to note here and also to clarify:
Based on the descriptions and STRs provided, the issues experienced here can be a crash, or an ANR or both (two separate issues experienced in a similar way).
Based on the OOM crash reports attached here,
1- I am curious how many private/non-private tabs are open in that session?
2- Whether the issue is happening where there's no additional addons installed?
3- I could not reproduce the crash following the steps mentioned in Comment 6 which tells me that this issue could be a result of a specific issue in the user's profile (OOM reports support this, too).

:joelmurphy444, I'd appreciate if you can tell if the steps you mentioned in Comment 6 is reliably reproducing the issue when you have only a single tab in the session and whether you have any addons installed or not. Thank you so much for taking time to report this issue in detail!

Flags: needinfo?(joelmurphy444)

(In reply to Kayacan Kaya [:kaya] from comment #10)

There are a couple of things to note here and also to clarify:
Based on the descriptions and STRs provided, the issues experienced here can be a crash, or an ANR or both (two separate issues experienced in a similar way).
Based on the OOM crash reports attached here,
1- I am curious how many private/non-private tabs are open in that session?
2- Whether the issue is happening where there's no additional addons installed?
3- I could not reproduce the crash following the steps mentioned in Comment 6 which tells me that this issue could be a result of a specific issue in the user's profile (OOM reports support this, too).

:joelmurphy444, I'd appreciate if you can tell if the steps you mentioned in Comment 6 is reliably reproducing the issue when you have only a single tab in the session and whether you have any addons installed or not. Thank you so much for taking time to report this issue in detail!

Hi,

So, on all of my reproductions and reports so far, I have only had the one tab open in the whole session. The issue is occurring regardless of how many tabs are open and regardless of private/non-private tabs.

I have disabled all addons and can still reproduce it. Is disabling them all sufficient or do I need to completely uninstall them?

FWIW, I tried uninstalling all addons and even completely removing my Firefox account from my installation of the regular (non-beta) browser and can still reproduce this issue.

I think that the fact it is an ANR/crash might be making it difficult to gather the right information/reports. Is there any way I can collect more information? I don't mind collecting logs over ADB or something if there's a way to get more info.

Flags: needinfo?(joelmurphy444)

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

For more information, please visit BugBot documentation.

Flags: needinfo?(kkaya)

I'm not convinced the performance impact flag or the component is appropriate here but it does sound pretty bad. Kaya, let me know if you disagree.

Performance Impact: ? → ---
Component: Performance → General

Is there a meta or another bug that we can link this to?

Severity: -- → S3

The Bugbug bot thinks this bug should belong to the 'Fenix::Crash Reporting' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Crash Reporting
Component: Crash Reporting → Performance
You need to log in before you can comment on or make changes to this bug.