<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=DE link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Hi!<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Can this code section from chan_sip.c (begin at line
14920) cause deadlocks if any error occurs between the mutex lock for iflock?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>--- snip ---<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><font size=2 color="#3f7f5f" face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'>/* Check for
interfaces needing to be killed */</span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ast_mutex_lock(&amp;iflock);</span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:black'>restartsearch:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
t = time(</span></font><b><font size=2 color="#7f0055" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#7F0055;
font-weight:bold'>NULL</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'>);</span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><font size=2 color="#3f7f5f" face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'>/* don't scan
the interface list if it hasn't been a reasonable period</span></font><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#3f7f5f" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; of time since the last time we did it (when MWI is being sent, we
can</span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#3f7f5f" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; get back to this point every millisecond or less)</span></font><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#3f7f5f" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#3F7F5F'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
*/</span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><b><font size=2 color="#7f0055" face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:#7F0055;
font-weight:bold'>for</span></font></b><font size=2 color=black
face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";
color:black'> (sip = iflist; !fastrestart &amp;&amp; sip; sip = sip-&gt;next) {<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:black'>                  &#8230;</span></font><font
size=2 face="Courier New"><span lang=EN-GB style='font-size:10.0pt;font-family:
"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</span></font><font size=2 face="Courier New"><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ast_mutex_unlock(&amp;iflock);</span></font><font size=2 face="Courier New"><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>--- snip ---<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><b><font size=2 face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;font-weight:bold'>Asterisk log:<o:p></o:p></span></font></b></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>--- snip ---<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>[Mar 16 12:31:18] ERROR[11927]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: chan_sip.c line 4303
(sip_alloc): Deadlock? waited 5 sec for mutex '<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&amp;iflock'?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>[Mar 16 12:31:18] ERROR[11927]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: chan_sip.c line 14920
(do_monitor): '&amp;iflock' was locked here.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>[Mar 16 12:31:18] ERROR[11942]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: pbx.c line 2105
(ast_extension_state_del): Deadlock? waited 5 sec fo<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>r mutex '&amp;(&amp;hints)-&gt;lock'?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>[Mar 16 12:31:18] ERROR[11942]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: pbx.c line 1982
(ast_hint_state_changed): '&amp;(&amp;hints)-&gt;lock' was lock<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>ed here.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>[Mar 16 12:31:18] ERROR[11927]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: chan_sip.c line 4303
(sip_alloc): Deadlock? waited 5 sec for mutex '<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&amp;iflock'?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>[Mar 16 12:31:18] ERROR[11927]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: chan_sip.c line 14920
(do_monitor): '&amp;iflock' was locked here.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>[Mar 16 12:31:18] ERROR[11942]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: pbx.c line 2105
(ast_extension_state_del): Deadlock? waited 5 sec fo<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>r mutex '&amp;(&amp;hints)-&gt;lock'?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>[Mar 16 12:31:18] ERROR[11942]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: pbx.c line 1982
(ast_hint_state_changed): '&amp;(&amp;hints)-&gt;lock' was lock<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>ed here.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>[Mar 16 12:31:18] ERROR[11927]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: chan_sip.c line 4303
(sip_alloc): Deadlock? waited 5 sec for mutex '<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>&amp;iflock'?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>[Mar 16 12:31:18] ERROR[11927]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: chan_sip.c line 14920
(do_monitor): '&amp;iflock' was locked here.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>[Mar 16 12:31:18] ERROR[11942]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: pbx.c line 2105
(ast_extension_state_del): Deadlock? waited 5 sec fo<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>r mutex '&amp;(&amp;hints)-&gt;lock'?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>[Mar 16 12:31:18] ERROR[11942]
/usr/src/asterisk/asterisk-1.4.1/include/asterisk/lock.h: pbx.c line 1982
(ast_hint_state_changed): '&amp;(&amp;hints)-&gt;lock' was lock<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>ed here.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>--- snip ---<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Cheers</span></font><span lang=EN-GB><o:p></o:p></span></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Harald</span></font><span lang=EN-GB><o:p></o:p></span></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>-------</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Teamware GmbH<br>
Stahlgruberring 11, D-81829 München<br>
Registergericht München, HRB 104293<br>
Geschäftsführer: Dr.-Ing. Thomas Kupec, Armin Sperber<o:p></o:p></span></font></p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Telefon:&nbsp;&nbsp;
089-427 005.15<br>
E-Mail:&nbsp;&nbsp;&nbsp; <a href="mailto:hra@tmwr.de">hra@tmwr.de</a><br>
Web:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.tmwr.de">http://www.tmwr.de</a><o:p></o:p></span></font></p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><a
href="http://www.tmwr.de/"></a></span></font><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>