Probing cancellations
Aleksander Morgado
aleksander at aleksander.es
Fri Jan 15 16:57:51 PST 2016
Hey,
We've seen reports from users where ModemManager would either crash or
get in a bad loop if a device is unplugged/shutdown while it's being
probed. This was because we really didn't cancel device/port probing
tasks when the ports were gone: we just relied on them failing at some
point; which worked more or less well, except for some corner cases
(e.g. if the device was replugged quickly). These issues could be
reproduced more or less easily by adding some sleeps here and there
and making the probing very very slow (so easier to trigger the
disconnections/reconnections).
The new 'aleksander/plugin-manager' branch in upstream git tries to
cope with these issues, by expliclty cancelling the port probing
tasks. The cancellation is tried at multiple levels, even down to the
actual serial port probing tasks, so now it should be quite quick.
http://cgit.freedesktop.org/ModemManager/ModemManager/log/?h=aleksander/plugin-manager
Along with the changes I bumped the GLib requirement to 2.36 (almost 3
years old, March 2013), in order to use the cancellable async support
through GTask.
Several components, especially the MMPluginManager, got quite heavily
refactored, which is why I'm not sending the patches for review here;
it may actually be better for reviewing those to look at the entire
file, not just diffs with limited context.
Comments welcome!
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list