Closed Bug 1132397 Opened 5 years ago Closed 5 years ago

[Flame][System]The "Enter SIM1 PIN" page does not appear while we disable airplane mode.

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(blocking-b2g:2.2+, b2g-v2.0 unaffected, b2g-v2.1 affected, b2g-v2.2 verified, b2g-master verified)

VERIFIED FIXED
2.2 S7 (6mar)
blocking-b2g 2.2+
Tracking Status
b2g-v2.0 --- unaffected
b2g-v2.1 --- affected
b2g-v2.2 --- verified
b2g-master --- verified

People

(Reporter: jihao, Assigned: apastor)

References

Details

(Keywords: regression, Whiteboard: [systemsfe])

Attachments

(6 files)

Attached file logcat_flame_1719.txt
[1.Description]:
[Flame][v2.1&2.2&3.0]Only "Enter SIM 2 PIN" page pops up while we disable airplane mode.
Attachment: logcat_flame_1719.txt and no_pin_prompt.3gp
Occurrence time: 17:19

[2.Testing Steps]: 
Set up: 1. There are two SIM cards in device.
            2. Set the PIN for SIM card.

1. Activate airplane mode and then disable it.
   Maybe you need repeat step 1 a few times.

[3.Expected Result]: 
1. Both "Enter SIM 2 PIN" and "Enter SIM 2 PIN" page will pop up.

[4.Actual Result]: 
1. Only "Enter SIM 2 PIN" page pops up.

[5.Reproduction build]: 
Flame 2.1 build:
Build ID               20150211001259
Gaia Revision          af0131a6ba7bf12ac3dc4d94225a7f4e62589ecb
Gaia Date              2015-02-11 02:55:30
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/b6b59143a192
Gecko Version          34.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150211.034325
Firmware Date          Wed Feb 11 03:43:36 EST 2015
Bootloader             L1TC000118D0

Flame 2.2 build:
Build ID               20150211002505
Gaia Revision          943be6fd146017dcd9d4c9d1027be1e43bad13eb
Gaia Date              2015-02-11 08:01:09
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/e614443583e7
Gecko Version          37.0a2
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150211.040242
Firmware Date          Wed Feb 11 04:02:53 EST 2015
Bootloader             L1TC000118D0

Flame 3.0 build:
Build ID               20150211010216
Gaia Revision          8c7865486a1b11076b849bbf8f7fccbaffbfafe7
Gaia Date              2015-02-10 17:34:35
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/ee093ca70666
Gecko Version          38.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150211.043725
Firmware Date          Wed Feb 11 04:37:36 EST 2015
Bootloader             L1TC000118D0

[6.Reproduction Frequency]: 
Always Recurrence,5/5

[7.TCID]: 
Free Test

[8.NOTE]
If we lock and unlock device,the "Enter SIM 1 PIN" page will pops up.
Attached video no_pin_prompt.3gp
Works okay with V2.1, 
Set 2.2? for regression. 
Set regressionwindow-wanted to find a window.

Serial: e47cd843 (State: device)
Build ID               20150212161354
Gaia Revision          88084bc7ef5ba6627dd09c774ef2f7fa96cbed71
Gaia Date              2015-02-11 15:02:07
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/eafa6c73ef0b
Gecko Version          34.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150212.200114
Firmware Date          Thu Feb 12 20:01:25 EST 2015
Bootloader             L1TC000118D0
blocking-b2g: --- → 2.2?
QA Whiteboard: [COM=Gaia::System]
QA Contact: jmercado
This bug actually DOES occur on Flame 2.1 but the reproduction rate of it is not 100% (19/20 attempts reproduced).  I cannot reproduce this issue on the latest 2.0, but it does occur in 2.0 central on the JB base so it was likely fixed in the 2.0 aurora or b2g34 branch at some point.  I am going to look for that window now.

Earliest build
Environmental Variables:
Device: Flame 2.0
BuildID: 20140506163010
Gaia: 98ca8c55dbe2f21a8661d0eaa87f34d316c3bc98
Gecko: 4e4e0f502969
Version: 32.0a1 (2.0) 
Firmware Version: v123
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0

Lasted 2.1
Environmental Variables:
Device: Flame 2.1
BuildID: 20150212215558
Gaia: e8eba437af02820f74d122aec83b6001df6f89e3
Gecko: a64519246a81
Version: 34.0 (2.1) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0

Latest 2.0
Environmental Variables:
Device: Flame 2.0
BuildID: 20150213121303
Gaia: ecb1bbc3b9c00f82df172427f65d6f67e34ed533
Gecko: d04b996fb741
Version: 32.0 (2.0) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
Flags: needinfo?(ktucker)
I actually can't find the fixed window in 2.0 either.  It is fixed in the earliest Flame KK b2g34 2.0 builds, but we no longer have the JB aurora or b2g34 2.0 builds in order for me to go back earlier.

Environmental Variables:
Device: Flame 2.0
BuildID: 20140904114640
Gaia: 13978cf2230652274969536322378d448fd142a4
Gecko: 2537ab191112
Version: 32.0 (2.0) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
QA Whiteboard: [COM=Gaia::System] → [QAnalyst-Triage?][COM=Gaia::System]
QA Whiteboard: [QAnalyst-Triage?][COM=Gaia::System] → [QAnalyst-Triage+][COM=Gaia::System]
Flags: needinfo?(ktucker)
I've been taking a look at this issue. It seems that we have a race condition here. When the radio is enabled, for some reason, the cardstatechange of the SIM2 is received before the SIM1 event. So the second dialog is shown instead of the first one.

Alive do you have any ideas about how can we take care of this race condition in gaia?
Flags: needinfo?(alive)
(In reply to Manuel Casas Barrado [:mancas] from comment #5)
> I've been taking a look at this issue. It seems that we have a race
> condition here. When the radio is enabled, for some reason, the
> cardstatechange of the SIM2 is received before the SIM1 event. So the second
> dialog is shown instead of the first one.
> 
> Alive do you have any ideas about how can we take care of this race
> condition in gaia?

Maybe we could have a timer to ensure we have two events got before showing the dialog.
Alberto? Any thoughts?
Flags: needinfo?(alive) → needinfo?(apastor)
Alive, I've implemented a first approach to solve this issue. I'm not sure if this is what you want to make here, but it's a beginning

WDYT?
Flags: needinfo?(alive)
[Blocking Requested - why for this release]:
blocking-b2g: 2.2? → 2.2+
After bisecting master, it seems that Bug 1110660 caused this regression (which was uplifted to 2.1 and 2.2). I'll investigate it, adding a test for avoiding more regressions.
Flags: needinfo?(apastor)
Assignee: nobody → apastor
Depends on: 1126082
Alberto is on it.
Flags: needinfo?(alive)
Whiteboard: [systemsfe]
Attachment #8568440 - Flags: review?(alive)
Attachment #8568440 - Flags: review?(alive) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Comment on attachment 8568440 [details] [review]
[gaia] albertopq:1132397-unknown-sim > mozilla-b2g:master

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): Partially, by Bug 1110660
[User impact] if declined: Slot 1 PIN dialog is not shown, not only when switching airplane mode, but on startup as well
[Testing completed]: Added tests to check those cases. Manually checked with 1 and 2 sims, both locked and also with only 1 locked
[Risk to taking this patch] (and alternatives if risky): Given the tests added, I would say that the risk is low
[String changes made]: none
Attachment #8568440 - Flags: approval-gaia-v2.2?(fabrice)
Attachment #8568440 - Flags: approval-gaia-v2.2?(fabrice) → approval-gaia-v2.2?(release-mgmt)
Attached video video
This problem is verified pass on latest build of Flame3.0
See attachments: Verify_video.MP4
Rate: 0/5

Flame 3.0 build:
Build ID               20150226010233
Gaia Revision          7894b929f1b0394f3c997f72a6482bc7813e758d
Gaia Date              2015-02-25 20:50:05
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/dd6353d61993
Gecko Version          39.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150226.043500
Firmware Date          Thu Feb 26 04:35:10 EST 2015
Bootloader             L1TC000118D0
QA Whiteboard: [QAnalyst-Triage+][COM=Gaia::System] → [QAnalyst-Triage+][COM=Gaia::System][MGSEI-Triage+]
Attachment #8568440 - Flags: approval-gaia-v2.2?(release-mgmt) → approval-gaia-v2.2?(bbajaj)
Attachment #8568440 - Flags: approval-gaia-v2.2?(bbajaj) → approval-gaia-v2.2+
This issue still occur on the latest Nightly Flame 3.0 and 2.2 builds.  I also checked Shine's build from comment 15 and was able to reproduce this issue.

Actual Results: The prompt for SIM pin 1 does not appear when turning of Airplane mode.
	
Environmental Variables:
Device: Flame 3.0
BuildID: 20150303010233
Gaia: c8ed1085a67490a1ecd7f275e5de9487e1b93b1d
Gecko: 0b3c520002ad
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 39.0a1 (3.0) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:39.0) Gecko/39.0 Firefox/39.0

Environmental Variables:
Device: Flame 2.2
BuildID: 20150303002527
Gaia: 3d188c414e30acc392253d5389a42352fcfbc183
Gecko: c89aad487aa5
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 37.0 (2.2) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0

Environmental Variables:
Device: Flame 3.0
BuildID: 20150226010233
Gaia: 7894b929f1b0394f3c997f72a6482bc7813e758d
Gecko: dd6353d61993
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 39.0a1 (3.0) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:39.0) Gecko/39.0 Firefox/39.0
QA Whiteboard: [QAnalyst-Triage+][COM=Gaia::System][MGSEI-Triage+] → [QAnalyst-Triage+][COM=Gaia::System][MGSEI-Triage+][failed-verification]
Flags: needinfo?(ktucker)
True. I just repro it again (only the first time you go to Airplane mode though). I'll take a look tomorrow.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Flags: needinfo?(ktucker)
The behavior is inconsistent, sometimes I got requests from both SIM1 & SIM2, mostly with SIM2 only. I tried to turn it off from these 3 ways.

1. Turn off airplane mode from Quick settings.
2. Turn off airplane mode from menu from long tap power button.
3. Turn off airplane mode from Settings.

Build ID               20150303002527
Gaia Revision          3d188c414e30acc392253d5389a42352fcfbc183
Gaia Date              2015-03-03 00:53:42
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/c89aad487aa5
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150303.034757
Firmware Date          Tue Mar  3 03:48:06 EST 2015
Bootloader             L1TC100118D0

We also have similar bug 1133465 & bug 1138858 (nexus 5).
See Also: → 1133465, 1138858
Comment on attachment 8572787 [details] [review]
[gaia] albertopq:1132397-unknown-sim > mozilla-b2g:master

Apparently, we receive now the cardState as empty or null initially as well.
Attachment #8572787 - Flags: review?(alive)
Comment on attachment 8572787 [details] [review]
[gaia] albertopq:1132397-unknown-sim > mozilla-b2g:master

Great
Attachment #8572787 - Flags: review?(alive) → review+
master: https://github.com/mozilla-b2g/gaia/commit/3093f1dda2d7fc53a6a5f980c032a8ecd1f25eaf
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Comment on attachment 8572787 [details] [review]
[gaia] albertopq:1132397-unknown-sim > mozilla-b2g:master

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): -
[User impact] if declined: Sometimes, the sim1 is not shown when entering in airplane mode
[Testing completed]: Added unit tests
[Risk to taking this patch] (and alternatives if risky): Low risk, given the changed code and the tests added
[String changes made]: -
Attachment #8572787 - Flags: approval-gaia-v2.2?(bbajaj)
Attachment #8572787 - Flags: approval-gaia-v2.2?(bbajaj) → approval-gaia-v2.2+
This issue is verified fixed on the latest Nightly Flame 3.0 build.

Actual results: The Sim Pin 1 screen does appear when enabling and disabling airplane mode.

Environmental Variables:
Device: Flame 3.0
BuildID: 20150309010232
Gaia: fea83511df9ccba64259346bc02ebf2c417a12c2
Gecko: eab4a81e4457
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 39.0a1 (3.0) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:39.0) Gecko/39.0 Firefox/39.0
QA Whiteboard: [QAnalyst-Triage+][COM=Gaia::System][MGSEI-Triage+][failed-verification] → [QAnalyst-Triage?][COM=Gaia::System][MGSEI-Triage+]
Flags: needinfo?(ktucker)
Keywords: verifyme
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage?][COM=Gaia::System][MGSEI-Triage+] → [QAnalyst-Triage+][COM=Gaia::System][MGSEI-Triage+]
Flags: needinfo?(ktucker)
This issue is also verified fixed on the latest Nightly Flame 2.2 build.

Actual Results: The Sim Pin 1 does not get skipped. (0/20 attempts reproduced the bug)

Environmental Variables:
Device: Flame 2.2
BuildID: 20150316002502
Gaia: a6b2d3f8478ec250beb49950fecbb8a16465ff6f
Gecko: 18619f8f6c5c
Gonk: b83fc73de7b64594cd74b33e498bf08332b5d87b
Version: 37.0 (2.2) 
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
QA Whiteboard: [QAnalyst-Triage+][COM=Gaia::System][MGSEI-Triage+] → [QAnalyst-Triage?][COM=Gaia::System][MGSEI-Triage+]
Flags: needinfo?(ktucker)
Keywords: verifyme
QA Whiteboard: [QAnalyst-Triage?][COM=Gaia::System][MGSEI-Triage+] → [QAnalyst-Triage+][COM=Gaia::System][MGSEI-Triage+]
Flags: needinfo?(ktucker)
You need to log in before you can comment on or make changes to this bug.