<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div class="" style="">Hi all & hi Daniel  , </div><div class="" style=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class="">We had a crash with version 4.0.5 today . </div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class=""><span style="background-color: transparent;" class="">I looks like it happens due to a race condition between a provisional response (183) and the generation of a 408 .</span><br class="" style=""></div><div style="color: rgb(0,
 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class="">We send the INVITE, get a `100 Trying` from upstream , then we get a `183 Session Progress` from upstream , then after exactly 1 minute , we get another `183  Session Progress` from upstream. At this moment kamailio crashed.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class="">Some tm params we have  :</div><div style="background-color: transparent;" class=""><span
 style="background-color: transparent;">modparam("tm", "fr_timer", 5000)</span><br></div><div style="background-color: transparent;" class="">modparam("tm", "fr_inv_timer", 60000)    <- our final reply timer is 1 minute .</div><div style="background-color: transparent;" class="">modparam("tm", "restart_fr_on_each_reply", 1)</div><div class="" style=""><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class=""><br class="" style=""></div><div class="" style="background-color: transparent;">GDB output and logs here:</div><div class="" style="background-color: transparent;"><br class="" style=""></div><div class="" style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style:
 normal;"><a href="http://pastebin.com/GXJm7QyG" class="" style="">kamailio 4.0.5 crash - in fake_req() - race cond - Pastebin.com</a><br class="" style=""></div><div style="width:450px; font-family: 'Georgia', 'Times', 'Times New Roman', 'serif';margin-top:5px; margin-bottom: 5px; background-color: #ffffff;" contenteditable="false" id="enhancrCard_1" class=""><table class="" cellspacing="0" cellpadding="0" border="0" style="width:450px; height:170px; position: relative; display: block;"><tbody class="" style=""><tr class="" style=""><td class="" colspan="8" style="height: 1px; background-color: #e5e5e5; font-size: 1px; border-collapse: collapse;"><div class="" style="height: 1px; background-color: #e5e5e5; font-size: 1px; line-height:0px;"> </div></td></tr><tr class="" style=""><td rowspan="5" class="" style="width: 1px; background-color: #e5e5e5; font-size: 1pt; border-collapse: collapse;"><div class="" style="width: 1px; background-color:
 #e5e5e5; font-size: 1pt;"> </div></td><td class="" rowspan="5" style="vertical-align: middle; width: 168px; height: 168px; background-color: #000000;border-collapse: collapse;"><div class="" style="width: 168px;" align="center"><a href="http://pastebin.com/GXJm7QyG" class="" style="text-decoration: none !important; color: #000000 !important;"><img alt="image" src="https://ec.yimg.com/mail?url=http%3A%2F%2Fpastebin.com%2Fi%2Ffb2.jpg&t=1415120903&sig=re3QxeessG1J6ptsqaMU8w--~B" class="" width="168" height="168" style="display: block; margin: auto;"></a></div></td><td rowspan="5" class="" style="width: 1px; background-color: #e5e5e5; font-size: 0pt; border-collapse: collapse;"><div class="" style="width: 1px; background-color: #e5e5e5; font-size: 1pt;"> </div></td><td rowspan="5" class="" style="width: 14px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;"><div class="" style="width: 14px; background-color: #ffffff;
 font-size: 14pt;"> </div></td><td colspan="2" class="" style="height: 6px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;"><div class="" style="height: 6px; background-color: #ffffff; font-size: 6pt;"> </div></td><td rowspan="5" class="" style="width: 20px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;"><div class="" style="width: 20px; background-color: #ffffff; font-size: 20pt;"> </div></td><td class="" rowspan="5" width="1" style="width: 1px; background-color: #e5e5e5; font-size: 1pt; border-collapse: collapse;"><div class="" style="width: 1px; background-color: #e5e5e5; font-size: 1pt;"> </div></td></tr><tr class="" style=""><td class="" colspan="2" style="width: 100%; vertical-align: middle; font-family: 'Georgia', 'Times', 'Times New Roman', 'serif';"><div class="" style="line-height:16.5px; background-color: #ffffff; height: 135px; width: 245px;"><div class="" style="word-wrap:
 break-word; word-break: break-all;"><span class="" style=""></span><span class="" style=""></span><a href="http://pastebin.com/GXJm7QyG" class="" style="text-decoration: none !important; color: #000000 !important; line-height: 100%; font-size: 18px; display: block;"><span class="" style="margin: 0; font-weight: normal;margin-bottom: 3px; font-size: 18px; line-height: 21px; max-height: 43px; color: #000000; overflow: hidden !important; display: inline-block;">kamailio 4.0.5 crash - in fake_req() - race cond - Paste...</span></a><div style="font-size: 13px; line-height: 20px; color: #999999; max-height: 81px; font-family: 'Georgia', 'Times', 'Times New Roman', 'serif';overflow: hidden;" class="">(gdb) bt #0  0x00007f4d93129a32 in memcpy () from /lib64/libc.so.6 </div></div></div></td></tr><tr class="" style=""><td colspan="2" class="" style="height: 4px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;"><div class=""
 style="height: 4px; background-color: #ffffff; font-size: 4pt;"></div></td></tr><tr class="" style=""><td class="" style="vertical-align: middle; font-family: 'Arial', 'Helvetica Neue', 'Helvetica', 'sans-serif';"><div class="" style="font-size: 0pt;"><a href="http://pastebin.com/GXJm7QyG" class="" style="color: black; text-decoration: none !important;cursor:pointer !important;" target="_blank"><span class="" style="display: inline-block; line-height: 11px; max-width: 145px; min-width: 85px; overflow: hidden; max-height: 13px; word-break: break-all;"><span class="" style="vertical-align:middle; font-size: 9px; line-height: 11px; color: #999999; -moz-text-size-adjust: none; -ms-text-size-adjust: none; -webkit-text-size-adjust:none; text-size-adjust:none;">View on <span style="font-weight: bold" class="">pastebin.com</span></span></span></a></div></td><td class="" style="vertical-align: middle; width: 100px; font-family: 'Arial', 'Helvetica Neue',
 'Helvetica', 'sans-serif';"><div class="" style="max-width: 100px; min-width: 80px; overflow: hidden; text-align: right; line-height: 11px; max-height: 13px; font-size: 0pt;"><span class="" style="vertical-align:middle; font-size: 9px; line-height: 11px; color: #999999; -moz-text-size-adjust: none; -ms-text-size-adjust: none; -webkit-text-size-adjust:none; text-size-adjust:none;">Preview by Yahoo</span></div></td></tr><tr class="" style=""><td colspan="2" class="" style="height: 9px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;"><div class="" style="height: 9px; background-color: #ffffff; font-size: 9pt;"></div></td></tr><tr class="" style=""><td class="" colspan="8" style="height: 1px; background-color: #e5e5e5; font-size: 1px; border-collapse: collapse;"><div class="" style="height: 1px; background-color: #e5e5e5; font-size: 1px; line-height:0px"> </div></td></tr></tbody></table></div><div style="background-color:
 transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class=""><br class="" style=""></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class=""><br class="" style=""></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class="">In fake_req() from t_reply.c , the pointer shmem_msg->new_uri.s which is <span style="background-color: transparent;" class="">passed to memcpy becomes invalid.</span></div><div style="background-color: transparent;" class=""><span style="background-color: transparent;" class=""><br class="" style=""></span></div><div
 style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class=""><span style="background-color: transparent;" class="">memcpy( faked_req->new_uri.s, shmem_msg->new_uri.s,</span><span class="" style="background-color: transparent;">faked_req->new_uri.len);</span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class=""><span style="background-color: transparent; line-height: 21px;" class=""><span style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size: 12px;" class="">(gdb) p  shmem_msg->new_uri</span></span></div><div style="background-color: transparent;
 color: rgb(0, 0, 0); font-size: 12px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-style: normal;" class=""><span style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size: 12px; line-height: 21px;" class="">$3 = {s = 0x0, len = 0}</span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class=""><span style="background-color: transparent; line-height: 21px;" class=""> </span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class="">If this bug is not
  supposed to be fixed in 4.2.0 , we can help with debugging .</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class=""><br class="" style=""></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class=""><br class="" style=""></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class="">Regards,</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;"
 class="">Dragos</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class=""><br class="" style=""></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;" class=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class=""><br class="" style=""></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;" class=""><br class="" style=""></div></div></body></html>