<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Hello,<br>
    <br>
    thanks reporting and for laborious troubleshooting.<br>
    <br>
    I just did a commit for it, seems nobody was using profiles with no
    value for long time. Can you try the patch from commit
    028e3cc1a34f1e682d604a7c0e3fb1a7da03a211 done on GIT master?<br>
    <br>
    If all ok, I will backport.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <br>
    On 10/27/10 7:25 PM, Eugene Oden wrote:
    <blockquote
      cite="mid:AANLkTim7fUR+xaV6veWi9DAxWgX4tA1Eyk7pAvkYmbXC@mail.gmail.com"
      type="cite">no segfault if i use the 3 parameter invocation of
      get_profile_size(), &nbsp;flagging the profile as "with value" and
      passing a static value to get_profile_size() and set_dlg_profile()<br>
      <br>
      <div class="gmail_quote">
        On Wed, Oct 27, 2010 at 12:07 PM, Eugene Oden <span dir="ltr">&lt;<a
            moz-do-not-send="true"
            href="mailto:eugeneoden%2Blist@gmail.com">eugeneoden+list@gmail.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          one more clue:
          <div><br>
          </div>
          <div>
            <div class="im">
              <div>767 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(sp_dest-&gt;setf(msg,
                &amp;sp_dest-&gt;pvp, (int)EQ_T, &amp;val)&lt;0)</div>
            </div>
            <div>(gdb) p sp_dest-&gt;setf</div>
            <div>$1 = (pv_setf_t) 0xffffffff</div>
            <div>
              <div class="h5">
                <div><br>
                </div>
                <br>
                <div class="gmail_quote">On Wed, Oct 27, 2010 at 11:38
                  AM, Eugene Oden <span dir="ltr">&lt;<a
                      moz-do-not-send="true"
                      href="mailto:eugeneoden%2Blist@gmail.com"
                      target="_blank" class="vt-p">eugeneoden+list@gmail.com</a>&gt;</span>
                  wrote:<br>
                  <blockquote class="gmail_quote" style="margin: 0pt 0pt
                    0pt 0.8ex; border-left: 1px solid rgb(204, 204,
                    204); padding-left: 1ex;">
                    hello,
                    <div><br>
                    </div>
                    <div>just started using the dialog module with
                      kamailio 3.1.0 and getting segfaults whenever
                      get_profile_size() is executed. &nbsp;here's a stack
                      trace:</div>
                    <div><br>
                    </div>
                    <div>
                      <div>Core was generated by `kamailio'.</div>
                      <div>Program terminated with signal 11,
                        Segmentation fault.</div>
                      <div>#0 &nbsp;0x003c729e in w_get_profile_size
                        (msg=0x834d8b4, profile=0xb60823f8
                        "\224$\b\266\t", value=0x831cb40 "\004",&nbsp;</div>
                      <div>&nbsp;&nbsp; &nbsp;result=0x8340900 "\001") at dialog.c:767</div>
                      <div>767 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(sp_dest-&gt;setf(msg,
                        &amp;sp_dest-&gt;pvp, (int)EQ_T, &amp;val)&lt;0)</div>
                      <div>(gdb) bt</div>
                      <div>#0 &nbsp;0x003c729e in w_get_profile_size
                        (msg=0x834d8b4, profile=0xb60823f8
                        "\224$\b\266\t", value=0x831cb40 "\004",&nbsp;</div>
                      <div>&nbsp;&nbsp; &nbsp;result=0x8340900 "\001") at dialog.c:767</div>
                      <div>#1 &nbsp;0x08057770 in do_action (h=0xbff5fcb8,
                        a=0x8328f2c, msg=0x834d8b4) at action.c:1105</div>
                      <div>#2 &nbsp;0x0805ea3c in run_actions (h=0xbff5fcb8,
                        a=0x8328f2c, msg=0x834d8b4) at action.c:1553</div>
                      <div>#3 &nbsp;0x080576c0 in do_action (h=0xbff5fcb8,
                        a=0x832c794, msg=0x834d8b4) at action.c:711</div>
                      <div>#4 &nbsp;0x0805ea3c in run_actions (h=0xbff5fcb8,
                        a=0x832c794, msg=0x834d8b4) at action.c:1553</div>
                      <div>#5 &nbsp;0x0805ed71 in run_actions_safe
                        (h=0xbff606e8, a=0x832c794, msg=0x834d8b4) at
                        action.c:1605</div>
                      <div>#6 &nbsp;0x080f5d44 in rval_get_int (h=0xbff606e8,
                        msg=0x0, i=0xbff600d8, rv=0xbff5f694, cache=0x0)
                        at rvalue.c:904</div>
                      <div>#7 &nbsp;0x080fb4fb in rval_expr_eval_int
                        (h=0xbff606e8, msg=0x834d8b4, res=0xbff600d8,
                        rve=0x832c9c4) at rvalue.c:1866</div>
                      <div>#8 &nbsp;0x080fb5d0 in rval_expr_eval_int
                        (h=0xbff606e8, msg=0x834d8b4, res=0xbff60394,
                        rve=0x832cdac) at rvalue.c:1873</div>
                      <div>#9 &nbsp;0x08057511 in do_action (h=0xbff606e8,
                        a=0x832db7c, msg=0x834d8b4) at action.c:1069</div>
                      <div>#10 0x0805ea3c in run_actions (h=0xbff606e8,
                        a=0x832be40, msg=0x834d8b4) at action.c:1553</div>
                      <div>#11 0x080576c0 in do_action (h=0xbff606e8,
                        a=0x8313b88, msg=0x834d8b4) at action.c:711</div>
                      <div>#12 0x0805ea3c in run_actions (h=0xbff606e8,
                        a=0x83003cc, msg=0x834d8b4) at action.c:1553</div>
                      <div>#13 0x0805ecf4 in run_top_route (a=0x83003cc,
                        msg=0x834d8b4, c=0x0) at action.c:1626</div>
                      <div>#14 0x080dceab in receive_msg (</div>
                      <div>&nbsp;&nbsp; &nbsp;buf=0x82a7740 "INVITE <a class="moz-txt-link-freetext" href="sip:*">sip:*</a><a
                          moz-do-not-send="true"
                          href="mailto:98@pipeline.bbpsphone.net"
                          target="_blank" class="vt-p">98@pipeline.bbpsphone.net</a>
                        SIP/2.0\r\nCall-ID:
                        6fb1466b73075c7ad55f278f86ff6b27@0:0:0:0:0:0:0:0\r\nCSeq:
                        2 INVITE\r\nFrom: \"Eugene Oden\" &lt;<a
                          moz-do-not-send="true"
                          href="mailto:sip%3Agoden.atl1@pipeline.bbpsphone.net"
                          target="_blank" class="vt-p">sip:goden.atl1@pipeline.bbpsphone.net</a>&gt;;tag=56dc2460\r\nTo:
                        "..., len=1538, rcv_info=0xbff608f8)</div>
                      <div>&nbsp;&nbsp; &nbsp;at receive.c:205</div>
                      <div>#15 0x0816eef7 in udp_rcv_loop () at
                        udp_server.c:532</div>
                      <div>#16 0x080ad9e1 in main_loop () at main.c:1554</div>
                      <div>#17 0x080b1126 in main (argc=1,
                        argv=0xbff60bd4) at main.c:2398</div>
                    </div>
                    <div><br>
                    </div>
                    <div>and the relevant bits of configuration - not
                      sure if its correct:</div>
                    <div><br>
                    </div>
                    <div>...</div>
                    <div><br>
                    </div>
                    <div>
                      <div>
                        <div>loadmodule "dialog.so"</div>
                        <div>modparam("dialog", "dlg_flag", 4);</div>
                        <div>modparam("dialog", "profiles_no_value",
                          "voicemail");</div>
                        <div><br>
                        </div>
                        <div>...</div>
                        <div><br>
                        </div>
                        <div>route {</div>
                        <div>&nbsp;&nbsp; ...</div>
                        <div><br>
                        </div>
                        <div>&nbsp;&nbsp; if (is_method("INVITE")) {</div>
                        <div>&nbsp;&nbsp; &nbsp; &nbsp;dlg_manage();</div>
                        <div>&nbsp;&nbsp; &nbsp; &nbsp;setflag(4);</div>
                        <div>&nbsp;&nbsp; }</div>
                        <div><br>
                        </div>
                        <div>&nbsp;&nbsp; ...</div>
                        <div><br>
                        </div>
                        <div>&nbsp;&nbsp; if (! route(LIMIT_VOICEMAIL)) {</div>
                        <div>&nbsp;&nbsp; &nbsp; &nbsp;xdbg(" &nbsp; SCRIPT: Voicemail limit
                          exceeded\n");</div>
                        <div>&nbsp;&nbsp; &nbsp; &nbsp;sl_send_reply("503", "Service
                          Unavailable");</div>
                        <div>&nbsp;&nbsp; &nbsp; &nbsp;exit;</div>
                        <div>&nbsp;&nbsp; }</div>
                        <div><br>
                        </div>
                        <div>&nbsp;&nbsp; ...</div>
                        <div>}</div>
                        <div><br>
                        </div>
                        <div>...</div>
                        <div><br>
                        </div>
                        <div>route[LIMIT_VOICEMAIL] {</div>
                        <div>&nbsp;&nbsp; get_profile_size("voicemail",
                          "$avp(size)");</div>
                        <div>&nbsp;&nbsp; if ($avp(size) &gt;= 1) {</div>
                        <div>&nbsp;&nbsp; &nbsp; &nbsp;return -1;</div>
                        <div>&nbsp;&nbsp; }</div>
                        <div><br>
                        </div>
                        <div>&nbsp;&nbsp; set_dlg_profile("voicemail");</div>
                        <div><br>
                        </div>
                        <div>&nbsp;&nbsp; return 1;</div>
                        <div>}</div>
                      </div>
                    </div>
                    <div><br>
                    </div>
                    <div><br>
                    </div>
                    <div>any thoughts?</div>
                    <div><br>
                    </div>
                    <div>gene</div>
                  </blockquote>
                </div>
                <br>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
  </body>
</html>