Bug 942609 (fatfennec)

[meta] Reduce Fennec's storage impact: APK and data

NEW
Unassigned

Status

()

Firefox for Android
General
4 years ago
27 days ago

People

(Reporter: jwatt, Unassigned)

Tracking

(Depends on: 49 bugs, Blocks: 1 bug, {meta, mlk, perf})

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

4 years ago
I just discovered that on one of my friends phones Firefox Mobile has leaked 800 MB of Storage space:

https://mail.mozilla.org/pipermail/mobile-firefox-dev/2013-November/000385.html

There are at least three separate issues there that I'm going to file bugs on and mark them as blocking this one.
(Reporter)

Updated

4 years ago
Depends on: 942611
(Reporter)

Updated

4 years ago
Depends on: 942612
(Reporter)

Updated

4 years ago
Depends on: 942614
(Reporter)

Updated

4 years ago
Summary: Stop Firefox Mobile from using so much Storage that app security updates are blocked → Meta: Issues caused by Firefox Mobile using too much Storage space
(Reporter)

Updated

4 years ago
Depends on: 933979

Comment 1

4 years ago

Cleaning up temp files is hard and bound to fail on edge cases like 
crash etc.. (Compare Thunderbird). OTOH, you don't want to ever leave 
such files behind. So you need more drastic solutions than "cleanup 
after use". 

Suggestions: 

  * Avoid them altogether 
  * Make a subdir, and ensure that all temp files, no matter which kind, 
    are always placed there. This whole subdir will be deleted on close 
    (not startup).
Depends on: 857888
Keywords: meta
OS: All → Android
Summary: Meta: Issues caused by Firefox Mobile using too much Storage space → [meta] Issues caused by Firefox for Android using too much Storage space
>This whole subdir will be deleted on close (not startup).

There is no such thing as doing things on close in Android, and even for desktop this is something we're trying to get rid of (bug 662444).
(Reporter)

Comment 3

4 years ago
Would it be possible to have the code make two temp directories - one for this session, another for the next - and each session flip from using one to the other? That way the contents of the not-in-use directory could be deleted without fear of deleting something that's in-use, and presumably be done at a point in time where its less likely to be bad/impossible, such as startup or shutdown. (Earlier would probably be better to try and clear Storage before any "no storage space" causing crashes prevent us from getting the chance to, if that's a concern.)

We wouldn't even necessarily need to rely on storing any information about which directory should be used next session if we're worried about crashes stopping us from doing that and clearing up. We could simply choose one of the two at random, and then it won't be too many restarts before any cruft is cleared up (well, for most users, statistically speaking).
Depends on: 947745
Depends on: 726051
Depends on: 951253
Depends on: 951262
Depends on: 959203
Alias: fatfennec
Depends on: 959833

Updated

3 years ago
Depends on: 961209
Depends on: 966707
Depends on: 915838

Updated

3 years ago
Depends on: 968229

Comment 4

3 years ago
I've also encountered the bug when doing this, on my Motorola Defy+ (Android 2.3.6) / Firefox Mobile 27 (and earlier releases) :

- uploading a large file (video) to a website
- selecting the file to upload from the android source selector, choosing a source (stock Android cam or gallery app)
- file will be fully copied into Firefox's data directory in /data/data/org.mozilla.firefox/ (file prefixed by tmp_)

So that when uploading a few big files or many smaller files, my Android's internal space is full.

Why does Firefox mobile need to copy the source file in its data directory, when it can access it directly from the source directory (/mnt/sdcard/dcim/... in the case of pictures and videos)?
Thanks for the report. We have a patch in-place to hopefully fix that issue over in bug 942611.
Depends on: 71895
Depends on: 926234
Depends on: 1001797
Depends on: 1015236
Depends on: 1039789
Depends on: 1039898
Depends on: 1039902
Depends on: 1041836
Depends on: 1001713
Depends on: 1041852
Depends on: 1041866
Depends on: 696095
Depends on: 748488

Updated

3 years ago
Duplicate of this bug: 887834
Depends on: 611781
Depends on: 1042354
Depends on: 856791
Depends on: 1042363
No longer depends on: 696095, 748488, 856791, 959203, 1001713, 1039902, 1042354
Summary: [meta] Issues caused by Firefox for Android using too much Storage space → [meta] Reduce Fennec's storage impact: APK and data
No longer depends on: 1039789, 1039898, 1041836, 1041852, 1041866
Depends on: 1042368
Depends on: 1042369
No longer depends on: 942612, 951253, 951262, 966707, 1015236
Depends on: 1042372
No longer depends on: 726051, 857888, 926234, 942614
Depends on: 1044079
Depends on: 1046396
Depends on: 1048683
Depends on: 1053016
Depends on: 1052837
Depends on: 1058852
Depends on: 1041882
Depends on: 1064363
Depends on: 1065712

Updated

3 years ago
Depends on: 1074340
No longer depends on: 1074340
Depends on: 1091087
Depends on: 1095719
Depends on: 1105546
Depends on: 1106935
Depends on: 1114998
Depends on: 1115000
Depends on: 1115004
Depends on: 1116915
Depends on: 1122826
Depends on: 1128675
Depends on: 1130201
Depends on: 1133158

Updated

2 years ago
Depends on: 1137380

Updated

2 years ago
No longer depends on: 1137380
Depends on: 1147960
Depends on: 945123
Depends on: 1148979
Depends on: 1148990
Depends on: 1149164
Depends on: 1149209
Depends on: 1062537
Depends on: 1150974
Depends on: 1153560
Depends on: 1155801

Updated

2 years ago
Depends on: 1158250
Depends on: 1158994
Depends on: 1167446

Updated

2 years ago
Depends on: 1171944

Updated

2 years ago
Depends on: 1171946

Updated

2 years ago
Depends on: 1172831
Depends on: 1173894
Depends on: 1174563
No longer depends on: 1174563

Updated

2 years ago
Depends on: 1174845

Updated

2 years ago
Depends on: 1175375

Updated

2 years ago
Depends on: 1175377

Updated

2 years ago
Depends on: 1175378

Updated

2 years ago
Depends on: 1175379
Depends on: 1158303
Depends on: 1177166
Depends on: 1177184
Depends on: 1177192
Depends on: 1177617
Depends on: 1181314
Depends on: 857730
Depends on: 1187536
Depends on: 1192048
Depends on: 1193431
Depends on: 1193585
Depends on: 1194338
Depends on: 1194205
Depends on: 1195517
Depends on: 1196961
Depends on: 1197264
Depends on: 1197874
Depends on: 1199015
Depends on: 1048191
Depends on: 1201627
Depends on: 1210989
Depends on: 1212629
Depends on: 1217675
Depends on: 1220892
Depends on: 1223526
No longer depends on: 1223526
Depends on: 1227325
Depends on: 1226301
Depends on: 1183320
Depends on: 1227795

Updated

a year ago
Depends on: 1233728

Updated

a year ago
Depends on: 1234009
Depends on: 590127
Depends on: 1237165
Depends on: 1237342
Depends on: 1235869

Updated

a year ago
Depends on: 1242998
Depends on: 1247047
Depends on: 1253339
Depends on: 1256427
Depends on: 1259137
Depends on: 1263197
Depends on: 1263338
Depends on: 1266156
Depends on: 1242589

Updated

a year ago
Depends on: 1268456
Depends on: 1272693
Depends on: 1282008

Updated

11 months ago
Depends on: 1284283
Depends on: 1291913
Depends on: 1294736

Updated

9 months ago
Depends on: 1296642

Updated

9 months ago
Depends on: 1297480

Updated

8 months ago
Depends on: 1301317
Depends on: 1310143
Depends on: 1312824
Depends on: 1313990

Updated

7 months ago
Depends on: 1314328

Updated

6 months ago
Depends on: 1277277
Blocks: 1321063

Updated

3 months ago
Depends on: 1330594

Updated

2 months ago
Depends on: 1346686

Updated

a month ago
Depends on: 1218876
You need to log in before you can comment on or make changes to this bug.