Closed Bug 1135523 Opened 9 years ago Closed 9 years ago

[Peak] 2.0 : 3G connection crashes /system/bin/netd and prevents future Wifi connection

Categories

(Firefox OS Graveyard :: Wifi, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mossroy, Unassigned)

Details

Attachments

(2 files)

Steps to reproduce on a Peak device with FxOS 2.0 :
- start the phone with no Internet connection
- activate 3G
- then try to connect with Wifi

Actual behavior :
At the time of 3G activation, adb logcat says that /system/bin/netd has crashed (see full log in attachment) :
F/libc    (  126): Fatal signal 11 (SIGSEGV) at 0x1d48b994 (code=1)
I/DEBUG   (  127): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  127): Build fingerprint: 'qcom/full_peak/peak:4.0.4.0.4.0.4/OPENMASTER/248:user/test-keys'
I/DEBUG   (  127): pid: 126, tid: 202  >>> /system/bin/netd <<<
I/DEBUG   (  127): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 1d48b994

When trying to activate the Wifi, its icon remains light blue, and you cannot switch it on or off any more.
adb logcat says "E/WifiHW  (  122): driver not loaded"
The only workaround is to disable 3G, then restart the phone and activate Wifi without any prior 3G connection

Expected behavior :
The Wifi should connect or propose a list of Wifi hotspots, even if a 3G connection has been previously used.

Tested on Build id 20150220144845 from Geeksphone (v2.0.0.0-prerelease), but it has been reported in the forum since mid-january : http://forum.geeksphone.com/index.php?topic=6359.0
I'm using a Free Mobile SIM card
I have the same bug on FxOS 2.1 on GP Peak, last update is 20150228181736.
It does not seem to be related to the Peak device.
I also have a ZTE Open C device (with FxOS 2.0 community build) that did not have this issue at all.
BUT, after I moved my data to it (with https://github.com/Mozilla-TWQA/B2G-flash-tool/blob/master/backup_restore_profile.sh), it had the exact same behavior

So I suspect it comes from the wifi config.
In my /data/misc/wifi/wpa_supplicant.conf, the first line was :
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi

I replaced it with
ctrl_interface=wlan0

And it seemed to solve my issue (at least on the ZTE Open C, I did not try on the Peak)

Jean, could you please have a look at this file and tell me if you manage to solve the issue as well?
Summary: [Peak] 2.0 : 3G connection crashes /system/bin/netd and prevents future Wifi connection → 2.0 : 3G connection crashes /system/bin/netd and prevents future Wifi connection
Mossroy,

I tried to change the first line if wpa_supplicant.conf with:
"ctrl_interface=wlan0" and with "ctrl_interface=wlan0 GROUP=wifi" and it was even worse: the wifi didn't work at all, even after a reboot.

The first lines of my wpa_supplicant.conf are these:

ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi
update_config=1
wfd_session_mgmt_ctrl_port=554
wfd_device_max_throughput=10
Did you check the permissions of this file after modifying it?
It must be owned by user "wifi" :

adb push wpa_supplicant.conf /data/misc/wifi
adb shell chown wifi.wifi /data/misc/wifi/wpa_supplicant.conf

For me, the first lines are only :
ctrl_interface=wlan0
update_config=1

(followed by the list of networks)

If it still fails, you might try to remove all the content of this file (or maybe the file itself). In this case, it is re-created with a default content the next time you enable wifi (that's how I found the ctrl_interface=wlan0). And you can copy/paste your networks afterwards.

Please tell me how it goes
I tried the three ways (modifying permissions, copy your first lines and remove the file) and it doesn't work.

The new generated file has the same four lines that my orignal file.
You're right.
I think I concluded too fast.

I suppose the Wifi was not working on the ZTE Open C, simply because it needs a "ctrl_interface=wlan0" instead of "ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi"
It probably has nothing to do with the netd crash we face on the Peak.

I also tried to modify the wpa_supplicant.conf on the Peak and it did not work.

So unfortunately the issue is not solved, and IS Peak-specific.
Sorry for the noise
Summary: 2.0 : 3G connection crashes /system/bin/netd and prevents future Wifi connection → [Peak] 2.0 : 3G connection crashes /system/bin/netd and prevents future Wifi connection
I don't seem to have this issue any more on the Peak. At least I can switch between Wifi and 3G without visible issues.
I don't know if it's because of an OTA update I installed, or because I reinstalled my data with backup_restore_profile.sh

Jean, do you still face it?
If so, could you please try with latest 2.0 version? and after a backup/restore of your profile with the shell script?
A simple update does not change anything.

Mossroy, Where do you find those scripts?
Jean, I used https://github.com/Mozilla-TWQA/B2G-flash-tool/blob/master/deprecated/backup_restore_profile.sh (it has been recently moved to a "deprecated" directory, replaced by a Python version)
To be more precise, I made a backup from the Peak with this tool (shell version, not python), imported it in another device (a ZTE Open C, with FxOS 2.0 too), used it a few days, exported it with the same tool, and imported it back to the Peak.
NB : I only had to tweak the first line of wpa_supplicant.conf, because both devices don't expect the same syntax. See comment 7
Now my wpa_supplicant.conf file starts with :
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi
update_config=1
wfd_session_mgmt_ctrl_port=554
wfd_device_max_throughput=10
(followed by the list of known networks)

I suppose the backup/restore procedure might have fixed something wrong on my device?
Or maybe I did something on the other device that fixed the issue on the Peak (I really don't see what)

In any case, I now can switch between 3G and Wifi without issues. So there must be a way to do the same for your device.
Jean,

unless the backup/restore procedure does not fix the issue for you, I'm going to mark this bug as resolved/worksforme
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME
I tested with the last 2.1 image from GP (2015-04-07), erasing all usersdata and it still does not work.
I don't know how to reopen the bug (I can't change the status myself).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: