Closed Bug 965346 Opened 11 years ago Closed 11 years ago

When toggling airplane mode multiple times, Gaia doesn't send SetRadioEnabled true so the phone is stuck in the radio off state and UI is messed up.

Categories

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

x86_64
Gonk (Firefox OS)

Tracking

(blocking-b2g:1.3+, b2g-v1.3 fixed, b2g-v1.3T fixed, b2g-v1.4 fixed)

VERIFIED FIXED
1.4 S2 (28feb)
blocking-b2g 1.3+
Tracking Status
b2g-v1.3 --- fixed
b2g-v1.3T --- fixed
b2g-v1.4 --- fixed

People

(Reporter: nsarkar, Assigned: tedders1)

References

()

Details

(Keywords: regression, Whiteboard: [caf priority: p2][CR 608234][systemsfe][ETA:2/13][p=3])

Attachments

(6 files)

When we toggle airplane mode multiple times, we see that Gaia sends SetRadioEnabled - of/on continously. It does it correctly for a bunch of times but after a while, we see that that radio is in off state and Gaia never sends a on to turn it back on. The Airplane mode setting shows on and you can't toggle it anymore. Maybe that's why Gaia doesn't send a radio on. The UI doesn't freeze but the signal strength indicator gets to a bad state where it shows a searching icon constantly for a long time until we reboot the phone.
blocking-b2g: 1.3? → 1.3+
Component: Gaia → Gaia::System
Is this a regression from 1.2?
Used to work on 1.3 as well before https://bugzilla.mozilla.org/show_bug.cgi?id=856553
Blocks: 856553
Hi aknow, can you take a look please? thanks!
Flags: needinfo?(szchen)
Hi, I can reproduce with my Keon 1.3.0.0-prerelease. This is a regression, it was working correctly with the 1.2.0.0-prerelease. But for me, no need to switch for a while as described on the first post. Simply turn airplane mode on and then turn it off, the airplane icon will disappear, but no PIN code to unlock the sim is asking. So the signal strength indicator shows no signal, and the settings shows "sim card locked".
Btw if I switch off the screen and the switch it on, so I am now on the lock screen, when I unlock the screen, the pin will be asked, and the sim card will be unlocked.
Nivi, I've been trying a dozen of times on current v1.3 and I'm unable to reproduce on Buri. However, if I set a PIN code, I get something quite close to your bug.
Flags: needinfo?(nsarkar)
Assignee: nobody → kaze
un-assign kaze everyone can take it
Assignee: kaze → nobody
I tried to reproduce this bug on an Unagi and Nexus 4, but without success. Toggling airplane mode is slow at times, but always works.
Interestingly, SIM PIN breaks when I try to reproduce this bug. See bug 966243 for the details.
I am able to reproduce the issue after toggling apm for a very long time. When that happens, I can't toggle APM for a couple of mins at all. The UI doesn't let me even though I keep clicking on it. It's hard to reproduce the issue every time but there is definitely something going wrong. I didn't try with a SIM Pin code set. But might be a similar issue.
Flags: needinfo?(nsarkar)
Assignee: nobody → tclancy
Whiteboard: [CR 608234] → [CR 608234][systemsfe]
I can't reproduce this either. (I'm using a Peak.) Nivi, could you please provide exact steps to reproduce this problem?
Flags: needinfo?(nsarkar)
Can we get ETA to fix this bug? Thank you.
Target Milestone: --- → 1.4 S1 (14feb)
(In reply to Kevin Hu [:khu] from comment #12) > Can we get ETA to fix this bug? Thank you. Please see comment 11.
Whiteboard: [CR 608234][systemsfe] → [CR 608234][systemsfe][ETA:2/7]
Inder, MOZ is unable to reproduce internally. Can you please look into it?
Flags: needinfo?(ikumar)
Preeti -- Talked to Nivi and she is going to add more info here.
Flags: needinfo?(ikumar)
Attached file apm_toggle
Hi, I was able to reproduce the issue on a 1.3 build on our test device. I just kept toggling airplane mode really quick and I got into a state where the signal bar strength was showing activity and soon after that the phone was stuck in airplane mode. The APM toggle button is usable after that (UI doesnot freeze) but nothing happens when I click it. I have a video and a picture as well as adb main and radio logs. I have attached all of those. Let me know if you have any questions. Nivi.
Flags: needinfo?(nsarkar)
Flags: needinfo?(szchen)
Hi all, I quickly toggled APM for more than 20 times but still can't reproduce this problem. Does this still happen with latest v1.3 code ? Here comes some information of my Inari. Gaia ebc3b39b7e8360c7a2e7823ab3a1d9dad07e22cf Gecko http://hg.mozilla.org/releases/mozilla-aurora/rev/3d9d920ca43b BuildID 20140203004001 Version 28.0a2 ro.build.version.incremental=eng.cltbld.20130410.100924 ro.build.date=Wed Apr 10 10:09:30 EDT 2013
Whiteboard: [CR 608234][systemsfe][ETA:2/7] → [CR 608234][systemsfe][ETA:2/7][p=3]
Whiteboard: [CR 608234][systemsfe][ETA:2/7][p=3] → [CR 608234][systemsfe][ETA:2/11][p=3]
QA Wanted - Can someone on Moz QA try to reproduce?
Keywords: qawanted
Reproduced in Buri V1.3 PVT build Gaia f9a37c77efb4621a1f57e4695b497d18601fe134 Gecko http://hg.mozilla.org/releases/mozilla-aurora/rev/3d9d920ca43b BuildID 20140203004001 Version 28.0a2 ro.build.version.incremental=324 ro.build.date=Thu Dec 19 14:04:55 CST 2013 I suspect that doing it quickly with turning on and off wifi/geolocation will make reproduction faster.
Keywords: qawanted
Sorry, I actually try to guess that Nivi did something else accidentally and then tap on airplane mode. However, I am still trying to reproduce it with only turn on and off airplane mode. any other QA please help if interested in this.
Keywords: qawanted
Another observation: If you connect to a wifi spot first, and you start to quickly turning on and off airplane mode, it will be easier to reproduce, too.
Nivi, I wasn't connected to Wifi and yes you need to toggle really quickly like keep tapping on it. It's a wierd test case :) but the problem is reproducible that way.
Walter - how fast are you toggling airplane mode setting on and then off again? I am only able to do the toggle on/off as fast as the toggle UI responds (about 3-5 seconds per cycle), and I'm definitely not seeing the issue if I try with Wifi switched on. Have also alternated between toggling off and on all of the following settings, in succession: 1.) airplane mode 2.) geolocation 3.) wi-fi 4.) cellular & data/data connection But each and every time network comes back on reliably. I am not seeing this issue: Buri, running today's 1.3: Gaia 5c8416fb1ea4a27f172ee6386ab3c19135448506 Gecko https://hg.mozilla.org/releases/mozilla-b2g28_v1_3/rev/9c9382f433c0 BuildID 20140210004002 Version 28.0 ro.build.version.incremental=324 ro.build.date=Thu Dec 19 14:04:55 CST 2013
Nivi, I'm able to cycle on/off with slightly faster cycles <1 sec, but I'm still not seeing the issue on my device/build.
Uh oh. I think I've reproduced this on a Keon. (I couldn't do it on any other device I used.) STR: 1. Have wifi turned on and be connected to a network. 2. Have a valid SIM card inserted, and be connected to a cellular network. 3. Open the settings drawer. 4. Rapidly tap the Airplane mode button multiple times a second for several seconds (without waiting for the airplane mode to actually toggle). Result: The phone gets stuck in state where the signal strength indicator (for the cellular connection) indicates that the phone is scanning for a cellular connection. You can no longer toggle Airplane mode. I'm investigating.
Keywords: qawanted
John, I toggle it really fast, just continuously tapping on it. There are two scenario it might reproduce: 1. When you first connect to a Wifi and/or bluetooth device: Start to toggle it on and off 2. Toggle it on and off, but wrongly turn on and off wifi/geolocation, and come back to toggle it on and off. And, I agree to comment 28 that having a valid SIM is helpful in reproducing it.
Nivi, Did you do anything before toggle on and off? how fast do you toggle on and off? Is it a moz ril or com ril? any more version information? Is it flash gaia & gecko only or full flash? Can you provide more details?
NI Nivi for more questions per comment 31
Flags: needinfo?(nsarkar)
Whiteboard: [CR 608234][systemsfe][ETA:2/11][p=3] → [CR 608234][systemsfe][ETA:2/13][p=3]
Comment 28 seems to be the exact same steps I took to reproduce. I just didn't connect to wifi but have a valid SIM card connected to network. I am sorry I forgot to mention that. That seems to be the key point. I see this with MozRil. I just keep on tapping APM mode settings on/off continuously < a sec or even faster and don't wait for the mode to actually toggle. Just keep tapping on it again and again. I did a full flash gaia + gecko on a build from last week. I am sorry I don't have the version info handy but I am pretty sure it would be reproducible on 1.3 from last week.
Flags: needinfo?(nsarkar)
Attachment #8375633 - Flags: review?(mrbkap)
Attachment #8375633 - Flags: approval-gaia-v1.3?(fabrice)
Attached file Bug 965346 - Part 2
Attachment #8375636 - Flags: review?(alive)
Attachment #8375636 - Flags: approval-gaia-v1.3?(fabrice)
There seem to be two different issues here. One is in gecko and one is in gaia, so I couldn't put them both in the same patch. On the gecko side, there was an error in WifiWorker.js at line 1038 if |reply| was null. That prevented the callback function from being called, so the status bar in gaia was stuck waiting for a callback. On the gaia side, in airplane_mode.js, if enabling or disabling the radio failed, |AirplaneMode|'s |_enabled| flag would be adjusted accordingly without calling _updateAirplaneModeStatus(). This would result in the status bar being unaware of the change in Airplane Mode status. (For example, if the user taps the Airplane icon twice rapidly, this would cause TWO requests to turn on airplane mode (which requires disabling the radio). When the first request succeeds, |_enabled| would be set to |true|, and the status bar would be informed. When the second request fails, |_enabled| would be set to |false|, but the status bar would NOT be informed.) I'm not sure if it makes sense to allow multiple "toggle airplane mode" requests to be queued up, but I don't think it's something I'd want to change this close to our release. I'm also unclear on what |checkedActions['conn']| is used for, and I wonder if it's unused, but it's also not something I'm comfortable changing this close to release.
Attachment #8375633 - Flags: review?(mrbkap) → review+
Flags: needinfo?(fabrice)
(In reply to Ted Clancy [:tedders1] from comment #36) > (For example, if the user taps the Airplane icon twice rapidly, this would > cause TWO requests to turn on airplane mode (which requires disabling the I thought we would block the toggle to make users unable to turn it on again, didn't we ? Does this happen rarely if you reallllly click it too fast ? If so, there must be a timing difference between blocking APM toggle and second tap on APM toggle. > radio). When the first request succeeds, |_enabled| would be set to |true|, > and the status bar would be informed. When the second request fails, > |_enabled| would be set to |false|, but the status bar would NOT be > informed.) Can you be more clear about `second` request here ? Did you test on Fugu(DSDS phone with two simcards inserted) or the other single sim device ?(with clicking too fast to make second request here) > I'm not sure if it makes sense to allow multiple "toggle airplane mode" > requests to be queued up, but I don't think it's something I'd want to > change this close to our release. I'm also unclear on what > |checkedActions['conn']| is used for, and I wonder if it's unused, but it's You can check `_checkedActionsMap` for more information. The reason why we need checkedActions is because long time ago, we all depend on mozSettings key to make sure any service is done (wifi is closed, bluetooth is open ... blah). But this would cause a timing issue to make APM unstable (Because we won't really wait them until related actions are done). In this way we created `_checkedActionsMap` to make sure when toggling APM, related services would finish its related operations and emit events out to tell APM unlock UI. As naming has described, `checkedActions['conn']` is used to make sure all mozMobileConnections related operations have been finished. > also not something I'm comfortable changing this close to release. Because I still can't reproduce this bug on my side, I can only help you with information I know. Thanks Ted.
Attachment #8375633 - Flags: approval-gaia-v1.3?(fabrice) → approval-gaia-v1.3+
Flags: needinfo?(fabrice)
> I thought we would block the toggle to make users unable to turn it on again, didn't we ? We do check the current state, but that state is updated via a callback after the radio is enabled/disabled (which takes some time). > Does this happen rarely if you reallllly click it too fast ? Yes, you do have to tap quite fast. > Can you be more clear about `second` request here ? Did you test on Fugu(DSDS phone with two simcards inserted) or the other single sim device ?(with clicking too fast to make second request here) No, I didn't test with a DSDS phone. I tested on a single-SIM Keon device. Yes, the second request is created by clicking fast. > As naming has described, `checkedActions['conn']` is used to make sure all mozMobileConnections related operations have been finished. Okay. It sounds like my patch is doing the right thing, then. With my patch, |checkedActions['conn']| is set to true on both success and failure. Does that sound correct to you? Thanks.
(In reply to Ted Clancy [:tedders1] from comment #38) > Okay. It sounds like my patch is doing the right thing, then. With my patch, > |checkedActions['conn']| is set to true on both success and failure. Does > that sound correct to you? Yeah, based on our discussions on Github, this behavior is right ! And by the way, can you put some comments on the code the describe the situation about the error case and why we need to move the checkedActions['conn'] outside the block ? Thanks ! :)
Comment on attachment 8375636 [details] [review] Bug 965346 - Part 2 r+ if this really solves the problem.
Attachment #8375636 - Flags: review?(alive) → review+
Ted, do we have any tests or verification from QA? Please fill in the small questionnaire when asking for approval.
Flags: needinfo?(tclancy)
Target Milestone: 1.4 S1 (14feb) → 1.4 S2 (28feb)
checkin-needed for gaia part since the tree is closed
Keywords: checkin-needed
Umm...an interesting question. What does it mean by "r+ if this really solves the problem."? I kind of confused when I think that a review should include a validation on functionality?
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
https://hg.mozilla.org/releases/mozilla-b2g28_v1_3/rev/a3ce92fdad2a Not setting status-b2g-v1.3 to fixed since the Gaia patch still needs to land.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Keywords: verifyme
I was able to reproduce this issue following the steps in comment 28 on the latest buri v 1.4.0 Mozilla RIL Environmental Variables Device: Buri v 1.4.0 Mozilla RIL Build ID: 20140224040201 Gecko: https://hg.mozilla.org/mozilla-central/rev/31113754db3b Gaia: ffb527b84594396ed611edf0a8a5a130d60a742f Platform Version: 30.0a1 Firmware Version: v1.2-device.cfg The phone gets stuck in a state where it is constantly searching for a data and wifi connection and airplane mode can not be toggled on.
Uplifted b30742e845f603441942ed295fa5359d9704b20a to: v1.3: 0f1d5614e4befce9566f95f591cbd90c49e0d884
ktucker, are you sure this is the same issue? Because this issue wasn't previously seen on the Buri devices, and it would be unbearably ironic if my patch *introduced* the issue it was designed to fix. And could you also try testing on a Keon device?
We do not have a Keon device to verify this on. We will need someone else to complete the verify for this issue.
I could reproduce this issue on the latest Buri v 1.4.0 Mozilla RIL with the steps from comment 28. I am querying to see if this is a known issue on the Buri and if it is not, i will write up a new issue.
Flags: needinfo?(tclancy)
Nivi, what device were you using? And do you still see the issue?
Flags: needinfo?(nsarkar)
Nivi - Can you handle verifying this bug, since you had the original STR nailed down? We're having trouble reproducing the original bug on Buri.
Keywords: verifyme
Sure. I will test it tomo. Thanks, Nivi.
Flags: needinfo?(jhammink)
Unfortunately I cannot do anything about this on Keon. Of the four phones I've tried, not a single one can hold a charge.
I'm still unclear on what device Nivi was using when the issue was discovered. Nivi, could you tell us?
Removing ni
Flags: needinfo?(jhammink)
Walter was the one who reported seeing this issue on a Buri. Maybe Walter should test the Buri. Walter, do you still see this issue on Buri?
Flags: needinfo?(wachen)
Okay, this thread has become quite large, so I'm going to summarize it by device. This issue wasn't seen on an Unagi (:tdz, Comment 8). This issue wasn't seen on a Peak (:tedders1, Comment 11). This issue wasn't seen on an Inari (:eragon, Comment 20). Navi reports seeing the issue, but hasn't said what device he was using. I saw the issue on a Keon (:tedders1, Comment 28). I submitted patches that fix the issue for me. No one else seems to have a Keon to verify this, unfortunately. (Flaburgan also reports seeing an issue on the Keon, but seems to be describing a different issue entirely.) I could not see the issue on Buri, and neither could :gerard-majax (Comment 6) or :jhammink (Comment 26, Comment 29). Walter is the only one who reported seeing the issue on a Buri (:wachen, Comment 22). *After* I landed my patch, ktucker reported seeing the issue on a Buri. It's possible that the issue on the Keon and the Buri are different issues. I'd really like Walter to see try to reproduce the issue on his Buri using the latest master. If Walter no longer sees the problem, I'm going to guess that maybe ktucker is seeing a different issue (and I will try to confirm that), and I would like to see this issue closed. If Walter still sees the issue, then I need to get my hands on Walter's Buri somehow, because apparently it's a different issue from what I was seeing on my Keon.
Also, this issue has been bounced around quite a bit. I'd appreciate if no further QA people got involved at this time. If you're a QA person thinking of verifying this, maybe you should see if there's something else you can do.
(In reply to ktucker from comment #49) > The phone gets stuck in a state where it is constantly searching for a data > and wifi connection and airplane mode can not be toggled on. ktucker, are you sure the phone was stuck? How long did you wait? Even with my patch, if you tap the button enough times, it can take the phone some time to process all your taps. That's not the same as being stuck.
Flags: needinfo?(ktucker)
(Nivi, my apologies for repeatedly referring to you as "he". I was confusing you with someone else.)
In reply to comment 63. I assure you that the device was stuck searching for a WiFi and cell signal after reproducing the issue using the steps from Comment 28. The airplane mode toggle also stopped responding to my touch. I waited a good 5 mintues at least. The difference here is the reporter of this issue says that his WiFi was not turned on. I could only reproduce the issue on the Buri when WiFi and Data were both on.
Flags: needinfo?(ktucker)
Here comes a question: we have different entries (settings app, quick settings and sleep menu) to toggle airplane mode. Are you guys using the same way to toggle it or not ? Because there is no step talking about this, just want to make sure all of us using the same ways to reproduce the problems.
(In reply to Ted Clancy [:tedders1] from comment #58) > I'm still unclear on what device Nivi was using when the issue was > discovered. Nivi, could you tell us? I tested on a jb-based device. You don't have to apologize for calling me a "he". :) It's hard to figure out from the name anyways :) I am sorry I wasn't able to test this because of other things I had to do today. But I will give it a try first thing tomorrow morning and will let you know. Nivi.
Flags: needinfo?(nsarkar)
(In reply to EJ Chen [:eragonj][:小龍哥] from comment #66) > Here comes a question: we have different entries (settings app, quick > settings and sleep menu) to toggle airplane mode. Are you guys using the > same way to toggle it or not ? > > Because there is no step talking about this, just want to make sure all of > us using the same ways to reproduce the problems. That's a good question. I used the settings app. Was able to reproduce. Also, able to reproduce when using the setting app to toggle really fast, then switching to quick settings app and back to settings app. I see the issue in both the cases above.
(In reply to EJ Chen [:eragonj][:小龍哥] from comment #66) > Here comes a question: we have different entries (settings app, quick > settings and sleep menu) to toggle airplane mode. Are you guys using the > same way to toggle it or not ? > > Because there is no step talking about this, just want to make sure all of > us using the same ways to reproduce the problems. I was using the setting drawer (not the settings app), as described in the STR in Comment 28.
(In reply to Ted Clancy [:tedders1] from comment #69) > (In reply to EJ Chen [:eragonj][:小龍哥] from comment #66) > > Here comes a question: we have different entries (settings app, quick > > settings and sleep menu) to toggle airplane mode. Are you guys using the > > same way to toggle it or not ? > > > > Because there is no step talking about this, just want to make sure all of > > us using the same ways to reproduce the problems. > > I was using the setting drawer (not the settings app), as described in the > STR in Comment 28. I just tried the same STR in comment 28 with Buri but can't reproduce this. I use the toggle on settings app to toggle airplane mode with damned quick tapping. -- some info -- Gaia 2594455d08936b8ff1b907dd50b6426482377474 Gecko https://hg.mozilla.org/mozilla-central/rev/1507f021ac93 BuildID 20140225160202 Version 30.0a1
Ted, I finally got a chance to test this on our device and I don't see the issue anymore. I noticed one other thing - after constantly pressing APM toggle in setting for 3-4 minutes, I see the phone gets stuck in airplane mode and I wasn't able to toggle APM anymore. I waited for sometime and tried again but the UI was stuck in APM on. Finally had to reboot the device to come out of APM mode. I don't know if you guys can repro this on your side. Also, it's a crazy test case but I saw it 2-3 times so was concerned. Thanks, Nivi.
(In reply to Nivi from comment #71) > Ted, > > I finally got a chance to test this on our device and I don't see the issue > anymore. > > I noticed one other thing - after constantly pressing APM toggle in setting > for 3-4 minutes, I see the phone gets stuck in airplane mode and I wasn't > able to toggle APM anymore. I waited for sometime and tried again but the UI > was stuck in APM on. Finally had to reboot the device to come out of APM > mode. I don't know if you guys can repro this on your side. Also, it's a > crazy test case but I saw it 2-3 times so was concerned. > > Thanks, > Nivi. Please feel free to file a new bug if needed for the new issue you are seeing. Based on your verification, closing this issue.
Attachment #8375636 - Flags: approval-gaia-v1.3?(fabrice) → approval-gaia-v1.3+
Sorry, I was in PTO. I will be verifying this soon and see if it works.
Flags: needinfo?(wachen)
Tested in latest PVT build in buri Gaia f9a37c77efb4621a1f57e4695b497d18601fe134 Gecko http://hg.mozilla.org/releases/mozilla-aurora/rev/3d9d920ca43b BuildID 20140203004001 Version 28.0a2 ro.build.version.incremental=eng.archermind.20131114.105818 ro.build.date=Thu Nov 14 10:58:33 CST 2013 It works. Even though sometimes if you press too fast with wifi on, it will stuck a little bit. It will finally came back.
Status: RESOLVED → VERIFIED
Flags: in-testsuite?
Flags: in-moztrap?
Flags: in-moztrap? → in-moztrap+
Whiteboard: [CR 608234][systemsfe][ETA:2/13][p=3] → [caf priority: p2][CR 608234][systemsfe][ETA:2/13][p=3]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: