[Nexus 5] phone cannot startup correctly when flashing pvt "User" build

VERIFIED FIXED in Firefox 38, Firefox OS v2.2

Status

Firefox OS
General
--
critical
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: Hermes Cheng (inactive after July 27, 2015), Assigned: seinlin)

Tracking

unspecified
2.2 S6 (20feb)
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(blocking-b2g:2.2+, firefox36 wontfix, firefox37 wontfix, firefox38 fixed, b2g-v2.2 verified, b2g-master verified)

Details

Attachments

(2 attachments)

*Description:
When I flash "user" build from pvt, my device cannot startup correctly.

*pvt link:
https://pvtbuilds.mozilla.org/pvt/mozilla.org/b2gotoro/nightly/mozilla-central-nexus-5-l/latest/

*flash log:
finished. total time: 0.001s
erasing 'cache'...
OKAY [  0.640s]
formatting 'cache' partition...
Creating filesystem with parameters:
    Size: 734003200
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 7472
    Inode size: 256
    Journal blocks: 2800
    Label: 
    Blocks: 179200
    Block groups: 6
    Reserved block group size: 47
Created filesystem with 11/44832 inodes and 5813/179200 blocks
sending 'cache' (13348 KB)...
writing 'cache'...
OKAY [  1.917s]
finished. total time: 2.558s
erasing 'userdata'...
OKAY [  8.562s]
formatting 'userdata' partition...
Creating filesystem with parameters:
    Size: 13725835264
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8144
    Inode size: 256
    Journal blocks: 32768
    Label: 
    Blocks: 3351034
    Block groups: 103
    Reserved block group size: 823
Created filesystem with 11/838832 inodes and 93654/3351034 blocks
sending 'userdata' (137318 KB)...
writing 'userdata'...
OKAY [ 13.935s]
finished. total time: 22.497s
target reported max download size of 1073741824 bytes
erasing 'userdata'...
OKAY [  7.194s]
sending 'userdata' (137322 KB)...
OKAY [  4.531s]
writing 'userdata'...
OKAY [  9.175s]
finished. total time: 20.900s
target reported max download size of 1073741824 bytes
erasing 'cache'...
OKAY [  0.557s]
sending 'cache' (13348 KB)...
OKAY [  0.640s]
writing 'cache'...
OKAY [  1.078s]
finished. total time: 2.275s
target reported max download size of 1073741824 bytes
sending 'boot' (8784 KB)...
OKAY [  0.497s]
writing 'boot'...
OKAY [  0.745s]
finished. total time: 1.242s
target reported max download size of 1073741824 bytes
erasing 'system'...
OKAY [  0.723s]
sending 'system' (226948 KB)...
OKAY [  7.411s]
writing 'system'...
OKAY [ 16.535s]
finished. total time: 24.669s
rebooting...
Created attachment 8564004 [details]
screenshot of the hanging screen.jpg

The phone hangs on this screenshot.
Blocks: 1111890
blocking-b2g: --- → 2.2?
Component: Releases → General
Product: Release Engineering → Firefox OS
QA Contact: rail
James, I'm not sure if you're the right person to help here, but you probably know who is.
Flags: needinfo?(jlal)
(Assignee)

Comment 3

3 years ago
I verified that my local build (user images) does work properly; But after flash pvt build (user images) I can see the same error.
(Assignee)

Comment 4

3 years ago
I found the difference, in my local build VARIANT=userdebug, and in pvt build VARIANT=user. When VARIANT=user, disable selinux is not allowed and we doesn't have sepolicy for b2g.
(Assignee)

Comment 5

3 years ago
Created attachment 8565298 [details] [diff] [review]
User VARIANT=userdebug for nexus-5-l.

nhirata, could you review this patch?
Attachment #8565298 - Flags: review?(nhirata.bugzilla)
(Assignee)

Updated

3 years ago
Assignee: nobody → kli
Flags: needinfo?(jlal)
(Assignee)

Comment 6

3 years ago
An alternative solution is allow disable Selinux in [1] when VARIANT=user.

[1] https://github.com/mozilla-b2g/platform_system_core/blob/b2g-5.0.0_r6/init/Android.mk#L27
(Assignee)

Comment 7

3 years ago
Jed, How do you think about the alternative solution in comment 6? Thanks!
Flags: needinfo?(jld)
(In reply to Kai-Zhen Li [:kli][:seinlin] from comment #6)
> An alternative solution is allow disable Selinux in [1] when VARIANT=user.
> 
> [1]
> https://github.com/mozilla-b2g/platform_system_core/blob/b2g-5.0.0_r6/init/
> Android.mk#L27

I'd much prefer that we just created a policy - even if it doesn't restrict b2g at all it could be useful to protect from other compromised processes. Once SELinux is turned off it will hard to get it turned back on again (as we saw in the past with Seccomp-bpf)
we could have an selinux domain for b2g and b2g-related processes that is unrestricted, so that we get the default android policy for the other processes.
if useful, we can then improve the policy for b2g over time.
I tend to agree with comment #8 and comment #9.
Flags: needinfo?(jld)
Comment on attachment 8565298 [details] [diff] [review]
User VARIANT=userdebug for nexus-5-l.

lgtm.
Attachment #8565298 - Flags: review?(nhirata.bugzilla) → review+
Comment on attachment 8565298 [details] [diff] [review]
User VARIANT=userdebug for nexus-5-l.

Review of attachment 8565298 [details] [diff] [review]:
-----------------------------------------------------------------

https://bugzilla.mozilla.org/show_bug.cgi?id=1121577#c36 might be a blocker though.
(Assignee)

Comment 13

3 years ago
Thanks! I think we can use VARIANT=userdebug for pvt build. But for VARIANT=user, it would be better to have a policy for b2g.
(Assignee)

Comment 15

3 years ago
Comment on attachment 8565298 [details] [diff] [review]
User VARIANT=userdebug for nexus-5-l.

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): disable selinux is not allowed in user build
User impact if declined: pvt user build will not work
Testing completed: verified on m/c
Risk to taking this patch (and alternatives if risky): low, use 'userdebug' instead of 'user'.
String or UUID changes made by this patch: none
Attachment #8565298 - Flags: approval-mozilla-b2g37?
Used b2g-inbound build : it boots up! \o/
20150219023005

Updated

3 years ago
blocking-b2g: 2.2? → 2.2+

Updated

3 years ago
Attachment #8565298 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
https://hg.mozilla.org/mozilla-central/rev/74874130dd25
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox38: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S6 (20feb)
https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/8607670f0555
status-b2g-v2.2: --- → fixed
status-b2g-master: --- → fixed
status-firefox36: --- → wontfix
status-firefox37: --- → wontfix
Verified that the Nexus 5 L master nightly build can be flashed on a Nexus device, after which the device reboots successfully into Firefox OS.

Steps to Reproduce
1. Take a Nexus device and use the Taiwan QA flashing tool to full flash the latest nightly master build:
https://github.com/Mozilla-TWQA/B2G-flash-tool
$ ./flash_pvt -w
Flashing paramaters: nexus-5-l, mozilla-central, User, images, latest 
https://pvtbuilds.mozilla.org/pvt/mozilla.org/b2gotoro/nightly/mozilla-central-nexus-5-l/latest/

2. Verify that after flashing the phone reboots into Firefox OS.

3. Run the check_versions.sh script to determine the test environment:
$ ./check_versions.sh

This is the output:
Gaia-Rev        e4f7c67378e33e83f88d38ddb4a6c2cabf1423c3
Gecko-Rev       https://hg.mozilla.org/mozilla-central/rev/1b4c5daa7b7a
Build-ID        20150220010206
Version         38.0a1
Device-Name     hammerhead
FW-Release      5.0
FW-Incremental  eng.cltbld.20150220.043517
FW-Date         Fri Feb 20 04:35:32 EST 2015
Bootloader      HHZ11n
Status: RESOLVED → VERIFIED
verify v2.2

Gaia-Rev        ca64f2fe145909f31af266b1730874051ba76c78
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/16804008c29f
Build-ID        20150224162516
Version         37.0
Device-Name     hammerhead
FW-Release      5.0
FW-Incremental  eng.cltbld.20150224.201252
FW-Date         Tue Feb 24 20:13:07 EST 2015
Bootloader      HHZ12d
status-b2g-v2.2: fixed → verified
status-b2g-master: fixed → verified
You need to log in before you can comment on or make changes to this bug.