Closed
Bug 1139448
Opened 9 years ago
Closed 8 years ago
Make reset-gaia on emulator-kk fails with 'read-only file system'
Categories
(Firefox OS Graveyard :: Emulator, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: rwood, Unassigned)
References
Details
Start up the emulator-kk. Once booted, try to make gaia ('make reset-gaia'). It will ultimately fail with a 'read-only file system' error when attempting to push files to the emulator (see below). A workaround is to start up the emulator and then run the make command immediately and then *most times* that seems to work, but even that doesn't work all the time. This is a real hassle when making gaia for the emulator-kk and will block automation. This does not happen on the regular 'emulator' build, just on 'emulator-kk'. On the 'emulator' build a make reset-gaia works every time even after it is booted up. ... failed to copy 'shared/elements/gaia-icons/fonts/gaia-icons.ttf' to '//system/fonts/hidden/gaia-icons.ttf': Read-only file system failed to copy 'shared/style/keyboard_symbols/Keyboard-Symbols.ttf' to '//system/fonts/hidden/Keyboard-Symbols.ttf': Read-only file system [push] Restarting B2G... [svoperapps.js] PROFILE_DIR, GAIA_DISTRIBUTION_DIR, VARIANT_PATH are all required [settings.js] Writing settings file: /home/rwood/gaia/profile/settings.json [settings.js] Writing settings file: /home/rwood/gaia/profile/defaults/settings.json adb shell stop b2g adb remount remount succeeded adb push profile/settings.json /system/b2g/defaults/settings.json failed to copy 'profile/settings.json' to '/system/b2g/defaults/settings.json': Read-only file system make: *** [install-default-data] Error 1
Comment 1•9 years ago
|
||
Does adding a delay between the adb remount and the attempt to push change things? I'm going to guess that the remount succeeded isn't actually waiting until the remount has been completed. After it fails, what does the output of 'adb shell mount' show?
Reporter | ||
Comment 2•9 years ago
|
||
No, a pause after the remount doesn't help. Even if I try it manually after, same error: rwood@ubuntu:~/gaia$ adb remount remount succeeded rwood@ubuntu:~/gaia$ adb push profile/settings.json /system/b2g/defaults/settings.json failed to copy 'profile/settings.json' to '/system/b2g/defaults/settings.json': Read-only file system Output from 'adb shell mount': rwood@ubuntu:~/gaia$ adb shell mount rootfs / rootfs ro,relatime 0 0 tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0 devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0 proc /proc proc rw,relatime 0 0 sysfs /sys sysfs rw,seclabel,relatime 0 0 selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0 debugfs /sys/kernel/debug debugfs rw,relatime 0 0 none /acct cgroup rw,relatime,cpuacct 0 0 none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0 tmpfs /mnt/asec tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0 tmpfs /mnt/obb tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0 none /dev/cpuctl cgroup rw,relatime,cpu 0 0 /dev/block/mtdblock0 /system ext4 ro,seclabel,relatime,data=ordered 0 0 /dev/block/mtdblock1 /data ext4 rw,seclabel,nosuid,nodev,noatime,nomblk_io_submit,data=ordered 0 0 /dev/block/vold/179:0 /mnt/media_rw/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0 /dev/fuse /storage/sdcard fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
Reporter | ||
Updated•9 years ago
|
Reporter | ||
Comment 3•9 years ago
|
||
This is still happening. I really don't know how to fix this... :dhylands, does the info in comment 2 help at all? Thanks
Flags: needinfo?(dhylands)
Comment 4•9 years ago
|
||
> /system ext4 ro,seclabel,relatime,data=ordered 0 0
This tells me that /system is still mounted read-only, which is the problem.
Did you do an adb root before the adb remount?
After doing adb root, if you do an adb shell do you get a $ or # in the prompt?
The only other thing to try (but this will only work if you can get a root shell - i.e. # in the prompt).
adb shell mount -w -o remount /system
If that works and adb remount doesn't, then maybe the adb being used on the host is too old?
When I run adb version I get this output: Android Debug Bridge version 1.0.31
Flags: needinfo?(dhylands)
Reporter | ||
Comment 5•9 years ago
|
||
Thanks Dave. Already running as adb root: rwood@ubuntu:~/gaia$ adb root adbd is already running as root rwood@ubuntu:~/gaia$ adb shell root@generic:/ # rwood@ubuntu:~/gaia$ adb shell mount -w -o remount /system mount: Read-only file system rwood@ubuntu:~/gaia$ adb push profile/settings.json /system/b2g/defaults/settings.json failed to copy 'profile/settings.json' to '/system/b2g/defaults/settings.json': Read-only file system Note that this only happens when doing a gaia/make reset-gaia with the emulator-kk; a make reset-gaia with the emulator-ics works fine (is there something being done differently in the emulator-kk build with /system permissions maybe?). My machine (ubuntu 14.04 64-bit) also has ADB 1.0.31. So are you not seeing this same issue on your machine?
Flags: needinfo?(dhylands)
Comment 6•9 years ago
|
||
So I can reproduce the problem, in that I can sometimes get the same error when I run make reset-gaia.
However, if I boot up the emulator and then just do an adb remount then it works properly.
I noticed that make reset-gaia seems to call adb remount several times (I counted 3 occurences of "remount succeeded") in my terminal window.
It seems to be some type of timing problem. If I change gaia/build/push-to-device.js:
> if (/^\/system\//.test(remotePath)) {
> return sh.run(['-c', adb + ' remount']);
> }
> }).then(function() {
> return sh.run(['-c', adb + ' shell sleep 1']);
> }).then(function() {
> if (buildAppName === '*') {
I added the sleep 1, then I can't get it to fail. Adding any kind of debug to try and figure out why it was failing would make it not fail.
Flags: needinfo?(dhylands)
Reporter | ||
Comment 7•9 years ago
|
||
Thanks Dave. Even with the exact same changes as in comment 6, it still happens. No matter how long I made the sleep. I put sleeps in lots of places wherever adb is used, and it still happens every time, fails to push because "read-only file system". I have no idea. I'm going to see if this happens inside my raptor docker container, if it doesn't then it won't really be an issue for raptor anyway.
Reporter | ||
Comment 8•9 years ago
|
||
This issue happens with the kk-emulator inside the raptor-tester docker container also, so this is definitely a blocker to upgrading raptor to using emulator-kk. [settings.js] Writing settings file: /home/worker/gaia/profile-raptor/defaults/settings.json adb shell stop b2g adb remount remount succeeded adb push profile-raptor/settings.json /system/b2g/defaults/settings.json failed to copy 'profile-raptor/settings.json' to '/system/b2g/defaults/settings.json': Read-only file system make[1]: *** [install-default-data] Error 1 make[1]: Leaving directory `/home/worker/gaia' make: *** [raptor] Error 2 rwood@ubuntu:~/raptor-tester$
Comment 9•9 years ago
|
||
I think that part of the problem is probably related to the number of times /system is remounted and possibly the number of times that b2g is stopped/started to perform the reset-gaia. The early remounts seem to be working and its one of the later ones which is failing.
Reporter | ||
Updated•9 years ago
|
Summary: [raptor] Make reset-gaia on emulator-kk fails with 'read-only file system' → Make reset-gaia on emulator-kk fails with 'read-only file system'
Reporter | ||
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•