GNOME Bugzilla – Bug 685398
[MM_06] sierra plugin crashes at modem detection
Last modified: 2012-10-04 08:37:50 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:
+ Trace 230957
And this is a GSM, not CDMA modem...
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.
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.
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.
Seems to be solved now. Thanks!