<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Ok, that's the info I was looking for :)..<br>
    <br>
    Looking at that group, should I understand you have only one
    destination in there, while having the  "use_default" on ? This
    makes a bit of none sense - the group has only the default
    destination (to be used in case of failure), but no regular
    destination ??<br>
    <br>
    Anyhow, there is a bug there, but I want to understand your setting,
    to be sure that the fix will be the right one ;)<br>
    <br>
    Thanks and regards,<br>
    Bogdan<br>
    <br>
    On 03/13/2012 04:51 PM, Samuel Muller wrote:
    <blockquote
cite="mid:CAEhWu_b3DZ9D_r7N+B20yQe3f=LtY6wvFv1zxHCyMBeq49JJFA@mail.gmail.com"
      type="cite">oups, sorry ...<br>
      <br>
      (gdb) p *idx<br>
      $1 = {id = 1, nr = 1, last = 0, weight_sum = 0, dlist =
      0x7f867d60b458, next = 0x0}<br>
      <br>
      ;)<br>
      <br>
      .Sam.<br clear="all">
      <br>
      Samuel MULLER<br>
      <br>
      <br>
      <div class="gmail_quote">On Tue, Mar 13, 2012 at 3:40 PM,
        Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
            moz-do-not-send="true" href="mailto:bogdan@opensips.org">bogdan@opensips.org</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;">
          <div bgcolor="#ffffff" text="#000000"> Hi Samuel,<br>
            <br>
            Print please "*idx" and not only "idx" - I need its content
            ;)<br>
            <br>
            Regards,<br>
            Bogdan
            <div>
              <div class="h5"><br>
                <br>
                On 03/13/2012 04:35 PM, Samuel Muller wrote:
                <blockquote type="cite">Hello Bogdan,<br>
                  <br>
                  nice to see you again !<br clear="all">
                  <br>
                  here the stuff :<br>
                  <br>
                  [Thread debugging using libthread_db enabled]<br>
                  Core was generated by `/opt/opensips/sbin/opensips -P
                  /opt/opensips/var/run/opensips.pid -m 256 -u sam'.<br>
                  Program terminated with signal 8, Arithmetic
                  exception.<br>
                  #0  0x00007f26f086c513 in ds_select_dst (msg=0x80ebe8,
                  set=&lt;optimized out&gt;, alg=0, mode=&lt;optimized
                  out&gt;, <br>
                      max_results=&lt;optimized out&gt;) at
                  dispatch.c:1235<br>
                  1235                i = (i+1)%(idx-&gt;nr-1);<br>
                  <br>
                  (gdb) p i<br>
                  $1 = 0<br>
                  <br>
                  (gdb) p idx<br>
                  $2 = (ds_set_p) 0x7f26dee90350<br>
                  <br>
                  (gdb) l<br>
                  1230    <br>
                  1231        i=ds_id;<br>
                  1232        while (
                  idx-&gt;dlist[i].flags&amp;(DS_INACTIVE_DST|DS_PROBING_DST)
                  )<br>
                  1233        {<br>
                  1234            if(ds_use_default!=0)<br>
                  1235                i = (i+1)%(idx-&gt;nr-1);<br>
                  1236            else<br>
                  1237                i = (i+1)%idx-&gt;nr;<br>
                  1238            if(i==ds_id)<br>
                  1239            {<br>
                  <br>
                  <br>
                  I re-tested with a few modifications, like changing
                  IPs in the dispatcher list file, or into the routing
                  logic ("do it simple like in the docs examples"), the
                  same problems still happens :/<br>
                  <br>
                  here's the corefile if needed : <a
                    moz-do-not-send="true"
                    href="http://public.l33.fr/corefile.opensips.tar.gz"
                    target="_blank">http://public.l33.fr/corefile.opensips.tar.gz</a><br>
                  <br>
                  <br>
                  Best regards,<br>
                  <br>
                  Samuel MULLER<br>
                  <br>
                  <br>
                  <br>
                  <div class="gmail_quote">On Tue, Mar 13, 2012 at 2:51
                    PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
                        moz-do-not-send="true"
                        href="mailto:bogdan@opensips.org"
                        target="_blank">bogdan@opensips.org</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 Samuel,<br>
                      <br>
                      In gdb, could you please print the '*idx' and 'i'
                      variables ?<br>
                      <br>
                      Thanks and regards,<br>
                      Bogdan
                      <div>
                        <div><br>
                          <br>
                          <br>
                          <br>
                          On 03/07/2012 03:34 PM, Samuel Muller wrote:<br>
                        </div>
                      </div>
                      <blockquote class="gmail_quote" style="margin: 0pt
                        0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
                        204, 204); padding-left: 1ex;">
                        <div>
                          <div> Hey all,<br>
                            <br>
                            I got this crash when testing proxies
                            availability with the dispatcher module :<br>
                            <br>
                            $ gdb  /opt/opensips/sbin/opensips core<br>
                            <br>
                            GNU gdb (GDB) 7.3-debian<br>
                            This GDB was configured as
                            "x86_64-linux-gnu".<br>
                            Reading symbols from
                            /opt/opensips/sbin/opensips...done.<br>
                            [New LWP 11580]<br>
                            <br>
                            [Thread debugging using libthread_db
                            enabled]<br>
                            Core was generated by
                            `/opt/opensips/sbin/opensips -P<br>
                            /opt/opensips/var/run/opensips.pid -m 256 -u
                            sam'.<br>
                            Program terminated with signal 8, Arithmetic
                            exception.<br>
                            #0  0x00007f87b9b54513 in ds_select_dst
                            (msg=0x80f988, set=&lt;optimized<br>
                            out&gt;, alg=0,<br>
                                mode=&lt;optimized out&gt;,
                            max_results=&lt;optimized out&gt;) at
                            dispatch.c:1235<br>
                            1235                i =
                            (i+1)%(idx-&gt;nr-1);<br>
                            <br>
                            <br>
                            in the opensips.cfg :<br>
                            <br>
modparam("dispatcher","list_file","/opt/opensips/etc/opensips/dispatcher.list")<br>
                            modparam("dispatcher","use_default",1)<br>
modparam("dispatcher","dst_avp","$avp(dp_dst)")<br>
modparam("dispatcher","attrs_avp","$avp(dp_attrs)")<br>
modparam("dispatcher","grp_avp","$avp(dp_grp)")<br>
modparam("dispatcher","cnt_avp","$avp(dp_cnt)")<br>
modparam("dispatcher","hash_pvar","$avp(dp_hash)")<br>
modparam("dispatcher","setid_pvar","$avp(dp_setid)")<br>
                            modparam("dispatcher","ds_ping_from","<a
                              moz-do-not-send="true"
                              href="mailto:sip%3Aedge@lab.com"
                              target="_blank">sip:edge@lab.com</a>")<br>
                            modparam("dispatcher","ds_ping_interval",30)<br>
                            modparam("dispatcher","ds_probing_mode",1)<br>
                            <br>
                            route {<br>
                            ...<br>
                                if (!is_method("REGISTER|MESSAGE")) {<br>
                                    record_route(";rr=edge");<br>
                                }<br>
                               if (is_method("REGISTER")) {<br>
                                    if (!ds_select_dst("1", "0")) {<br>
                                        ds_mark_dst("p");<br>
                                        ds_select_dst("2", "0");<br>
                                    }<br>
                                }<br>
                                if (is_method("INVITE")) {<br>
                                    if (!ds_select_dst("3", "0")) {<br>
                                        ds_mark_dst("p");<br>
                                        ds_select_dst("4", "0");<br>
                                    }<br>
                                }<br>
                                route(RELAY);<br>
                                exit;<br>
                            }<br>
                            <br>
                            <br>
                            in the dispatcher.list :<br>
                            <br>
                            1 sip:<a moz-do-not-send="true"
                              href="http://1.2.3.4:5060" target="_blank">1.2.3.4:5060</a><br>
                            2 sip:<a moz-do-not-send="true"
                              href="http://1.2.3.5:5060" target="_blank">1.2.3.5:5060</a><br>
                            3 sip:<a moz-do-not-send="true"
                              href="http://1.2.3.6:5060" target="_blank">1.2.3.6:5060</a><br>
                            4 sip:<a moz-do-not-send="true"
                              href="http://1.2.3.5:5060" target="_blank">1.2.3.5:5060</a><br>
                            <br>
                            all is running under Debian last stable
                            release + backports.<br>
                            <br>
                            I would like to know if it's my dispatcher
                            configuration routine<br>
                            that's not correct, or if it's a module
                            problem ?<br>
                            <br>
                            thank you,<br>
                            <br>
                            <br>
                            Samuel MULLER<br>
                            <br>
                          </div>
                        </div>
                        _______________________________________________<br>
                        Users mailing list<br>
                        <a moz-do-not-send="true"
                          href="mailto:Users@lists.opensips.org"
                          target="_blank">Users@lists.opensips.org</a><br>
                        <a moz-do-not-send="true"
                          href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                          target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                        <br>
                        <span><font color="#888888"> </font></span></blockquote>
                      <span><font color="#888888"> <br>
                          <br>
                          -- <br>
                          Bogdan-Andrei Iancu<br>
                          OpenSIPS Founder and Developer<br>
                          <a moz-do-not-send="true"
                            href="http://www.opensips-solutions.com"
                            target="_blank">http://www.opensips-solutions.com</a><br>
                          <br>
                        </font></span></blockquote>
                  </div>
                  <br>
                </blockquote>
                <br>
                <br>
                <pre cols="72">-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
  </body>
</html>