No Wi-Fi on Nexus 4 (org::ofono::Interface::NetworkRegistration::str2status(std::string): Unknown status '')

Bug #1368675 reported by Matthew Paul Thomas
38
This bug affects 4 people
Affects Status Importance Assigned to Milestone
indicator-network (Ubuntu)
Invalid
Undecided
Unassigned
network-manager (Ubuntu)
Invalid
Undecided
Unassigned
ofono (Ubuntu)
Fix Released
Critical
Alfonso Sanchez-Beato
ofono (Ubuntu RTM)
Fix Released
Critical
Unassigned

Bug Description

Ubuntu Touch 14.10 r235, LG Nexus 4

1. Open the Network menu.
2. Navigate to System Settings > "Wi-Fi".

What happens:

1. The Network menu contains only the word "Empty!" No Wi-Fi switch, no Wi-Fi Settings item, no Cellular Settings item, nothing. (The "Empty!" wording is bug 1350952, but this isn't about the wording.)

2. The screen contains only "Previous networks" and (as long as bug 1365960 isn't fixed) "Other network".

What should happen:
1. A Wi-Fi switch is present.
2. A Wi-Fi switch is present.

phablet@ubuntu-phablet:~$ /usr/lib/arm-linux-gnueabihf/indicator-network/indicator-network-service
ModemManager::ModemManager()
void SimUnlockDialog::Private::reset()
Unknown Interface: org.ofono.NetworkTime
void org::ofono::Interface::NetworkRegistration::_updateProperty(std::string, core::dbus::types::Variant): unhandled property change: Mode
org::ofono::Interface::NetworkRegistration::Status org::ofono::Interface::NetworkRegistration::str2status(std::string): Unknown status ''
Segmentation fault (core dumped)

Related branches

description: updated
description: updated
summary: - No Wi-Fi on Nexus 4 (Mako)
+ No Wi-Fi on Nexus 4
+ (org::ofono::Interface::NetworkRegistration::str2status(std::string):
+ Unknown status '')
Revision history for this message
Matthew Paul Thomas (mpt) wrote :
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

This is about ofono setting an invalid value to the NetworkRegistration Status property.

The reason why indicator-network seems to crash here is that I'm intentionally throwing an exception that nobody will catch and cause the service to generate an apport report so that:
 - A) if the indicator is not handling all the valid values coming from ofono we need to know about it
 - B) to catch exactly these kind of API violations coming from our ofono implementation.

Changed in network-manager (Ubuntu):
status: New → Invalid
Changed in indicator-network (Ubuntu):
status: New → Invalid
Changed in ofono (Ubuntu):
status: New → Incomplete
status: Incomplete → Confirmed
importance: Undecided → Critical
Changed in ofono (Ubuntu):
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@Matthew I have an idea of what might be happening, but I need traces to confirm. Please do as follows (I assume we are talking about Nexus 4 here):

$ phablet-shell
$ sudo su
# stop ofono
# export OFONO_RIL_HEX_TRACE=""
# export OFONO_RIL_TRACE=""
# ofonod -n -d -P stktest,provision,sap,udev,dun,smart,hfp > /tmp/ofono_log.txt

- Make sure that the problem is happening (use list-modems and check that "Status" property is empty)

- Stop ofono (ctrl+c) and please attach ofono_log.txt

Revision history for this message
Matthew Paul Thomas (mpt) wrote :
Changed in ofono (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

This PR contains a fix for ofono:

https://github.com/rilmodem/ofono/pull/87

With the fix "Status" is now "denied", as can be seen in list-modems output from Matthew:

https://pastebin.canonical.com/117079/

However, Matthew still sees issues with the WiFi indicator, but indicator-network does not crash. So the PR fixes as a minimum part of the problem, but maybe not the whole lot.

Revision history for this message
Tony Espy (awe) wrote :

I'm not sure I fully understand the problem.

From the bug description which includes:

org::ofono::Interface::NetworkRegistration::str2status(std::string): Unknown status

It seems like the indicator is throwing an error if NetworkRegistration's 'Status' property is "unknown"? Or are we never setting 'Status' at all if the RIL reply specifies the registration state as unknown ( 4 )?

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@Tony, the crash was because "Status" property was an empty string (it was not "unknown" or anything else), which is wrong as specified by ofono/doc/network-api.txt. And it was an actual ofono bug, as we were getting a value for state from rild that was not valid for ofono core.

Tony Espy (awe)
Changed in ofono (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ofono - 1.12.bzr6878+14.10.20140926-0ubuntu1

---------------
ofono (1.12.bzr6878+14.10.20140926-0ubuntu1) 14.09; urgency=medium

  [ Alfonso Sanchez-Beato ]
  * include, plugins/mtk.c, src/modem.c,sim.c: Fix PUK crash (LP: #1365481)
    If the SIM gets locked in particular sequence, ofono will crash
    while trying to free the list of SIM SPN watch events ( which
    have already been freed ). MTK fix is a bit more involved than
    the stanard RIL logic.

  * plugins/mtk.c,ril.c: Show emergency numbers in flight-mode (LP: #1366188)
    Modify plugin logic to create the SimManager interface even if
    no SIM is present.

  * gril, unit: fix indicator-network crash (LP: #1368675)
    RIL defines a set of network registration states for emergency
    calling that don't map directly to ofono's states. This results
    in NetworkRegistration Status not being set at all, which in
    turn crashes the indicator.

  * rilmodem/gprs.c: fix crash due to stale timer event (LP: # 1373351)
    A 5s timer is set to retry a STATUS request to RIL, however if
    FlightMode is enabled, the gprs atom is destroyed, and the pending
    timer callback has a stale gprs reference. Now the timer id is
    stored, and when the atom destroyed, the timer event is cancelled.

  * mtkmodem/radio-setttings.c: fix RadioSettings creation (LP: #1374029 )
    If the MTK modem returns a RADIO_NOT_AVAIL error in response
    to a FastDormany RIL request, the RadioSetting initialization
    callback sequence is broken, and thus the RadioSettings interface
    isn't created. This in turn prevents powerd from enabling
    FastDorancy whenever the screen is turned off, and also has
    implications for system-settings too.

  [ Tony Espy ]
  * plugins/ubuntu-apndb.c: allow MMS APNs w/out proxy (LP: #1362008)
    Prior to this change, MMS APNs w/out a proxy were skipped.
    Now APNs are skipped if message center is missing, which makes
    more sense.

  [ Ubuntu daily release ]
  * New rebuild forced

ofono (1.12.bzr6876+14.10.20140904-0ubuntu1) utopic; urgency=medium

  [ Jussi Kangas ]
  * src/gprs.c: Fix to allow MMS properties to be set (LP: #1362068)

  [ Tony Espy ]
  * rilmodem/sim.c: Fix EnterPIN logic (LP: #1363413)

  [ Ubuntu daily release ]
  * New rebuild forced
 -- Ubuntu daily release <email address hidden> Fri, 26 Sep 2014 17:34:10 +0000

Changed in ofono (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Tony Espy (awe) wrote :

Same version landed in RTM.

Changed in ofono (Ubuntu RTM):
status: New → Fix Released
importance: Undecided → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.