M(ModemManager:12866): GLib-CRITICAL **: 02:15:18.771: g_array_ref: assertion 'array' failed

Aleksander Morgado aleksander at aleksander.es
Mon Apr 15 08:47:03 UTC 2019


Hey Enrico,

> I am writing to report an issue we are having with Wistron NeWeb (WNC) Modem device.
> libmbim -> GIT version at commit 67ba57f89fd3a2f4b280361e650eaef0057baeaa
> libqmi -> GIT version at commit 38d6729b0822a96e757162208fd8c88bb648085b
> MM -> GIT version at commit 44eac9e97424d6b9c8fe40ab0e6fcbe089407030
> In particular, from what I understood, ModemManager asks for the Modem carrier configs, and concludes the module is using the default config. Hence, the following code path is taken in mm-shared-qmi.c, line 2755:
>
> if (!configs || !configs->len) {
>         // ...
>         ctx->step = LOAD_CARRIER_CONFIG_STEP_LAST;
>         load_carrier_config_step (task);
>         return;
> }
>
> So the switch-case is entered, and we end in the appropriate case, namely (LOAD_CARRIER_CONFIG_STEP_LAST), at line 2871.
> At this point, after some assertions, the following line strikes the warning (or segfault, depending on how GLib was compiled):
> priv->config_list = g_array_ref (ctx->config_list);
>
> Find attached the trace of communications between modem device and ModemManager.
>
> Proposed fix:
> From what I can understand, the state will be correct (e.g.: MM will decide the modem is using default config, active_i will be set to -1 at this point).
> Adding an if before the g_array_assert call seems a possible solution.
>
> Any feedback / comment / help apreciated! Thank you very very much !!
>

Thanks for the report, yes, your analysis is totally right.
I've pushed now a fix to git to solve it.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list