Closed Bug 1038289 Opened 5 years ago Closed 5 years ago

[B2G][Settings]SIM not detected after OTA

Categories

(Firefox OS Graveyard :: RIL, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(blocking-b2g:-, b2g-v2.0 affected)

RESOLVED WORKSFORME
blocking-b2g -
Tracking Status
b2g-v2.0 --- affected

People

(Reporter: astole, Unassigned)

Details

(Keywords: smoketest)

Attachments

(1 file)

Attached file logcat
After completing an OTA from 1.3 to 2.0, the SIM is not detected. Airplone mode must be toggled on and off in order for the device to detect the SIM.

Repro Steps:
1) Update a Flame to BuildID: 20140714000202
2) Turn on Wifi
3) Open Settings > Device Information
4) Select 'Check for updates'
5) When update found select the notifications menu
6) Download and install the update
7) Unlock phone and proceed to Homescreen

Actual:
No SIM is detected after OTA

Expected:
SIM is detected after OTA

2.0 Environmental Variables:
Device: Flame 2.0
BuildID: 20140714000202
Gaia: ca022f811bcbbda0f89086094a9e92bb220fea18
Gecko: 376889ab0e02
Version: 32.0a2
Firmware Version: v122

Repro frequency: 100%
See attached: logcat
QA Whiteboard: [QAnalyst-Triage?]
Keywords: smoketest
Nominating to block 2.0, user can't easily recover.  Discussed with reporter, restarting the phone doesn't recover.
blocking-b2g: --- → 2.0?
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Jessica or Edgar, could you look at this or have someone look at this please?  This is a smoke test blocker.
I think it's an issue of QC ril to Mozril?
Component: Gaia::Settings → RIL
Flags: needinfo?(jjong)
Flags: needinfo?(echen)
Flags: needinfo?(nhirata.bugzilla)
Andrew: Which type of SIM card were you using - AT&T?
Flags: needinfo?(astole)
Yes, I was using an AT&T SIM in slot 1.
Flags: needinfo?(astole)
I tried with a T-Mobile SIM in slot 1 as well and got the same result.

I also checked with trying Open C Gecko/Gaia on top for 1.3 and upgraded to 2.0
To note, Open C Gecko didn't register the SIM 1.  After the OTA, I got the same result.  I needed to either turn airplane mode on or reboot in order to get the SIM to be seen.
I am not sure how to update using OTA, when I "Check for updates", it says "No updates were found".
However, the following lines in the logs (attachment 8455472 [details]) look suspicious:

07-14 10:58:08.533: E/GeckoConsole(1655): Native module at path '/system/b2g/distribution/bundles/libqc_b2g_ril/libqc_b2g_ril.so' is incompatible with this version of Firefox, has version 28, expected 32.
07-14 10:58:08.603: E/GeckoConsole(1655): [JavaScript Warning: "Could not map contract ID '@mozilla.org/ril;1' to CID {9A7181E8-E66A-11E1-B4A1-B1066188709B} because no implementation of the CID is registered." {file: "file:///system/b2g/distribution/bundles/libqc_b2g_ril/chrome.manifest" line: 2}]
07-14 10:58:08.603: E/GeckoConsole(1655): [JavaScript Warning: "Could not map contract ID '@mozilla.org/telephony/telephonyprovider;1' to CID {7292B38A-1950-11E3-9E4A-46906188709B} because no implementation of the CID is registered." {file: "file:///system/b2g/distribution/bundles/libqc_b2g_ril/chrome.manifest" line: 3}]

I will leave someone that knows the OTA update process better to comment on this.
Flags: needinfo?(jjong)
Anshul,
Can CAF reproduce this?
Flags: needinfo?(anshulj)
(In reply to Jessica Jong [:jjong] [:jessica] from comment #6)
> I am not sure how to update using OTA, when I "Check for updates", it says
> "No updates were found".
> However, the following lines in the logs (attachment 8455472 [details]) look
> suspicious:
> 
> 07-14 10:58:08.533: E/GeckoConsole(1655): Native module at path
> '/system/b2g/distribution/bundles/libqc_b2g_ril/libqc_b2g_ril.so' is
> incompatible with this version of Firefox, has version 28, expected 32.
> 07-14 10:58:08.603: E/GeckoConsole(1655): [JavaScript Warning: "Could not
> map contract ID '@mozilla.org/ril;1' to CID
> {9A7181E8-E66A-11E1-B4A1-B1066188709B} because no implementation of the CID
> is registered." {file:
> "file:///system/b2g/distribution/bundles/libqc_b2g_ril/chrome.manifest"
> line: 2}]
> 07-14 10:58:08.603: E/GeckoConsole(1655): [JavaScript Warning: "Could not
> map contract ID '@mozilla.org/telephony/telephonyprovider;1' to CID
> {7292B38A-1950-11E3-9E4A-46906188709B} because no implementation of the CID
> is registered." {file:
> "file:///system/b2g/distribution/bundles/libqc_b2g_ril/chrome.manifest"
> line: 3}]
> 
> I will leave someone that knows the OTA update process better to comment on
> this.

Thanks for the finding, Jessica. It looks like a CAF's issue to me.
Flags: needinfo?(echen)
Should device automatically be rebooted after OTA? Because the status of modem is different from the one of ril(gecko), it may cause some problems. It would be great if partner can provide their opinions.
thanks for looking, Jessica:

1) we took the Open C 1.3 gaia from Taipei server (or made our own 1.3 gaia) and flashed it on top of the OEM 122 flame.
2) we used the taipei TWQA's flash tools : 
./change_channel.sh -v aurora
./change_ota_url.sh -u https://aus4.mozilla.org/update/3/B2G/28.0/20140709000201/flame/en-US/aurora/Boot2Gecko%202.0.0.0-prerelease/default/default/update.xml?force=1
3) we then went to settings -> device info -> select check now
4) wait until system notification.
Flags: needinfo?(jjong)
Ken, yes it does reboot; after it comes to, that's when we see the issue.

tchung asked me a similar question yesterday.  He asked me the difference between flashing and FOTA.  We  clear certain files/directory when flashing.  It may be that there's a file that's stored somewhere such as in cache after the device is finished booting?
To test the theory, I did a:
adb stop b2g
adb shell rm -r /cache/*
adb start b2g

I saw both SIMs come up.

It appears something might be in cache.  I don't know if there's anything underlying in the cache.  Maybe the solution is to clear the cache during FOTA/OTA?  pinging dhylands to see if there's a reason to keep the cache.
Flags: needinfo?(nhirata.bugzilla)
Flags: needinfo?(dhylands)
Flags: needinfo?(anshulj)
removing ni? from partner, as they dont test against mozril.

the real world will never do an update via this path of vendorRIL -> MozRIL.   this is only for internal testing purposes.   plus the workaround internally is to restart again.

i'm going to ask T2M offline if they can help with testing the 1.3->2.0 FOTA update since they build both with the vendor RIL
blocking-b2g: 2.0? → -
Sorry, the removing of the cache might be a red herring.

adb shell b2g stop and adb shell b2g start would restart the b2g process and that in itself would be like a reboot of the device I think.  Regardless there must be something that's wiped on a reboot?
(In reply to Wesley Huang [:wesley_huang] from comment #7)
> Anshul,
> Can CAF reproduce this?
Wesely, we are able to do OTA upgrade just fine on flame devices.
(In reply to Naoki Hirata :nhirata (please use needinfo instead of cc) from comment #12)
> To test the theory, I did a:
> adb stop b2g
> adb shell rm -r /cache/*
> adb start b2g
> 
> I saw both SIMs come up.
> 
> It appears something might be in cache.  I don't know if there's anything
> underlying in the cache.  Maybe the solution is to clear the cache during
> FOTA/OTA?  pinging dhylands to see if there's a reason to keep the cache.

If you're going to clear the cache, you definitely want to do it BEFORE doing a FOTA and not after.

Otherwise, you lose your logs from doing the FOTA.

I believe that we store some browser cache information in /cache as well, so losing this would cause the browser to be a bit slower (since there won't be any cache hits).

So I think it all boils down to how frequently FOTA updates are performed. I think it would better to just remove the files related to the SIM stuff rather than clearing the entire /cache directory.
Flags: needinfo?(dhylands)
I wonder if we could do the same test on different device from flame to check if this problem is still happened.
Flags: needinfo?(astole)
(In reply to Ken Chang[:ken] from comment #17)
> I wonder if we could do the same test on different device from flame to
> check if this problem is still happened.

Please also make sure that the update is done with same versions of RIL (vendorRIL -> vendorRIL or MozRIL-> MozRIL). Thanks.
Flags: needinfo?(jjong)
Adding qawanted to do the checking for Comment 17 and Comment 18.  Josh can you assign someone to this?
QA Whiteboard: [QAnalyst-Triage+]
Flags: needinfo?(astole) → needinfo?(jmitchell)
Whiteboard: qawanted
sure.
Flags: needinfo?(jmitchell)
QA Contact: pcheng
Keywords: qawanted
Whiteboard: qawanted
(In reply to Jessica Jong [:jjong] [:jessica] from comment #18)
> Please also make sure that the update is done with same versions of RIL
> (vendorRIL -> vendorRIL or MozRIL-> MozRIL). Thanks.

Could you elaborate on this? How exactly do I make sure of that?
Flags: needinfo?(jjong)
(In reply to Pi Wei Cheng [:piwei] from comment #21)
> (In reply to Jessica Jong [:jjong] [:jessica] from comment #18)
> > Please also make sure that the update is done with same versions of RIL
> > (vendorRIL -> vendorRIL or MozRIL-> MozRIL). Thanks.
> 
> Could you elaborate on this? How exactly do I make sure of that?

I would suggest, for mozRIL, not to use OEM builds neither as the base nor as the build to be updated. However, I have not succeeded to update via OTA with our own builds yet. Following the steps in comment 10, except that my base build is from pvt, gives me the "Check now" button disabled.
Maybe Tony can provide more information here? Thanks.
Flags: needinfo?(jjong) → needinfo?(tchung)
(In reply to Jessica Jong [:jjong] [:jessica] from comment #22)
> (In reply to Pi Wei Cheng [:piwei] from comment #21)
> > (In reply to Jessica Jong [:jjong] [:jessica] from comment #18)
> > > Please also make sure that the update is done with same versions of RIL
> > > (vendorRIL -> vendorRIL or MozRIL-> MozRIL). Thanks.
> > 
> > Could you elaborate on this? How exactly do I make sure of that?
> 
> I would suggest, for mozRIL, not to use OEM builds neither as the base nor
> as the build to be updated. However, I have not succeeded to update via OTA
> with our own builds yet. Following the steps in comment 10, except that my
> base build is from pvt, gives me the "Check now" button disabled.
> Maybe Tony can provide more information here? Thanks.

We can't test vendorRIL -> vendorRIL until we get support from T2M to build us a base image against 2.0.   there's also the concern that Flame is still running JB, while the 2.0 shipping devices will be on KitKat.

we can test mozRIl -> mozRIL by flashing a v122, then removing the QCRIL component.  (see https://wiki.mozilla.org/B2G/QA/Tips_And_Tricks#COMRIL_vs_MOZRIL_checking for how do to that).   once you test it is in mozril, then change the channel to aurora, and do the OTA update.   when the update is successful, double check if 2.0 is running mozRIL, and then you can confirm if the SIM settings are active)

* Note that i did not try this myself, so if it fails, we'll need to diagnose.
Flags: needinfo?(tchung)
The steps listed on https://wiki.mozilla.org/B2G/QA/Tips_And_Tricks#COMRIL_vs_MOZRIL_checking to remove COM Ril does not work. Quoting the steps below:

> To revert and use mozril, delete the bundles folder:
> 
>    adb root
>    adb shell mount -o remount,rw /system
>    adb shell rm -r /system/b2g/distribution/bundles
>    adb shell mount -o remount,ro /system
>    adb shell sync && adb reboot

After the 4th step it returns an error "mount: Device or resource busy".

We then proceeded to use our Smoketest team's documentation on removing COM Ril, quoting steps below:

> adb root
> adb shell stop b2g
> adb shell mount -o remount,rw /system
> adb shell rm -r system/b2g/distribution
> adb shell mount -o remount,ro /system
> adb shell reboot

Those steps seemed to have worked, however, after executing the above commands to remove COM Ril, the Flame device lost recognition to SIM card as well. I've tried 2 times with the same result. Therefore we can't establish a valid test afterwards.
Flags: needinfo?(tchung)
(In reply to Pi Wei Cheng [:piwei] from comment #24)
> The steps listed on
> https://wiki.mozilla.org/B2G/QA/Tips_And_Tricks#COMRIL_vs_MOZRIL_checking to
> remove COM Ril does not work. Quoting the steps below:
> 
> > To revert and use mozril, delete the bundles folder:
> > 
> >    adb root
> >    adb shell mount -o remount,rw /system
> >    adb shell rm -r /system/b2g/distribution/bundles
> >    adb shell mount -o remount,ro /system
> >    adb shell sync && adb reboot
> 
> After the 4th step it returns an error "mount: Device or resource busy".
> 
> We then proceeded to use our Smoketest team's documentation on removing COM
> Ril, quoting steps below:
> 
> > adb root
> > adb shell stop b2g
> > adb shell mount -o remount,rw /system
> > adb shell rm -r system/b2g/distribution
> > adb shell mount -o remount,ro /system
> > adb shell reboot
> 
> Those steps seemed to have worked, however, after executing the above
> commands to remove COM Ril, the Flame device lost recognition to SIM card as
> well. I've tried 2 times with the same result. Therefore we can't establish
> a valid test afterwards.

If you are using v122 (FirefoxOS 1.3), mozRIL won't detect your SIM, please see Bug 1003011. You can try updating directly to a newer version and see if it works, but we don't support mozRIL on Flame anymore, so I'd suggest you to use another device for testing.
If you still have problems with mozRIL, please enable ril debugging using [1] and help attach logs. Thanks.

[1] https://wiki.mozilla.org/B2G/QA/Tips_And_Tricks#RIL_Debugging
Flags: needinfo?(tchung)
We are no longer reproducing this issue on a consistent basis.  If it's encountered again, please re-open.

Environmental Variables:
Device: Flame 2.0
Build ID: 20140731000246
Gaia: f6702e2aab77ac144955b3cbc042483b1c5eefa7
Gecko: b87b3b927d3a
Version: 32.0 (2.0)
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
Status: NEW → RESOLVED
Closed: 5 years ago
Keywords: qawanted
Resolution: --- → WORKSFORME
I am seeing this issue after OTAing from 1.3 -> 2.0 then removing the battery. The device UI shows that I have no SIM inserted, yet it also shows that I have cell data (H) turned on. I can make phone calls while this no SIM UI is displayed.

Environmental Variables:
Device: Flame 2.0
Build ID: 20140731000246
Gaia: f6702e2aab77ac144955b3cbc042483b1c5eefa7
Gecko: b87b3b927d3a
Version: 32.0 (2.0)
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
Status: RESOLVED → REOPENED
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(pbylenga)
Resolution: WORKSFORME → ---
Closing this issue per Jason Smith because this reproduces now with different steps.

New issue written is bug 1048413
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → WORKSFORME
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(pbylenga)
You need to log in before you can comment on or make changes to this bug.