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)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:tef+, b2g18 verified, b2g18-v1.0.0 fixed, b2g18-v1.0.1 verified)

VERIFIED FIXED
blocking-b2g tef+
Tracking Status
b2g18 --- verified
b2g18-v1.0.0 --- fixed
b2g18-v1.0.1 --- verified

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.
Presumably, this should go in b2g.sh just before it creates /data/local/tmp
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)
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-
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
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.
Why not just shove this in init.b2g.rc? on init rm -r /data/local/tmp # $TMPDIR doesn't exist yet.
That'd be ideal but I assumed you guys weren't picking that up.
We use a stock init.b2g.rc from gonk-misc/
Assignee: nobody → dhylands
blocking-b2g: tef? → tef+
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
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
Michael, any progress on this? Have you had a chance to look at it at all?
Flags: needinfo?(mwu)
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.
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)
Attachment #712461 - Flags: review?(jones.chris.g)
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+
Assignee: mwu → gsvelto
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → All
Cherry picked and placed on v1-train and v1.0.0
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).
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
b2g-manifest v1.0.1: c139b1e4acd064cedaa8c6059d953a9a7d505214
Does not make sense to create a regression issue.
Flags: in-moztrap-
Can you please provide steps to verify this fix - as we will blackbox test from the UI?
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
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.
Status: RESOLVED → VERIFIED
Blocks: 884985
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: