NetworkManager crashes in ofono plugin with phonesim [crashed with SIGSEGV in <unavailable> in ??()]

Bug #1231964 reported by Martin Pitt on 2013-09-27
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
High
Mathieu Trudel-Lapierre

Bug Description

When I run ofono-phonesim on the G4 (mako), NetworkManager goes into an eternal crash/restart loop with this crash. After "sudo stop network-manager" and running it manually with "sudo /usr/sbin/NetworkManager --no-daemon" I see:

NetworkManager[31290]: <warn> /sys/devices/virtual/net/sit0: couldn't determine device driver; ignoring...
NetworkManager[31290]: <warn> (/phonesim): failed to look up interface index
NetworkManager[31290]: <info> (/phonesim): new Ofono device (driver: 'ofono' ifindex: 0)
NetworkManager[31290]: <info> (/phonesim): exported as /org/freedesktop/NetworkManager/Devices/1
NetworkManager[31290]: <info> (/phonesim): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
NetworkManager[31290]: <info> (/phonesim): deactivating device (reason 'managed') [2]
NetworkManager[31290]: <info> (/phonesim) updated available interfaces
NetworkManager[31290]: <info> WWAN now enabled by management service
NetworkManager[31290]: <info> (/phonesim) marked enabled: 1
NetworkManager[31290]: SCPlugin-Ofono: reading configuration for IMSI 246813579
NetworkManager[31290]: SCPlugin-Ofono: add context for 246813579
NetworkManager[31290]: SCPlugin-Ofono: add property 'Name': Internet
NetworkManager[31290]: SCPlugin-Ofono: add property 'AccessPointName':
NetworkManager[31290]: SCPlugin-Ofono: add property 'Username':
NetworkManager[31290]: SCPlugin-Ofono: add property 'Password':
NetworkManager[31290]: SCPlugin-Ofono: add property 'Type': internet
NetworkManager[31290]: SCPlugin-Ofono: add property 'Protocol': ip
NetworkManager[31290]: SCPlugin-Ofono: found internet context 'Internet' (context1)
NetworkManager[31290]: <info> (wlan0) supports 5 scan SSIDs
NetworkManager[31290]: <warn> Trying to remove a non-existant call id.
NetworkManager[31290]: <info> (wlan0): supplicant interface state: starting -> ready
NetworkManager[31290]: <info> (wlan0): device state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42]
NetworkManager[31290]: <info> (/phonesim): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
NetworkManager[31290]: <info> Auto-activating connection '/262026260068068/context1'.
NetworkManager[31290]: <info> Activation (/phonesim) starting connection '/262026260068068/context1'
NetworkManager[31290]: <info> (/phonesim): device state change: disconnected -> prepare (reason 'none') [30 40 0]
NetworkManager[31290]: <info> Activation (/phonesim) Stage 1 of 5 (Device Prepare) scheduled...
NetworkManager[31290]: <info> Activation (/phonesim) Stage 1 of 5 (Device Prepare) started...
NetworkManager[31290]: <info> Activation (/phonesim) Stage 1 of 5 (Device Prepare) complete.
NetworkManager[31290]: <info> (wlan0): supplicant interface state: ready -> inactive
NetworkManager[31290]: <info> (wlan0) supports 5 scan SSIDs
NetworkManager[31290]: <info> Activation (/phonesim) Stage 2 of 5 (Device Configure) scheduled...
NetworkManager[31290]: <info> Activation (/phonesim) Stage 2 of 5 (Device Configure) starting...
NetworkManager[31290]: <info> (/phonesim): device state change: prepare -> config (reason 'none') [40 50 0]
NetworkManager[31290]: <info> Activation (/phonesim) Stage 2 of 5 (Device Configure) successful.
NetworkManager[31290]: <info> Activation (/phonesim) Stage 3 of 5 (IP Configure Start) scheduled.
NetworkManager[31290]: <info> Activation (/phonesim) Stage 2 of 5 (Device Configure) complete.
NetworkManager[31290]: <info> Activation (/phonesim) Stage 3 of 5 (IP Configure Start) started...
NetworkManager[31290]: <info> (/phonesim): device state change: config -> ip-config (reason 'none') [50 70 0]
NetworkManager[31290]: <info> Activation (/phonesim) Stage 4 of 5 (IPv6 Configure Timeout) scheduled...
NetworkManager[31290]: <info> Activation (/phonesim) Stage 3 of 5 (IP Configure Start) complete.
NetworkManager[31290]: <info> (/phonesim): IPv4 static configuration:

(NetworkManager:31290): GLib-GObject-CRITICAL **: g_value_get_string: assertion 'G_VALUE_HOLDS_STRING (value)' failed

Reproducer:
- Take current phone build and put it into write mode
- Install ofono-phonesim xvfb-run
- Edit /etc/ofono/phonesim.conf and enable the commented out phonesim stanza
- sudo stop ofono
- In ssh/terminal 1, start ofono (in the foreground): sudo ofonod -P ril -n
- In ssh/terminal 2:
  * start the simulator: xvfb-run -a ofono-phonesim -p 12345 /usr/share/phonesim/default.xml &
  * start the modem: /usr/share/ofono/scripts/enable-modem
  * run NM: sudo /usr/sbin/NetworkManager --no-daemon

This reproduces the crash.

ProblemType: Crash
DistroRelease: Ubuntu 13.10
Package: network-manager 0.9.8.0-0ubuntu20
Uname: Linux 3.4.0-3-mako armv7l
ApportVersion: 2.12.4-0ubuntu1
Architecture: armhf
CRDA: Error: [Errno 2] No such file or directory: 'iw'
Date: Fri Sep 27 09:48:20 2013
Disassembly: => 0x6f666f2c: Cannot access memory at address 0x6f666f2c
ExecutablePath: /usr/sbin/NetworkManager
ExecutableTimestamp: 1377811150
IfupdownConfig:
 # interfaces(5) file used by ifup(8) and ifdown(8)
 # Include files from /etc/network/interfaces.d:
 source-directory /etc/network/interfaces.d
InstallationDate: Installed on 2013-09-25 (1 days ago)
InstallationMedia: Ubuntu Saucy Salamander (development branch) - armhf (20130925.2)
IpRoute:

MarkForUpload: True
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
PciNetwork:

ProcCmdline: NetworkManager
ProcCwd: /
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
 LANG=en_US.UTF-8
Signal: 11
SourcePackage: network-manager
StacktraceTop:
 ?? ()
 g_hash_table_lookup () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
 ?? ()
 ?? ()
Title: NetworkManager crashed with SIGSEGV in g_hash_table_lookup()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

mtime.conffile..etc.dbus.1.system.d.org.freedesktop.NetworkManager.conf: 2013-09-25T17:49:14
nmcli-con:
 Error: command ['nmcli', '-f', 'all', 'con'] failed with exit code 9:
 ** (process:30696): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files
 Error: nmcli (0.9.8.0) and NetworkManager (unknown) versions don't match. Force execution using --nocheck, but the results are unpredictable.
nmcli-dev: Error: command ['nmcli', '-f', 'all', 'dev'] failed with exit code 8: Error: NetworkManager is not running.
nmcli-nm:
 RUNNING VERSION STATE NET-ENABLED WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
 not running unknown unknown unknown unknown unknown unknown unknown

Martin Pitt (pitti) wrote :
information type: Private → Public
tags: added: qa-touch

Stacktrace:
 #0 <unavailable> in ?? ()
 PC not available
StacktraceTop: <unavailable> in ?? ()
ThreadStacktrace:
 PC not available
 warning: wrong size gregset struct in core file
 Quitting: PC register is not available

Changed in network-manager (Ubuntu):
importance: Undecided → Medium
summary: NetworkManager crashes in ofono plugin with phonesim [crashed with
- SIGSEGV in g_hash_table_lookup()]
+ SIGSEGV in <unavailable> in ??()]
tags: removed: need-armhf-retrace

Right. The code that catches the IP config when that gets established is probably not as solid as it could be.

Setting to Triaged, I can guard against this kind of failure, but it's possibly indicative that something happens in phonesim in ofono that makes not all the IP configuration available, and that is likely to be an issue still to activate the device, so it's going to need some more testing.

Changed in network-manager (Ubuntu):
status: New → Confirmed
importance: Medium → High
status: Confirmed → Triaged
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Martin Pitt (pitti) on 2013-10-02
tags: added: rls-s-incoming
Allan LeSage (allanlesage) wrote :

Not marking qa-daily-testing as doesn't appear user-facing.

Aron Xu (happyaron) on 2016-12-20
tags: added: nm-touch
To post a comment you must log in.