Closed Bug 1030810 Opened 5 years ago Closed 5 years ago

v2.0 often fails to enable cell data when leaving wifi with dual-sim

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(blocking-b2g:2.0+, firefox31 wontfix, firefox32 fixed, firefox33 fixed, b2g-v2.0 fixed, b2g-v2.1 fixed)

RESOLVED FIXED
2.0 S6 (18july)
blocking-b2g 2.0+
Tracking Status
firefox31 --- wontfix
firefox32 --- fixed
firefox33 --- fixed
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed

People

(Reporter: bkelly, Assigned: jessica)

References

Details

(Keywords: regression, Whiteboard: [dogfood2.0][p=1])

Attachments

(4 files)

I've been dogfooding my flame on v2.0 with the following configuration:

Sim 1:  T-Mobile data only sim
Sim 2:  AT&T voice/data sym

I have Sim 1 configured to handle data in the Sim Manager.  All other functions are configured to use Sim 2.

When my device is connected to wifi (like in the office) and then I transition to no-wifi (like leaving the office), I find that maybe 80% of the time my device fails to enable cell data.  Both sim cards report strong signal, but I just don't get a data connection.

If I open the settings for Sim 1 and toggle the Data Connection value off/on I can then get Sim 1 to enable a data connection.

This is one of the more annoying dogfood issues I have at the moment.

flame
v121-2 base image
aurora update channel
Build ID: 20140625000201
Gaia Rev: de77f794
blocking-b2g: --- → 2.0?
Adding QA Wanted to see if someone else can confirm.
Since it is a aurora build, it is using MozRIL, right?
I was not able to reproduce this in Taipei office, I could get my data connection back when I left wifi area. Can QA help to reproduce this? They might need to enable logs while testing.
Please do so by following these steps:

1. adb pull /system/b2g/defaults/pref/user.js
2. Turn on logs by editing user.js:
  2.1. Change the value of "ril.debugging.enabled" to true
  2.1. Add "pref('network.debugging.enabled', true)" in user.js
  2.2. Add "pref('wifi.debugging.enabled', true)" in user.js
3. adb remount
4. adb push user.js /system/b2g/defaults/pref/user.js
5. adb shell stop b2g
6. adb shell start b2g

Thanks!
Keywords: qawanted
waiting for qawanted here to make a blocking call keeping comment #2 in mind.
Attached file log.txt
Repro rate was about 2/50 for me but I was able to repro in the latest 2.0 build and got a log of it.

Since I couldn't get logs if i was away from my desk I just disconnected wifi with the setup in Comment 0. Checking the internet at this point yielded an "Unable to connect" message even though 3G is still enabled. Just to be sure I checked marketplace and saw an offline message there as well.

Attached is the log and the screenshot.
Flags: needinfo?(jmitchell)
Attached image Offline.png
QA Whiteboard: [QAnalyst-Triage?]
Keywords: qawanted
QA Contact: croesch
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmitchell)
Here are my environmental Variables as well as the SIM setup

SIM slot 1: T-Mobile SIM
SIM slot 2: AT&T SIM


Environmental Variables:
Device: Flame 2.0
Build ID: 20140707101630
Gaia: 16410831c2e513b5cabc550363f28a023dc256be
Gecko: 05069bac98d8
Version: 32.0a2 (2.0)
Firmware Version: v122
FWIW, I think I've seen this on my single-sim Open C running v2.0 as well.
triage: waiting for Jessica's investigation to see whether the root cause in on RIL. Keep the nomination for now.
Flags: needinfo?(jjong)
Unfortunately, the log in attachment 8451990 [details] does not contain NetworkManager nor WifiManager's log. I can't tell what the root cause is.

However, checking our code, I did find a case that might lead to this case: if data connection is "enabled" but "not connected", and wifi is being connected in this case, data connection might not be able to restore after wifi is disconnected.

I can provide a patch to fix this. But I'd still like to see if QA can help reproduce this with full logs (comment 2) to find the root cause. Thanks.
Flags: needinfo?(jjong)
Blocking on this even though QA had a slim chance of hitting this a)its seen in the wild by Ben, so its possible for  a user to hit this b)this workflow is expected to work flawless
blocking-b2g: 2.0? → 2.0+
(In reply to Jessica Jong [:jjong] [:jessica] from comment #9)
> Unfortunately, the log in attachment 8451990 [details] does not contain
> NetworkManager nor WifiManager's log. I can't tell what the root cause is.
> 
> However, checking our code, I did find a case that might lead to this case:
> if data connection is "enabled" but "not connected", and wifi is being
> connected in this case, data connection might not be able to restore after
> wifi is disconnected.
> 
> I can provide a patch to fix this. But I'd still like to see if QA can help
> reproduce this with full logs (comment 2) to find the root cause. Thanks.


Jessica, I apologize you did not get the needed info from the log file. I looked into it and found my error when editing the .js file. I don't know anything about code lines and I copied and pasted your info incorrectly. I've since fixed the issue and am retrying the bug to see if i can get something useful to you. Will update as soon as I do.
Here is the new log. Let know if that worked! Thanks.
Flags: needinfo?(jmitchell)
Flags: needinfo?(jmitchell)
I filed bug 1031142 on similar symptoms, although I thought I'd concluded that the issue was leaving cell service rather than leaving wifi, although I'm not sure.  (I've been dogfooding on master.)
(In reply to David Baron [:dbaron] (UTC-7) (needinfo? for questions) from comment #13)
> I filed bug 1031142 on similar symptoms, although I thought I'd concluded
> that the issue was leaving cell service rather than leaving wifi, although
> I'm not sure.  (I've been dogfooding on master.)

Thanks for reporting. I'll look into this case as well.
Assignee: nobody → jjong
(In reply to Cody Roesch (croesch) from comment #11)
> (In reply to Jessica Jong [:jjong] [:jessica] from comment #9)
> > Unfortunately, the log in attachment 8451990 [details] does not contain
> > NetworkManager nor WifiManager's log. I can't tell what the root cause is.
> > 
> > However, checking our code, I did find a case that might lead to this case:
> > if data connection is "enabled" but "not connected", and wifi is being
> > connected in this case, data connection might not be able to restore after
> > wifi is disconnected.
> > 
> > I can provide a patch to fix this. But I'd still like to see if QA can help
> > reproduce this with full logs (comment 2) to find the root cause. Thanks.
> 
> 
> Jessica, I apologize you did not get the needed info from the log file. I
> looked into it and found my error when editing the .js file. I don't know
> anything about code lines and I copied and pasted your info incorrectly.
> I've since fixed the issue and am retrying the bug to see if i can get
> something useful to you. Will update as soon as I do.

Thanks for your help, but it seems that the log this time contains WifiWorker log but no RIL and NetworkManager log. 
You can use this [1] to ease the process. Just download the package and follow the steps in 'enable_debug_flags.sh' to enable ril and network logs. For wifi logs, you can go to Settings -> Developer and check the 'Wi-Fi output in ADB' checkbox. Remember to restart b2g or just reboot afterwards.
While reproducing, if you repeat the same process a lot of times, please help record all the logs. Thanks again! :)

[1] https://github.com/bevis-tseng/Debug_Tools
Attached patch patch, v1.Splinter Review
Edgar, for the first chunk in this patch, we let networkInterface.disconnect() be called when wifi is active and data is 'enabled', so that the |enabled| flag will be set to false, just like the roaming case.
For the second chunk, we bail-out if data call is actually connected; if it's not, we should let networkInterface.connect() be called.
May I have you review? Thanks.
Attachment #8452918 - Flags: review?(echen)
(In reply to Naoki Hirata :nhirata (please use needinfo instead of cc) from comment #17)
> Jessica, Edgar, is bug 939318 related?

In fact, this is a regression of bug 939046.
Depends on: 939046
Comment on attachment 8452918 [details] [diff] [review]
patch, v1.

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

LGTM, thank you :)
Attachment #8452918 - Flags: review?(echen) → review+
Thanks, Edgar.

This will definitely help the case of leaving cell service, hope it helps the case of leaving wifi area too.

try green: https://tbpl.mozilla.org/?tree=Try&rev=cf0cb8cbf4e7
Summary: flame v2.0 often fails to enable cell data when leaving wifi with dual-sim → v2.0 often fails to enable cell data when leaving wifi with dual-sim
https://hg.mozilla.org/integration/b2g-inbound/rev/55a1fe6f66b2
Whiteboard: [dogfood2.0] → [dogfood2.0][p=1]
Target Milestone: --- → 2.0 S6 (18july)
https://hg.mozilla.org/mozilla-central/rev/55a1fe6f66b2
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
FTR I got this a lot on v1.4 too, this is really _really_ annoying, does it make sense to ask for an uplift there?

Or maybe it does not affect CommRIL?
Flags: needinfo?(jjong)
(In reply to Julien Wajsberg [:julienw] from comment #24)
> FTR I got this a lot on v1.4 too, this is really _really_ annoying, does it
> make sense to ask for an uplift there?
> 
> Or maybe it does not affect CommRIL?

This is in MozRIL, so it does not affect CommRIL.
Flags: needinfo?(jjong)
You need to log in before you can comment on or make changes to this bug.