Closed Bug 608385 Opened 14 years ago Closed 14 years ago

OOM - Image-heavy sites causes slow down and crash

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
critical

Tracking

(fennec2.0next+)

RESOLVED WORKSFORME
Tracking Status
fennec 2.0next+ ---

People

(Reporter: pcwalton, Assigned: dougt)

References

Details

(Whiteboard: [Memory])

STR on Droid 1:
(1) Open Fennec.
(2) Go to deviantart.com.
(3) Click through the link at the bottom to disable the mobile site.
(4) Load the non-mobile deviantART home page.
(5) Try to pan around.

For me, performance starts to rapidly degrade, becoming unusable in a couple of seconds, and then Fennec immediately quits and returns me to the home screen with no message.

dmesg reports that the OOM killer is responsible:

<4>[115786.989807] .mozilla.fennec invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0
<4>[115786.998504] [<c0034a4c>] (unwind_backtrace+0x0/0xd8) from [<c009a7e0>] (oom_kill_process.clone.0+0x80/0x230)
<4>[115787.009124] [<c009a7e0>] (oom_kill_process.clone.0+0x80/0x230) from [<c009aafc>] (__out_of_memory+0x16c/0x190)
<4>[115787.019989] [<c009aafc>] (__out_of_memory+0x16c/0x190) from [<c009aba0>] (out_of_memory+0x80/0xd0)
<4>[115787.029785] [<c009aba0>] (out_of_memory+0x80/0xd0) from [<c009da64>] (__alloc_pages_nodemask+0x470/0x568)
<4>[115787.040191] [<c009da64>] (__alloc_pages_nodemask+0x470/0x568) from [<c009f704>] (__do_page_cache_readahead+0x118/0x258)
<4>[115787.051879] [<c009f704>] (__do_page_cache_readahead+0x118/0x258) from [<c009f864>] (ra_submit+0x20/0x24)
<4>[115787.062194] [<c009f864>] (ra_submit+0x20/0x24) from [<c0098134>] (filemap_fault+0x1e8/0x420)
<4>[115787.071441] [<c0098134>] (filemap_fault+0x1e8/0x420) from [<c00aafcc>] (__do_fault+0x50/0x430)
<4>[115787.080718] [<c00aafcc>] (__do_fault+0x50/0x430) from [<c00abd50>] (handle_mm_fault+0x2f0/0xc64)
<4>[115787.090301] [<c00abd50>] (handle_mm_fault+0x2f0/0xc64) from [<c0035a6c>] (do_page_fault+0x108/0x1f0)
<4>[115787.100280] [<c0035a6c>] (do_page_fault+0x108/0x1f0) from [<c002f22c>] (do_PrefetchAbort+0x34/0x94)
<4>[115787.110137] [<c002f22c>] (do_PrefetchAbort+0x34/0x94) from [<c002fee0>] (ret_from_exception+0x0/0x10)
<4>[115787.120178] Exception stack(0xc3905fb0 to 0xc3905ff8)
<4>[115787.125732] 5fa0:                                     0011e908 00000007 418af7d0 00000010
<4>[115787.134643] 5fc0: ad37a0e8 ad38114c 0000aa50 4018f8a8 bedee520 4186bd90 4186bd78 4493ba68
<4>[115787.143585] 5fe0: 8059fcf0 bedee4e0 80544e51 ad32f624 20000030 ffffffff
<4>[115787.150756] Mem-info:
<4>[115787.153381] Normal per-cpu:
<4>[115787.156646] CPU    0: hi:   90, btch:  15 usd:  47
<4>[115787.161895] active_anon:21204 inactive_anon:21226 isolated_anon:0
<4>[115787.161926]  active_file:13 inactive_file:6 isolated_file:0
<4>[115787.161926]  unevictable:72 dirty:0 writeback:0 unstable:0
<4>[115787.161926]  free:504 slab_reclaimable:408 slab_unreclaimable:1872
<4>[115787.161926]  mapped:7653 shmem:3690 pagetables:869 bounce:0
<4>[115787.193664] Normal free:2016kB min:1988kB low:2484kB high:2980kB active_anon:84816kB inactive_anon:84904kB active_file:52kB inactive_file:24kB unevictable:288kB isolated(anon):0kB isolated(file):0kB present:247904kB mlocked:0kB dirty:0kB writeback:0kB mapped:30612kB shmem:14760kB slab_reclaimable:1632kB slab_unreclaimable:7488kB kernel_stack:1952kB pagetables:3476kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
<4>[115787.235565] lowmem_reserve[]: 0 0
<4>[115787.239654] Normal: 504*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 2016kB
<4>[115787.252502] 3788 total pagecache pages
<4>[115787.265808] 62464 pages of RAM
<4>[115787.269256] 879 free pages
<4>[115787.272308] 4734 reserved pages
<4>[115787.275878] 2280 slab pages
<4>[115787.279144] 15579 pages shared
<4>[115787.282592] 0 pages swap cached
<3>[115787.286102] Out of memory: kill process 18598 (.mozilla.fennec) score 35284 or a child
<3>[115787.294769] Killed process 18598 (.mozilla.fennec)
<3>[115792.534332] binder: 18598: binder_alloc_buf, no vma
<6>[115792.539916] binder: 1085:1095 transaction failed 29201, size 68-0
<3>[115793.114776] init: untracked pid 18640 exited

NB: The Droid has no swap, according to /proc/meminfo:

$ cat /proc/meminfo
MemTotal:         231224 kB
MemFree:            3184 kB
Buffers:              68 kB
Cached:            34896 kB
SwapCached:            0 kB
Active:            83880 kB
Inactive:          82808 kB
Active(anon):      66136 kB
Inactive(anon):    66336 kB
Active(file):      17744 kB
Inactive(file):    16472 kB
Unevictable:         288 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:        132020 kB
Mapped:            40408 kB
Shmem:               460 kB
Slab:               9420 kB
SReclaimable:       1944 kB
SUnreclaim:         7476 kB
KernelStack:        2328 kB
PageTables:         5276 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      115612 kB
Committed_AS:    1700272 kB
VmallocTotal:     663552 kB
VmallocUsed:       47484 kB
VmallocChunk:     562180 kB
tracking-fennec: --- → ?
Whiteboard: [Memory]
Summary: Image-heavy sites (e.g. non-mobile version of deviantART) cause Fennec to crawl and then instantly close on Droid → OOM - Image-heavy sites cause swap and crash
Summary: OOM - Image-heavy sites cause swap and crash → OOM - Image-heavy sites causes slow down and crash
Brad, do you think we can detect low memory, then just kill the child process.  I am basically thinking about timelines, and that seems like a better solution.  The "make low memory pressure stuff work" is a lot longer tasks.
tracking-fennec: ? → 2.0-
Blocks: 616144
I think I'm also getting these kind of crashes on nu.nl/weer and/or buienradar.nl, where the tab is crashing or the whole application is crashing (without getting the crash reporter). This is on the Motorola Droid.
This is a big issue on that phone, getting a lot of crashes, presumably because of this bug.
Severity: normal → critical
tracking-fennec: 2.0- → ?
Assignee: nobody → doug.turner
tracking-fennec: ? → 2.0+
i am not seeing this on my g2 from today's build.
Whiteboard: [Memory] → [Memory], resolvewfm=jan17
related to bug 624652.
Whiteboard: [Memory], resolvewfm=jan17 → [Memory]
I see pretty nice mobile version of page and no any problems (Galaxy Tab)....
try patches from bug 622470, does it help for you?
Depends on: 622470
Doug - has bug 622470 helped this problem? The main code has landed and we are waiting to branch for beta 5 before committing the pref changes to mobile-browser
tracking-fennec: 2.0+ → 2.0next+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.