Closed
Bug 835606
Opened 12 years ago
Closed 12 years ago
/data/local/tmp not being cleared on reboots
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-b2g:tef+, b2g18 verified, b2g18-v1.0.0 fixed, b2g18-v1.0.1 verified)
VERIFIED
FIXED
blocking-b2g | tef+ |
People
(Reporter: cjones, Assigned: gsvelto)
References
Details
Attachments
(2 files)
In normal operation, gecko should never leave long-lived files in $TMPDIR, but it can happen in a few cases
- bugs
- users playing with off-by-default features like the profiler
We should rm -r /data/local/tmp on bootup as a poor man's approximation to a tmpfs.
I think we should get this in for v1.0.0.
Comment 1•12 years ago
|
||
Presumably, this should go in b2g.sh just before it creates /data/local/tmp
Comment 2•12 years ago
|
||
Hmmm. This will remove /data/local/tmp each time b2g.sh is run, rather than each time the phone boots.
r- if you really intended this to be each time the phone boots (in which case it needs to go into init-b2g.rc)
Attachment #707369 -
Flags: review?(jones.chris.g)
Reporter | ||
Comment 3•12 years ago
|
||
Comment on attachment 707369 [details] [diff] [review]
Remove /data/local/tmp and contents whenever b2g restarts
Yeah, this will mess with shell users and other daemons that might doing innocuous things with TMP. Provisional r- unless there's not really a better way.
Attachment #707369 -
Flags: review?(jones.chris.g) → review-
Comment 4•12 years ago
|
||
Another way we could leave it in b2g.sh but make it happen only the first time that b2g.sh is run per boot of the phone would be to put a marker in one of the real tmpfs filesystems, like /dev
Something like:
if [ ! -f /dev/.tmp.removed ]; then
rm -rf $TMPDIR
touch /dev/.tmp.removed
fi
Reporter | ||
Comment 5•12 years ago
|
||
That should work. It'd be a lot cleaner to stick this in an init.rc as an |on boot| trigger (or one of the earlier ones), but I have no idea how init.rc's are assembled downstream.
Comment 6•12 years ago
|
||
Why not just shove this in init.b2g.rc?
on init
rm -r /data/local/tmp # $TMPDIR doesn't exist yet.
Reporter | ||
Comment 7•12 years ago
|
||
That'd be ideal but I assumed you guys weren't picking that up.
Comment 8•12 years ago
|
||
We use a stock init.b2g.rc from gonk-misc/
Updated•12 years ago
|
Assignee: nobody → dhylands
blocking-b2g: tef? → tef+
Comment 9•12 years ago
|
||
Marking status-b2g18 and status-b2g18-v1.0.0 as affected, please update the status to fixed once this is verified landed on v1-train/mozilla-b2g18 and v1.0.0/mozilla-b2g18_v_1_0_0
status-b2g18:
--- → affected
status-b2g18-v1.0.0:
--- → affected
Comment 10•12 years ago
|
||
I'm going to transfer this to mwu, since I don't have anything setup to create a kernel/initramfs, and therefore can't test this easily.
Assignee: dhylands → mwu
Comment 11•12 years ago
|
||
Michael, any progress on this? Have you had a chance to look at it at all?
Flags: needinfo?(mwu)
Comment 12•12 years ago
|
||
What are the next steps here? The deadline for landing blocker bugs is rapidly approaching (2/15) and getting this landed sooner rather than later to shake out any possible regressions would be ideal.
Assignee | ||
Comment 13•12 years ago
|
||
I had some spare cycles and I've tried the fix from comment 6 on my Otoro but it doesn't work. This works fine however:
on boot
exec /system/bin/rm -r /data/local/tmp
I'll make a pull request against gonk-misc with this change which - if I understand comment 8 correctly - should be enough.
Flags: needinfo?(mwu)
Assignee | ||
Comment 14•12 years ago
|
||
Pointer to Github pull-request
Assignee | ||
Updated•12 years ago
|
Attachment #712461 -
Flags: review?(jones.chris.g)
Comment 15•12 years ago
|
||
Comment on attachment 712461 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gonk-misc/pull/72
Tested and works, thanks!
Attachment #712461 -
Flags: review?(jones.chris.g) → review+
Updated•12 years ago
|
Assignee: mwu → gsvelto
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → All
Comment 16•12 years ago
|
||
Cherry picked and placed on v1-train and v1.0.0
Updated•12 years ago
|
status-b2g18-v1.0.1:
--- → fixed
Comment 17•12 years ago
|
||
This isn't fixed in the b2g-manifeset repository, which means that the fix isn't deployed. I also see that the v1.0.1 branch flag was set to 'fixed', which isn't valid because we don't have a v1.0.1 branch in gonk-misc, so this commit doesn't live anywhere.
mwu's cherry-pick commits are:
v1-train: ded7bc971be7f0543db3e7dcf8e2ff134739aef2
v1.0.0: 653d167e33c5be0176945427b958f4a9f773bc4f
I've filed a bug for releng to create the branches we need to land the fix to (bug 844960).
Comment 18•12 years ago
|
||
Fixed on v1-train and v1.0.0 branches. Still waiting on the branches to be created, but we should be able to point the v1.0.1 gonk-misc commit to the one that's on v1-train as v1-train should be the branch point for creating v1.0.1 on the gonk-misc repo
b2g-manifest v1-train: f85d0ec1a36aa3980635fc1108bb2f450dafafd8
b2g-manifest v1.0.0: 8bfaf63dfc15efa3736566a28f52933e0c7581c3
Updated•12 years ago
|
Comment 19•12 years ago
|
||
b2g-manifest v1.0.1: c139b1e4acd064cedaa8c6059d953a9a7d505214
Updated•12 years ago
|
Comment 21•12 years ago
|
||
Can you please provide steps to verify this fix - as we will blackbox test from the UI?
Comment 22•12 years ago
|
||
adb shell 'date > /data/local/tmp/date.txt'
adb reboot
After phone boots up, verify /data/local/tmp/date.txt doesn't exist.
i.e.
adb shell ls -l /data/local/tmp/date.txt
should return
/data/local/tmp/date.txt: No such file or directory
Comment 23•12 years ago
|
||
Unagi Build ID: 20130313070202
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/e74dafa6b2d9
Gaia: b34e726147f8e671ad8c538b50900ccfbffcb084
Kernel: Dec 5th
Verified that the process in Comment 22 works as described on both V1.0.1 and V1.
Updated•12 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•