ModemManager crashes

Bug #1191459 reported by Jiehan Zheng
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ModemManager
Fix Released
Medium
modemmanager (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I've been attempting to use my built-in mobile broadband device for the entire afternoon with no success...but it worked before!! It must be some update that caused it.

Here is my device line from lsusb:

Bus 003 Device 003: ID 0bdb:1926 Ericsson Business Mobile Networks BV

NetworkManager applet won't show a mobile broadband option in the menu, and I guess it's because ModemManager crashes so quickly...

Here's what happens when I run ModemManager:

root@tpx1c /h/jiehan# ModemManager
ModemManager[1296]: <info> ModemManager (version 0.7.991) starting...
ModemManager[1296]: <warn> Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2': not supported by any plugin
ModemManager[1296]: <warn> Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0': not supported by any plugin
ModemManager[1296]: [/dev/cdc-wdm2] Couldn't query maximum message size: IOCTL_WDM_MAX_COMMAND failed: Inappropriate ioctl for device
ModemManager[1296]: [/dev/cdc-wdm2] Read max control message size from descriptors file: 512
ModemManager[1296]: [/dev/cdc-wdm0] Couldn't query maximum message size: IOCTL_WDM_MAX_COMMAND failed: Inappropriate ioctl for device
ModemManager[1296]: [/dev/cdc-wdm0] Read max control message size from descriptors file: 512
ModemManager[1296]: [/dev/cdc-wdm1] Couldn't query maximum message size: IOCTL_WDM_MAX_COMMAND failed: Inappropriate ioctl for device
ModemManager[1296]: [/dev/cdc-wdm1] Read max control message size from descriptors file: 512
ModemManager[1296]: <info> Creating modem with plugin 'Ericsson MBM' and '7' ports
ModemManager[1296]: <warn> Could not grab port (usbmisc/cdc-wdm1): 'Cannot add port 'usbmisc/cdc-wdm1', unsupported'
ModemManager[1296]: <warn> Could not grab port (usbmisc/cdc-wdm0): 'Cannot add port 'usbmisc/cdc-wdm0', unsupported'
ModemManager[1296]: <warn> Could not grab port (tty/ttyACM1): 'Cannot add port 'tty/ttyACM1', unhandled serial type'
ModemManager[1296]: <warn> Could not grab port (tty/ttyACM0): 'Cannot add port 'tty/ttyACM0', unhandled serial type'
ModemManager[1296]: <info> Modem for device at '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-4' successfully created
ModemManager[1296]: [/dev/cdc-wdm2] Couldn't query maximum message size: IOCTL_WDM_MAX_COMMAND failed: Inappropriate ioctl for device
ModemManager[1296]: [/dev/cdc-wdm2] Read max control message size from descriptors file: 512
*** Error in `ModemManager': malloc(): memory corruption (fast): 0x0000000000973dc0 ***

The output with --debug flag is attached.

Any advice or ideas are appreciated. Thanks!

Revision history for this message
In , Aleksander Morgado (aleksander-m) wrote :

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6d7dc68 in __gconv () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff6d7dc68 in __gconv () from /usr/lib/libc.so.6
#1 0x00007ffff6d7d209 in iconv () from /usr/lib/libc.so.6
#2 0x00007ffff7134255 in g_convert_with_iconv () from /usr/lib/libglib-2.0.so.0
#3 0x00007ffff7134498 in g_convert () from /usr/lib/libglib-2.0.so.0
#4 0x00007ffff7bc541a in _mbim_message_read_string_array
(self=self@entry=0x63ba40, array_size=<optimized out>,
relative_offset_array_start=relative_offset_array_start@entry=28) at
mbim-message.c:233
#5 0x00007ffff7bccc8c in
mbim_message_subscriber_ready_status_response_parse
(message=message@entry=0x63ba40,
ready_state=ready_state@entry=0x7fffffffe734,
subscriber_id=subscriber_id@entry=0x7fffffffe748,
    sim_icc_id=sim_icc_id@entry=0x7fffffffe750,
ready_info=ready_info@entry=0x7fffffffe738,
telephone_numbers_count=telephone_numbers_count@entry=0x7fffffffe73c,
telephone_numbers=telephone_numbers@entry=0x7fffffffe758,
    error=error@entry=0x7fffffffe740) at mbim-basic-connect.c:1211
#6 0x0000000000403e94 in query_subscriber_ready_status_ready
(device=0x640840, res=<optimized out>) at mbimcli-basic-connect.c:342
#7 0x00007ffff78caac7 in g_simple_async_result_complete () from
/usr/lib/libgio-2.0.so.0
#8 0x00007ffff78cab29 in ?? () from /usr/lib/libgio-2.0.so.0
#9 0x00007ffff714fe46 in g_main_context_dispatch () from
/usr/lib/libglib-2.0.so.0
#10 0x00007ffff7150198 in ?? () from /usr/lib/libglib-2.0.so.0
#11 0x00007ffff715059a in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#12 0x0000000000402c46 in main (argc=1, argv=0x7fffffffe9e8) at mbimcli.c:336

The culprit seems to be this response:

03:00:00:80:B4:00:00:00:02:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:02:00:00:00:00:00:00:00:84:00:00:00:01:00:00:00:3C:00:00:00:1E:00:00:00:5C:00:00:00:28:00:00:00:00:00:00:00:01:00:00:00:24:00:00:00:16:00:00:00:31:00:38:00:31:00:33:00:39:00:39:00:32:00:33:00:35:00:38:00:35:00:00:00:33:00:31:00:30:00:34:00:31:00:30:00:34:00:36:00:39:00:31:00:31:00:30:00:37:00:36:00:31:00:00:00:38:00:39:00:30:00:31:00:34:00:31:00:30:00:34:00:32:00:35:00:34:00:36:00:39:00:31:00:31:00:30:00:37:00:36:00:31:00:32:00

Revision history for this message
In , Aleksander Morgado (aleksander-m) wrote :

Should be fixed now in git master, commit c454956ea4c1e71aad401d2b77bfb06dc7561a1b.

Added also a unit test to cover the issue.

Revision history for this message
Jiehan Zheng (jiehanzheng) wrote :
description: updated
Revision history for this message
Aleksander Morgado (aleksander-m) wrote :

For what I can see, ModemManager here is already using libmbim to manage the device, and this specific crash is 99% likely to be this one:

  https://bugs.freedesktop.org/show_bug.cgi?id=65166

Please update libmbim to the recent 1.2 version:
  http://lists.freedesktop.org/archives/libmbim-devel/2013-June/000053.html

Changed in modemmanager:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Jiehan Zheng (jiehanzheng) wrote :

Aleksander,

That's exactly the reason why. After building and installing libmbim 1.2, I am able to use my built-in mobile broadband and in fact, I am using it right now! Will return my freaking expensive ($140 after tax) and ugly (black + green) T-Mobile hotspot...

Thank you so much!

Revision history for this message
Aleksander Morgado (aleksander-m) wrote :

Great, thanks for checking :)

Revision history for this message
Jiehan Zheng (jiehanzheng) wrote :

Hi Aleksander,

It worked, but now I am getting this error message after I turn off my laptop then turn it back on:

Jun 16 20:53:45 tpx1c NetworkManager[273]: <info> Activation (cdc-wdm1) starting connection 'T-Mobile'
Jun 16 20:53:45 tpx1c NetworkManager[273]: <info> (cdc-wdm1): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Jun 16 20:53:45 tpx1c NetworkManager[273]: <info> Activation (cdc-wdm1) Stage 1 of 5 (Device Prepare) scheduled...
Jun 16 20:53:45 tpx1c NetworkManager[273]: <info> Activation (cdc-wdm1) Stage 1 of 5 (Device Prepare) started...
Jun 16 20:53:45 tpx1c NetworkManager[273]: <info> Activation (cdc-wdm1) Stage 1 of 5 (Device Prepare) complete.
Jun 16 20:53:45 tpx1c ModemManager[236]: <info> Simple connect started...
Jun 16 20:53:45 tpx1c ModemManager[236]: <info> Simple connect state (4/8): Wait to get fully enabled
Jun 16 20:53:45 tpx1c ModemManager[236]: <info> Simple connect state (5/8): Register
Jun 16 20:53:45 tpx1c ModemManager[236]: <info> Simple connect state (6/8): Bearer
Jun 16 20:53:45 tpx1c ModemManager[236]: <info> Simple connect state (7/8): Connect
Jun 16 20:53:45 tpx1c ModemManager[236]: <info> Modem /org/freedesktop/ModemManager1/Modem/3: state changed (registered -> connecting)
Jun 16 20:53:45 tpx1c ModemManager[236]: <info> Modem /org/freedesktop/ModemManager1/Modem/3: state changed (connecting -> registered)
Jun 16 20:53:45 tpx1c NetworkManager[273]: <info> (cdc-wdm1) modem state changed, 'registered' --> 'connecting' (reason: user-requested)
Jun 16 20:53:45 tpx1c NetworkManager[273]: <info> (cdc-wdm1) modem state changed, 'connecting' --> 'registered' (reason: user-requested)
Jun 16 20:53:45 tpx1c NetworkManager[273]: <warn> (cdc-wdm1) failed to connect modem: NoDeviceSupport
Jun 16 20:53:45 tpx1c NetworkManager[273]: <info> (cdc-wdm1): device state change: prepare -> failed (reason 'unknown') [40 120 1]
Jun 16 20:53:45 tpx1c NetworkManager[273]: <warn> Activation (cdc-wdm1) failed for connection 'T-Mobile'
Jun 16 20:53:45 tpx1c NetworkManager[273]: <info> (cdc-wdm1): device state change: failed -> disconnected (reason 'none') [120 30 0]
Jun 16 20:53:45 tpx1c NetworkManager[273]: <info> (cdc-wdm1): deactivating device (reason 'none') [0]
Jun 16 20:53:45 tpx1c NetworkManager[273]: <warn> (cdc-wdm1) firewall zone remove failed: (32) UNKNOWN_INTERFACE: cdc-wdm1
Jun 16 20:53:50 tpx1c ModemManager[236]: <info> Modem /org/freedesktop/ModemManager1/Modem/3: signal quality updated (45)

Do you have any idea why this is happening (failed to connect modem: NoDeviceSupport)? Should I open a bug report somewhere?

Revision history for this message
Jiehan Zheng (jiehanzheng) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in modemmanager (Ubuntu):
status: New → Confirmed
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.