<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    On 9/23/11 1:57 PM, Bruno Bresciani wrote:
    <blockquote
cite="mid:CAKv6MrbUeWm9pUsFUMyCLb23HTHZrNJvbehgf2oeh9GJZ2gHug@mail.gmail.com"
      type="cite">Sorry... but I didn't understand how I get the output
      of:<br>
      <br>
      p _tbc<br>
      p *_tbc<br>
    </blockquote>
    run these commands inside gdb.<br>
    <br>
    Daniel<br>
    <br>
    <blockquote
cite="mid:CAKv6MrbUeWm9pUsFUMyCLb23HTHZrNJvbehgf2oeh9GJZ2gHug@mail.gmail.com"
      type="cite"><br>
      <br>
      Best Regards<br>
      <br>
      <br>
      <div class="gmail_quote">2011/9/23 Daniel-Constantin Mierla <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;</span><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"> Hello,<br>
            <br>
            interesting ... give also the output of:<br>
            <br>
            p _tbc<br>
            p *_tbc<br>
            <br>
            Cheers,<br>
            <font color="#888888"> Daniel</font>
            <div>
              <div class="h5"><br>
                <br>
                On 9/23/11 1:27 PM, Bruno Bresciani wrote:
                <blockquote type="cite">Hello,<br>
                  <br>
                  Doesn't exist a exact often that the table subscriber
                  is changed, it can be changed at any time and almost
                  always the core is generated. I was thinking the same
                  thing that you, the deletion of the table is done
                  without a lock, but the function dbt_db_get_table that
                  call dbt_db_del_table does this lock previously...<br>
                  <br>
                  Follows the output of 'bt full' from gdb:<br>
                  <br>
                  Program terminated with signal 11, Segmentation fault.<br>
                  #0&nbsp; 0x008b3603 in dbt_db_del_table (_dc=0xb60fde60,
                  _s=0xbfc94380, sync=0) at dbt_lib.c:238<br>
                  238&nbsp;&nbsp;&nbsp;&nbsp; dbt_lib.c: Arquivo ou diret&oacute;rio n&atilde;o
                  encontrado.<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in dbt_lib.c<br>
                  (gdb) bt full<br>
                  #0&nbsp; 0x008b3603 in dbt_db_del_table (_dc=0xb60fde60,
                  _s=0xbfc94380, sync=0) at dbt_lib.c:238<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _tbc = (dbt_table_p) 0xb6175d20<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hash = 6<br>
                  #1&nbsp; 0x008b3f38 in dbt_db_get_table (_dc=0xb60fde60,
                  _s=0xbfc94380) at dbt_lib.c:300<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _tbc = (dbt_table_p) 0xb6175d20<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hash = 6<br>
                  #2&nbsp; 0x008ae12b in dbt_query (_h=0x82e3c90,
                  _k=0xbfc94378, _op=0x0, _v=0xbfc94348, _c=0x82e3e50,
                  _n=1, _nc=2, _o=0x0, _r=0xbfc94390) at dbt_base.c:200<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _tbc = &lt;value optimized out&gt;<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _drp = &lt;value optimized out&gt;<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _dres = &lt;value optimized out&gt;<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lkey = &lt;value optimized out&gt;<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lres = (int *) 0x0<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _o_k = (db_key_t *) 0x0<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _o_op = 0x0<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _o_n = &lt;value optimized out&gt;<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _o_l = &lt;value optimized out&gt;<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _o_nc = &lt;value optimized out&gt;<br>
                  #3&nbsp; 0x001ae088 in digest_authenticate (msg=0x82df8f8,
                  realm=&lt;value optimized out&gt;, tname=&lt;value
                  optimized out&gt;, hftype=HDR_AUTHORIZATION_T) at
                  authorize.c:98<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cred = &lt;value optimized out&gt;<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; keys = {0x1b14c8, 0x1b14d0}<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vals = {{type = DB1_STR, nul = 0, free =
                  165777064, val = {int_val = 136948130, ll_val = <a
                    moz-do-not-send="true" href="tel:17316817314"
                    value="+17316817314" target="_blank">17316817314</a>,
                  double_val = 8.5556445301562903e-314,<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; time_val = 136948130,<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string_val = 0x829a9a2 "3022\",
                  realm=\"192.168.166.199\",
                  nonce=\"TnuaJ057mPskvCOYDgyAURuuottiYy7cIAQKLUA=\",
                  cnonce=\"4VwQFl/7Ei+IWecbrZ9rug\", algorithm=MD5,
                  uri=\<a moz-do-not-send="true">"sip:192.168.166.199\"</a>,
                  response=\"45b23bc0e48592fb57b1ebc87f0e3dbc\""...,
                  str_val = {<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s = 0x829a9a2 "3022\",
                  realm=\"192.168.166.199\",
                  nonce=\"TnuaJ057mPskvCOYDgyAURuuottiYy7cIAQKLUA=\",
                  cnonce=\"4VwQFl/7Ei+IWecbrZ9rug\", algorithm=MD5,
                  uri=\<a moz-do-not-send="true">"sip:192.168.166.199\"</a>,
                  response=\"45b23bc0e48592fb57b1ebc87f0e3dbc\""..., len
                  = 4}, blob_val = {<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s = 0x829a9a2 "3022\",
                  realm=\"192.168.166.199\",
                  nonce=\"TnuaJ057mPskvCOYDgyAURuuottiYy7cIAQKLUA=\",
                  cnonce=\"4VwQFl/7Ei+IWecbrZ9rug\", algorithm=MD5,
                  uri=\<a moz-do-not-send="true">"sip:192.168.166.199\"</a>,
                  response=\"45b23bc0e48592fb57b1ebc87f0e3dbc\""..., len
                  = 4}, bitmap_val = 136948130}}, {type = DB1_STR, nul =
                  0, free = 8200,<br>
                  &nbsp;&nbsp;&nbsp; val = {int_val = 137215560, ll_val = 64561725000,
                  double_val = 3.1897730358749953e-313, time_val =
                  137215560, string_val = 0x82dbe48 "192.168.166.199",<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str_val = {s = 0x82dbe48 "192.168.166.199", len
                  = 15}, blob_val = {s = 0x82dbe48 "192.168.166.199",
                  len = 15}, bitmap_val = 137215560}}}<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result = {s = 0x0, len = 0}<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n = &lt;value optimized out&gt;<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ha1 =
                  "\000\000\000\000\220G&Eacute;&iquest;\000\000\000\000&iuml;=\000\000&Ograve;B&Eacute;&iquest;L\215&aacute;\t\000\000\000\000(&Oacute;&agrave;\t&Ocirc;B&Eacute;&iquest;F\000\000\000yv&macr;\000L\215&aacute;\t",

                  '\0' &lt;repeats 12 times&gt;,
                  "&yuml;&yuml;&yuml;&yuml;\a\000\000\000a{&macr;\000^{&macr;\000\000\000\000\000\000\000\000\000&yuml;&yuml;&yuml;&yuml;+\000\000\000\000\000\000\000\001\000\000\0008D&Eacute;&iquest;\210\033-\b&Egrave;V&Eacute;&iquest;HD&Eacute;&iquest;&amp;\205\017\b&Egrave;V&Eacute;&iquest;&oslash;&oslash;-\b8D&Eacute;&iquest;P\020-\b",

                  '\0' &lt;repeats 32 times&gt;, "
                  e&macr;\000TD&Eacute;&iquest;`&ntilde;\000\000&ETH;&Ntilde;\000\000\\\222&macr;d\030\000\000\000\000\000\000\000&raquo;&not;&pound;\000;\216&aacute;\t

                  1&plusmn;\000\000 \000\000&Ocirc;C&Eacute;&iquest;8\216&aacute;\t\b&Ocirc;\r&para;"...<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h = (struct hdr_field *) 0x82e0398<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; domain = {s = 0x82dbe48 "192.168.166.199", len
                  = 15}<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; table = {s = 0x82d8f60 "subscriber", len = 10}<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result = (db1_res_t *) 0x0<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ret = 0<br>
                  <br>
                  <br>
                  Best Regards<br>
                  <br>
                  <div class="gmail_quote">2011/9/23 Daniel-Constantin
                    Mierla <span dir="ltr">&lt;<a
                        moz-do-not-send="true"
                        href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>&gt;</span><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"> Hello,<br>
                        <br>
                        can you send the output of 'bt full' from gdb?<br>
                        <br>
                        How often the subscriber table is changed? I see
                        in this case the deletion of the table is done
                        without a lock.<br>
                        <br>
                        Cheers,<br>
                        Daniel
                        <div>
                          <div><br>
                            <br>
                            On 9/22/11 9:44 PM, Bruno Bresciani wrote: </div>
                        </div>
                        <blockquote type="cite">
                          <div>
                            <div>Hi All,<br>
                              <br>
                              Kamailio 3.1.2 generate a core in db_text
                              module when subscriber table is updated
                              and after this action some SIP message
                              require authentication process...<br>
                              <br>
                              Someone Can Help me to understand why this
                              core is happening? Below&nbsp; is part of
                              kamailio's trace and gdb core too.<br>
                              <br>
                              <br>
                              Kamailio's trace:<br>
                              <br>
                              <b>Sep 22 16:35:54 sswpst00
                                /home2/local/kamailio/sbin/kamailio[2327]:
                                DEBUG: auth_db [authorize.c:239]: realm
                                value [192.168.166.199]</b><br>
                              Sep 22 16:35:54 sswpst00
                              /home2/local/kamailio/sbin/kamailio[2327]:
                              DEBUG: auth [api.c:95]: auth: digest-algo:
                              MD5 parsed value: 1<br>
                              <b>Sep 22 16:35:54 sswpst00
                                /home2/local/kamailio/sbin/kamailio[2327]:
                                DEBUG: db_text [dbt_file.c:78]:
                                [subscriber] was updated</b><br>
                              Sep 22 16:35:54 sswpst00
                              /home2/local/kamailio/sbin/kamailio[2324]:
                              ALERT: &lt;core&gt; [main.c:741]: child
                              process 2327 exited by a signal 11<br>
                              Sep 22 16:35:54 sswpst00
                              /home2/local/kamailio/sbin/kamailio[2324]:
                              ALERT: &lt;core&gt; [main.c:744]: core was
                              generated<br>
                              Sep 22 16:35:54 sswpst00
                              /home2/local/kamailio/sbin/kamailio[2324]:
                              INFO: &lt;core&gt; [main.c:756]: INFO:
                              terminating due to SIGCHLD<br>
                              Sep 22 16:35:54 sswpst00
                              /home2/local/kamailio/sbin/kamailio[2335]:
                              INFO: &lt;core&gt; [main.c:807]: INFO:
                              signal 15 received c<br>
                              Sep 22 16:35:54 sswpst00
                              /home2/local/kamailio/sbin/kamailio[2335]:
                              DEBUG: &lt;core&gt; [main.c:818]: Memory
                              status (pkg):<br>
                              <br>
                              gdb core trace:<br>
                              <br>
                              Core was generated by
                              `/home2/local/kamailio/sbin/kamailio -P
                              /var/run/kamailio.pid'.<br>
                              Program terminated with signal 11,
                              Segmentation fault.<br>
                              <b>#0&nbsp; 0x00f21603 in dbt_db_del_table
                                (_dc=0xb6071e60, _s=0xbf837040, sync=0)
                                at dbt_lib.c:238</b><br>
                              238&nbsp;&nbsp;&nbsp;&nbsp; dbt_lib.c: Arquivo ou diret&oacute;rio
                              n&atilde;o encontrado.<br>
                              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in dbt_lib.c<br>
                              <br>
                              <br>
                              Best Regards<br>
                              <br>
                              <fieldset></fieldset>
                              <br>
                            </div>
                          </div>
                          <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
                        </blockquote>
                        <font color="#888888"> <br>
                          <pre cols="72">-- 
Daniel-Constantin Mierla -- <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Kamailio Advanced Training, Oct 10-13, Berlin: <a moz-do-not-send="true" href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a>
<a moz-do-not-send="true" href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a moz-do-not-send="true" href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a></pre>
                        </font></div>
                    </blockquote>
                  </div>
                  <br>
                  <br>
                  <fieldset></fieldset>
                  <br>
                  <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
                  <br>
                  <pre cols="72">-- 
Daniel-Constantin Mierla -- <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Kamailio Advanced Training, Oct 10-13, Berlin: <a moz-do-not-send="true" href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a>
<a moz-do-not-send="true" href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a moz-do-not-send="true" href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a></pre>
                </blockquote>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</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>
Kamailio Advanced Training, Oct 10-13, Berlin: <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
  </body>
</html>