Closed Bug 1958367 Opened 1 year ago Closed 11 months ago

Share opened image with slow/poor connection blocks the app

Categories

(Firefox for Android :: Browser Engine, defect)

Firefox 137
All
Android
defect

Tracking

()

RESOLVED FIXED
142 Branch
Tracking Status
firefox142 --- fixed

People

(Reporter: wojtek, Assigned: segun)

References

Details

(Whiteboard: [fxdroid] [group1])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:136.0) Gecko/20100101 Firefox/136.0

Steps to reproduce:

  1. Open some image (for example https://www.skyscrapercity.com/cdn-cgi/image/format=auto,onerror=redirect,width=1920,height=1920,fit=scale-down/https://www.skyscrapercity.com/attachments/20250330_202006-jpg.8985358/)
  2. enter an area where mobile internet is spotty/very bad/nonexistent (so there is either network connection but no data channel negotiated or outright no mobile connection)
  3. try to share image using context menu (long tap on the image)

Actual results:

Firefox gets blocked (and OS reports that the app is not responding, offering to kill it)

Expected results:

I should still be able to share the image either way. In the end it's already load and displayed on my device.

It seems that for some reason Firefox tries to make network connection again/still and because data channel is not available it gets stuck.

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

For more information, please visit BugBot documentation.

Flags: needinfo?(jboek)

The Bugbug bot thinks this bug should belong to the 'Firefox for Android::Browser Engine' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Browser Engine

Thank you so much for the report. We were able to repro it.

Additional information based on the stacktrace:

ActivityManager   system_server   E  ANR in org.mozilla.fenix.debug (org.mozilla.fenix.debug/.App)


PID: 17225
Reason: Input dispatching timed out (a0a292a org.mozilla.fenix.debug/org.mozilla.fenix.debug.App is not responding. Waited 5001ms for FocusEvent(hasFocus=true)).
Parent: org.mozilla.fenix.debug/.App
ErrorId: 34340522-b737-4253-a147-e7bfb98910c0
Frozen: false
Load: 0.34 / 0.15 / 0.05
----- Output from /proc/pressure/memory -----
some avg10=0.00 avg60=0.01 avg300=0.00 total=57849639
full avg10=0.00 avg60=0.00 avg300=0.00 total=39582433
----- End output from /proc/pressure/memory -----
----- Output from /proc/pressure/cpu -----
some avg10=0.71 avg60=2.07 avg300=0.99 total=5552206083
full avg10=0.00 avg60=0.00 avg300=0.00 total=0
----- End output from /proc/pressure/cpu -----
----- Output from /proc/pressure/io -----
some avg10=0.00 avg60=0.04 avg300=0.02 total=117495918
full avg10=0.00 avg60=0.01 avg300=0.00 total=68393444
----- End output from /proc/pressure/io -----

CPU usage from 130966ms to -1ms ago (2025-06-12 18:46:05.221 to 2025-06-12 18:48:16.187):
  5.6% 17225/org.mozilla.fenix.debug: 3.2% user + 2.3% kernel / faults: 128229 minor 1035 major
  1.4% 17471/org.mozilla.fenix.debug:gpu: 0.2% user + 1.1% kernel / faults: 31902 minor 189 major
  4.2% 1130/com.android.systemui: 1.6% user + 2.5% kernel / faults: 39213 minor 508 major
  2.9% 527/surfaceflinger: 1.1% user + 1.8% kernel / faults: 1842 minor 19 major
  1.8% 699/system_server: 1% user + 0.7% kernel / faults: 49819 minor 493 major
  1.7% 483/android.hardware.graphics.composer3-service.ranchu: 0.2% user + 1.5% kernel / faults: 110 minor
  0.1% 1635/com.google.android.inputmethod.latin: 0% user + 0% kernel / faults: 33845 minor 173 major
  0.1% 17319/org.mozilla.fenix.debug:tab34: 0.1% user + 0% kernel / faults: 22786 minor 1191 major
  0.4% 1312/com.android.phone: 0.3% user + 0.1% kernel / faults: 20191 minor 556 major
  0% 11596/com.google.android.apps.messaging: 0% user + 0% kernel / faults: 17991 minor 14975 major
9.7% TOTAL: 2.9% user + 4.3% kernel + 0.1% iowait + 2.1% irq + 0% softirq
CPU usage from 7ms to 279ms later (2025-06-12 18:48:16.194 to 2025-06-12 18:48:16.466):
  74% 17225/org.mozilla.fenix.debug: 18% user + 55% kernel / faults: 14983 minor 7046 major
    69% 17241/Signal Catcher: 13% user + 55% kernel
    4.6% 17256/binder:17225_3: 4.6% user + 0% kernel
  26% 699/system_server: 7.5% user + 18% kernel / faults: 804 minor 19 major
    18% 22907/AnrAuxiliaryTas: 3.7% user + 15% kernel
  14% 56/kswapd0: 0% user + 14% kernel
  3.7% 395/kworker/3:2H-kblockd: 0% user + 3.7% kernel
39% TOTAL: 4.7% user + 24% kernel + 7.5% iowait + 2.8% irq
Whiteboard: [fxdroid] [group1]
Severity: -- → S2

More notes:

The download() function in TemporaryDownloadFeature is being called from the main thread here

Flags: needinfo?(jboek)
Assignee: nobody → sfamisa
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → ASSIGNED
Pushed by sfamisa@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4a2561ce9fda https://hg.mozilla.org/integration/autoland/rev/f6581f130a84 Fix ANR when sharing or copying image in slow connection r=android-reviewers,matt-tighe
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: