After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685398 - [MM_06] sierra plugin crashes at modem detection
[MM_06] sierra plugin crashes at modem detection
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: ModemManager
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-10-03 14:39 UTC by Marius Kotsbak
Modified: 2012-10-04 08:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marius Kotsbak 2012-10-03 14:39:35 UTC
modem-manager[4554]: <debug> [1349274893.585480] [mm-manager.c:298] check_export_modem(): (tty/ttyUSB4): outstanding support task prevents export of /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8
modem-manager[4554]: <debug> [1349274894.582996] [mm-qcdm-serial-port.c:196] debug_log(): (ttyUSB4): --> 7e 00 78 f0 7e
modem-manager[4554]: <debug> [1349274897.585311] [mm-serial-port.c:908] mm_serial_port_close(): (ttyUSB4) device open count is 0 (close)
modem-manager[4554]: <info>  [1349274897.585445] [mm-serial-port.c:923] mm_serial_port_close(): (ttyUSB4) closing serial port...
modem-manager[4554]: <info>  [1349274897.585609] [mm-serial-port.c:944] mm_serial_port_close(): (ttyUSB4) serial port closed
modem-manager[4554]: <debug> [1349274897.585875] [mm-manager.c:714] supports_callback(): (tty/ttyUSB4): plugin 0x80c3140 (Via CBP7) existing 0x80c2da0 (Sierra) info->best 0x80c2da0 (Sierra)
**
ERROR:mm-manager.c:715:supports_callback: code should not be reached

Program received signal SIGABRT, Aborted.

Here is the backtrace:

  • #0 __kernel_vsyscall
  • #1 __GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #2 __GI_abort
    at abort.c line 91
  • #3 g_assertion_message
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #4 supports_callback
    at mm-manager.c line 715
  • #5 mm_plugin_base_supports_task_complete
    at mm-plugin-base.c line 335
  • #6 probe_result
    at mm-plugin-via.c line 89
  • #7 mm_marshal_VOID__OBJECT_UINT
    at mm-marshal.c line 161
  • #8 g_closure_invoke
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #9 ??
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #10 g_signal_emit_valist
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #11 g_signal_emit
    from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
  • #12 emit_probe_result
    at mm-plugin-base.c line 613
  • #13 ??
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #14 g_main_context_dispatch
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #15 ??
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #16 g_main_loop_run
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #17 main
    at main.c line 199

Comment 1 Marius Kotsbak 2012-10-03 14:43:00 UTC
And this is a GSM, not CDMA modem...
Comment 2 Dan Williams 2012-10-03 22:09:07 UTC
The segfault happens if the secondary/APP1 TTY finishes probing before a normal sierra port.  Because the APPx ports don't reply with a valid Vendor/Product string, that causes the Via/Cinterion/Iridium plugins to request a product/vendor probe, and then when that plugin determines it can't support the device, we end up hitting that assertion.

It doesn't happen when the primary TTY finishes first, because that port *does* respond to GMM/GMI and thus Via/Cinterion/Iridium ignore it immediately because the responses indicate it isn't a Via/Cinterion/Iridium device.  That causes MM to create the Modem object and give the port to the Modem, and when the secondary/APP1 port finishes probing, we already have a Modem created and the APP1 port is assigned to the Modem because it's provided by the same physical hardware as the primary TTY.

Not yet sure how to solve it.
Comment 3 Dan Williams 2012-10-03 22:30:09 UTC
Actually I am:

diff --git a/src/mm-manager.c b/src/mm-manager.c
index 728a115..e13d1f7 100644
--- a/src/mm-manager.c
+++ b/src/mm-manager.c
@@ -703,6 +703,14 @@ supports_callback (MMPlugin *plugin,
              * supports it.
              */
             next_plugin = existing_plugin;
+        } else if (plugin != existing_plugin) {
+            /* A modem object may have been created by one of this device's other
+             * ports while this port was getting probed; now that we have a
+             * modem, just use the modem's plugin and ignore this plugin
+             * completely.  All ports of a modem must be handled by the same
+             * plugin.
+             */
+            next_plugin = NULL;
         } else {
             mm_dbg ("(%s/%s): plugin %p (%s) existing %p (%s) info->best %p (%s)",
                     info->subsys, info->name,


if by the time the second plugin finishes probing the port there's already been a Modem object created that the port actually belongs to, just use the Modem's plugin and stop probing.
Comment 4 Aleksander Morgado 2012-10-04 06:28:06 UTC
In git master we wait for all probings to get finished before creating the modem object. In MM_06 we anyway wait to get all the ports before calling organize_ports() and exporting the modem; so it may not be a bad idea to also defer the creation of the modem object until all ports were grabbed.
Comment 5 Marius Kotsbak 2012-10-04 08:37:50 UTC
Seems to be solved now. Thanks!