<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p style="margin-top:0; margin-bottom:0"></p>
<p style="margin-top:0; margin-bottom:0">Hello,</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0"><span style="font-size:12pt">> </span><font size="2"><span style="font-size:12pt">Have you not found the issue with MM 1.8? Or just not tried?</span></font></p>
<p style="margin-top:0; margin-bottom:0"><font size="2"><span style="font-size:11pt"></span></font><br>
</p>
<p style="margin-top:0; margin-bottom:0">We have not tried with MM 1.8 (we have not a method to reproduce these crashes).</p>
<p style="margin-top:0; margin-bottom:0">Do you think that "<span>self->priv->ports</span>" value should be checked before using it in all methods of mm-base-modem.c ? Or just destroyed and set to NULL in finalize ?</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p></p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Arial,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p></p>
<div>
<table style="color:rgb(35,0,102); font-family:Verdana,Arial; font-size:12px; line-height:18px; table-layout:fixed">
<tbody>
<tr>
<td colspan="2" style="padding-bottom:12px; width:356px"><b style="font-size:14px">Sebastien Fabre</b><br>
Embedded Software Engineer </td>
</tr>
<tr>
<td valign="top"><a href="http://www.sigfox.com" target="_blank" id="LPNoLP" style="text-decoration:none; outline:none"><img style="border:0px; margin:4px 10px 0px 0px" width="94" height="30" src="http://www.sigfox.com/static/media/signature_sigfox_logo_nov16.png"></a>
</td>
<td style="padding-left:10px" valign="top">Bâtiment E-volution - 425, rue Jean Rostand
<br>
31670 Labège, France <br>
<a href="mailto:sebastien.fabre@sigfox.com" id="LPNoLP" style="color:#230066">sebastien.fabre@sigfox.com</a><br>
<a href="http://www.sigfox.com" target="_blank" id="LPNoLP" style="color:#8024FF; text-decoration:none"><b>sigfox.com</b></a>
<div style="margin-top:8px"><a href="https://twitter.com/sigfox" target="_blank" id="LPNoLP" style="text-decoration:none; outline:none"><img title="twitter" style="border:none" width="32" height="32" src="http://www.sigfox.com/static/media/T.png">
</a><a href="http://www.facebook.com/sigfox" target="_blank" id="LPNoLP" style="text-decoration:none; outline:none; margin-left:5px"><img title="facebook" style="border:none" width="32" height="32" src="http://www.sigfox.com/static/media/F.png">
</a><a href="http://www.linkedin.com/company/2731408" target="_blank" id="LPNoLP" style="text-decoration:none; outline:none; margin-left:5px"><img title="linkedin" style="border:none; margin-top:1px" width="32" height="32" src="http://www.sigfox.com/static/media/L.png">
</a><a href="https://www.youtube.com/sigfox" target="_blank" id="LPNoLP" style="text-decoration:none; outline:none; margin-left:5px"><img title="youtube" style="border:none" width="32" height="32" src="http://www.sigfox.com/static/media/Y.png">
</a></div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<p></p>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>De :</b> Aleksander Morgado <aleksander@aleksander.es><br>
<b>Envoyé :</b> mardi 27 novembre 2018 17:43:59<br>
<b>À :</b> Sebastien Fabre<br>
<b>Cc :</b> ModemManager (development)<br>
<b>Objet :</b> Re: Crashes in g_hash_table_iter_next call</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Hey<br>
<br>
> With different versions of ModemManager (1.6.12, 1.6.4, 1.4.2), we have seen (rarely) segfault crashes in g_hash_table_iter_next called by mm_base_modem_find_ports because the hash table corresponding to ports is NULL.<br>
> When the crash occurs, in mm_base_modem_find_ports (mm-base-modem.c),  "self->priv->ports" and "self->priv->authp"  are NULL. It seems that they can be NULL only if dispose was called before but the reference count of the object is not equal to 0 (7 for example).
 Maybe because g_object_run_dispose was called.<br>
> Unfortunately, we do not have a method to reproduce these crashes even if it seems to occur at modem unplug (huawei models - broadband).<br>
> Is it a known problem?<br>
><br>
<br>
I believe we should be checking for self->priv->ports being not NULL<br>
in that method, that should solve this problem. This looks like a race<br>
when the modem gets unplugged indeed, but my impression is that a<br>
dangling modem reference left unref-ed could also increase the chances<br>
of this occurring. Have you not found the issue with MM 1.8? Or just<br>
not tried?<br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" id="LPlnk734526" class="OWAAutoLink" previewremoved="true">https://aleksander.es</a><br>
</div>
</span></font></div>
</div>
</body>
</html>