[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sr-dev
Subject:    Re: [sr-dev] Fwd: [SR-Users] SIGUSR1 for memory status not working as documented - only one process 
From:       Alex_Villací­s_Lasso <a_villacis () palosanto ! com>
Date:       2014-07-31 18:13:38
Message-ID: 53DA8752.3000804 () palosanto ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


El 31/07/14 10:47, Alex Villací­s Lasso escribió:
> 
> 
> 
> -------- Mensaje original --------
> Return-Path: 	<sr-users-bounces@lists.sip-router.org>
> Delivered-To: 	<a_villacis@palosanto.com>
> Received: 	from palosanto.com by mail.palosanto.com (Dovecot) with LMTP id \
> w6B7By5S2VNcGwAA3RMWGw for <a_villacis@palosanto.com>; Wed, 30 Jul 2014 15:15:08 \
>                 -0500
> Received: 	from localhost (mail.palosanto.com [127.0.0.1]) by palosanto.com \
> (Postfix) with ESMTP id B9FD413C0277 for <a_villacis@palosanto.com>; Wed, 30 Jul \
>                 2014 15:15:08 -0500 (ECT)
> X-Virus-Scanned: 	Debian amavisd-new at mail.palosanto.com
> X-Spam-Flag: 	NO
> X-Spam-Score: 	-2.237
> X-Spam-Level: 	
> X-Spam-Status: 	No, score=-2.237 tagged_above=-1000 required=6.31 \
>                 tests=[AWL=-0.337, BAYES_00=-1.9] autolearn=ham
> Received: 	from palosanto.com ([127.0.0.1]) by localhost (mail.palosanto.com \
> [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SE504KHIt6Lb for \
>                 <a_villacis@palosanto.com>; Wed, 30 Jul 2014 15:15:04 -0500 (ECT)
> Received: 	from www.kamailio.org (main.kamailio.org [193.22.119.66]) by \
> palosanto.com (Postfix) with ESMTPS id A469B13C026F for <a_villacis@palosanto.com>; \
>                 Wed, 30 Jul 2014 15:15:04 -0500 (ECT)
> Received: 	from localhost ([127.0.0.1] helo=main.kamailio.org ident=list) by \
> www.kamailio.org with esmtp (Exim 4.72) (envelope-from \
> <sr-users-bounces@lists.sip-router.org>) id 1XCaHb-000818-IE; Wed, 30 Jul 2014 \
>                 22:15:31 +0200
> Received: 	from lab2.palosanto.com ([201.234.196.173] helo=palosanto.com) by \
> www.kamailio.org with esmtp (Exim 4.72) (envelope-from <a_villacis@palosanto.com>) \
> id 1XCaHZ-00080H-6l for sr-users@lists.sip-router.org; Wed, 30 Jul 2014 22:15:29 \
>                 +0200
> Received: 	from localhost (mail.palosanto.com [127.0.0.1]) by palosanto.com \
> (Postfix) with ESMTP id 42DF313C0277 for <sr-users@lists.sip-router.org>; Wed, 30 \
>                 Jul 2014 15:14:53 -0500 (ECT)
> X-Virus-Scanned: 	Debian amavisd-new at mail.palosanto.com
> Received: 	from palosanto.com ([127.0.0.1]) by localhost (mail.palosanto.com \
> [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jNanXV3k3Sem for \
>                 <sr-users@lists.sip-router.org>; Wed, 30 Jul 2014 15:14:50 -0500 \
>                 (ECT)
> Received: 	from avillacis.palosanto.com (avillacis.palosanto.com [192.168.3.2]) by \
> palosanto.com (Postfix) with ESMTPSA id 0529713C026F for \
>                 <sr-users@lists.sip-router.org>; Wed, 30 Jul 2014 15:14:50 -0500 \
>                 (ECT)
> Message-ID: 	<53D95256.9050206@palosanto.com>
> Date: 	Wed, 30 Jul 2014 15:15:18 -0500
> From: 	Alex Villací­s Lasso <a_villacis@palosanto.com>
> User-Agent: 	Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 \
>                 Thunderbird/24.7.0
> MIME-Version: 	1.0
> To: 	Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org>
> Subject: 	[SR-Users] SIGUSR1 for memory status not working as documented - only one \
>                 process reports back
> X-BeenThere: 	sr-users@lists.sip-router.org
> X-Mailman-Version: 	2.1.13
> Precedence: 	list
> Reply-To: 	Kamailio (SER) - Users Mailing List <sr-users@lists.sip-router.org>
> List-Id: 	"Kamailio \(SER\) - Users Mailing List" <sr-users.lists.sip-router.org>
> List-Unsubscribe: 	<http://lists.sip-router.org/cgi-bin/mailman/options/sr-users>, \
>                 <mailto:sr-users-request@lists.sip-router.org?subject=unsubscribe>
> List-Archive: 	<http://lists.sip-router.org/pipermail/sr-users>
> List-Post: 	<mailto:sr-users@lists.sip-router.org>
> List-Help: 	<mailto:sr-users-request@lists.sip-router.org?subject=help>
> List-Subscribe: 	<http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>, \
>                 <mailto:sr-users-request@lists.sip-router.org?subject=subscribe>
> Content-Transfer-Encoding: 	7bit
> Content-Type: 	text/plain; charset="us-ascii"; Format="flowed"
> Sender: 	sr-users-bounces@lists.sip-router.org
> Errors-To: 	sr-users-bounces@lists.sip-router.org
> 
> 
> 
> I am trying to track down a memory leak that was triggered by a patch I wrote for \
> my local copy of kamailio 4.1.4 . For this, I am following the documentation \
> athttp://www.kamailio.org/dokuwiki/doku.php/troubleshooting:memory  . This page \
> claims that once memlog is set in the configuration file, a kamailio process will \
> dump a report of the allocation map when shutting down, or when receiving a \
> SIGUSR1. I have configured my kamailio.cfg with memlog=1 and no other change, and I \
> see the memory report on shutdown for all processes. However, when I send a SIGUSR1 \
> to a kamailio process, the process does absolutely nothing, with the exception of \
> the first kamailio process (the one reported as Type=attendant by "kamctl ps"). All \
> of the other processes just ignore SIGUSR1. What is going on? It is inconvenient to \
> force a shutdown of all the kamailio processes just to get the memory report. 

 From examination of the source code, I see that the disabling of memory dumps on \
SIGUSR1 for child processes other than the main one is not a bug, but a design \
decision. Why?


[Attachment #5 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">El 31/07/14 10:47, Alex Villac&iacute;&shy;s Lasso
      escribi&oacute;:<br>
    </div>
    <blockquote cite="mid:53DA64FD.1020401@palosanto.com" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <br>
      <div class="moz-forward-container"><br>
        <br>
        -------- Mensaje original --------
        <table class="moz-email-headers-table" border="0"
          cellpadding="0" cellspacing="0">
          <tbody>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Return-Path:

              </th>
              <td><a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="mailto:sr-users-bounces@lists.sip-router.org">&lt;sr-users-bounces@lists.sip-router.org&gt;</a></td>
  </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Delivered-To:

              </th>
              <td><a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="mailto:a_villacis@palosanto.com">&lt;a_villacis@palosanto.com&gt;</a></td>
  </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Received:

              </th>
              <td>from palosanto.com by mail.palosanto.com (Dovecot)
                with LMTP id w6B7By5S2VNcGwAA3RMWGw for <a
                  moz-do-not-send="true" class="moz-txt-link-rfc2396E"
                  href="mailto:a_villacis@palosanto.com">&lt;a_villacis@palosanto.com&gt;</a>;
  Wed, 30 Jul 2014 15:15:08 -0500</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Received:

              </th>
              <td>from localhost (mail.palosanto.com [127.0.0.1]) by
                palosanto.com (Postfix) with ESMTP id B9FD413C0277 for <a
                  moz-do-not-send="true" class="moz-txt-link-rfc2396E"
                  href="mailto:a_villacis@palosanto.com">&lt;a_villacis@palosanto.com&gt;</a>;
  Wed, 30 Jul 2014 15:15:08 -0500 (ECT)</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">X-Virus-Scanned:

              </th>
              <td>Debian amavisd-new at mail.palosanto.com</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">X-Spam-Flag:

              </th>
              <td>NO</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">X-Spam-Score:

              </th>
              <td>-2.237</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">X-Spam-Level:

              </th>
              <td><br>
              </td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">X-Spam-Status:

              </th>
              <td>No, score=-2.237 tagged_above=-1000 required=6.31
                tests=[AWL=-0.337, BAYES_00=-1.9] autolearn=ham</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Received:

              </th>
              <td>from palosanto.com ([127.0.0.1]) by localhost
                (mail.palosanto.com [127.0.0.1]) (amavisd-new, port
                10024) with ESMTP id SE504KHIt6Lb for <a
                  moz-do-not-send="true" class="moz-txt-link-rfc2396E"
                  href="mailto:a_villacis@palosanto.com">&lt;a_villacis@palosanto.com&gt;</a>;
  Wed, 30 Jul 2014 15:15:04 -0500 (ECT)</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Received:

              </th>
              <td>from <a moz-do-not-send="true"
                  class="moz-txt-link-abbreviated"
                  href="http://www.kamailio.org">www.kamailio.org</a>
                (main.kamailio.org [193.22.119.66]) by palosanto.com
                (Postfix) with ESMTPS id A469B13C026F for <a
                  moz-do-not-send="true" class="moz-txt-link-rfc2396E"
                  href="mailto:a_villacis@palosanto.com">&lt;a_villacis@palosanto.com&gt;</a>;
  Wed, 30 Jul 2014 15:15:04 -0500 (ECT)</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Received:

              </th>
              <td>from localhost ([127.0.0.1] helo=main.kamailio.org
                ident=list) by <a moz-do-not-send="true"
                  class="moz-txt-link-abbreviated"
                  href="http://www.kamailio.org">www.kamailio.org</a>
                with esmtp (Exim 4.72) (envelope-from <a
                  moz-do-not-send="true" class="moz-txt-link-rfc2396E"
                  href="mailto:sr-users-bounces@lists.sip-router.org">&lt;sr-users-bounces@lists.sip-router.org&gt;</a>)
  id 1XCaHb-000818-IE; Wed, 30 Jul 2014 22:15:31 +0200</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Received:

              </th>
              <td>from lab2.palosanto.com ([201.234.196.173]
                helo=palosanto.com) by <a moz-do-not-send="true"
                  class="moz-txt-link-abbreviated"
                  href="http://www.kamailio.org">www.kamailio.org</a>
                with esmtp (Exim 4.72) (envelope-from <a
                  moz-do-not-send="true" class="moz-txt-link-rfc2396E"
                  href="mailto:a_villacis@palosanto.com">&lt;a_villacis@palosanto.com&gt;</a>)
  id 1XCaHZ-00080H-6l for <a moz-do-not-send="true"
                  class="moz-txt-link-abbreviated"
                  href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>;
  Wed, 30 Jul 2014 22:15:29 +0200</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Received:

              </th>
              <td>from localhost (mail.palosanto.com [127.0.0.1]) by
                palosanto.com (Postfix) with ESMTP id 42DF313C0277 for <a
                  moz-do-not-send="true" class="moz-txt-link-rfc2396E"
                  href="mailto:sr-users@lists.sip-router.org">&lt;sr-users@lists.sip-router.org&gt;</a>;
  Wed, 30 Jul 2014 15:14:53 -0500 (ECT)</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">X-Virus-Scanned:

              </th>
              <td>Debian amavisd-new at mail.palosanto.com</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Received:

              </th>
              <td>from palosanto.com ([127.0.0.1]) by localhost
                (mail.palosanto.com [127.0.0.1]) (amavisd-new, port
                10024) with ESMTP id jNanXV3k3Sem for <a
                  moz-do-not-send="true" class="moz-txt-link-rfc2396E"
                  href="mailto:sr-users@lists.sip-router.org">&lt;sr-users@lists.sip-router.org&gt;</a>;
  Wed, 30 Jul 2014 15:14:50 -0500 (ECT)</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Received:

              </th>
              <td>from avillacis.palosanto.com (avillacis.palosanto.com
                [192.168.3.2]) by palosanto.com (Postfix) with ESMTPSA
                id 0529713C026F for <a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="mailto:sr-users@lists.sip-router.org">&lt;sr-users@lists.sip-router.org&gt;</a>;
  Wed, 30 Jul 2014 15:14:50 -0500 (ECT)</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Message-ID:

              </th>
              <td><a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="mailto:53D95256.9050206@palosanto.com">&lt;53D95256.9050206@palosanto.com&gt;</a></td>
  </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Date:
              </th>
              <td>Wed, 30 Jul 2014 15:15:18 -0500</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">From:
              </th>
              <td>Alex Villac&iacute;&shy;s Lasso <a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="mailto:a_villacis@palosanto.com">&lt;a_villacis@palosanto.com&gt;</a></td>
  </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">User-Agent:

              </th>
              <td>Mozilla/5.0 (X11; Linux x86_64; rv:24.0)
                Gecko/20100101 Thunderbird/24.7.0</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">MIME-Version:

              </th>
              <td>1.0</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">To: </th>
              <td>Kamailio (SER) - Users Mailing List <a
                  moz-do-not-send="true" class="moz-txt-link-rfc2396E"
                  href="mailto:sr-users@lists.sip-router.org">&lt;sr-users@lists.sip-router.org&gt;</a></td>
  </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Subject:

              </th>
              <td>[SR-Users] SIGUSR1 for memory status not working as
                documented - only one process reports back</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">X-BeenThere:

              </th>
              <td><a moz-do-not-send="true"
                  class="moz-txt-link-abbreviated"
                  href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a></td>
  </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">X-Mailman-Version:

              </th>
              <td>2.1.13</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Precedence:

              </th>
              <td>list</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Reply-To:

              </th>
              <td>Kamailio (SER) - Users Mailing List <a
                  moz-do-not-send="true" class="moz-txt-link-rfc2396E"
                  href="mailto:sr-users@lists.sip-router.org">&lt;sr-users@lists.sip-router.org&gt;</a></td>
  </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">List-Id:

              </th>
              <td>"Kamailio \(SER\) - Users Mailing List"
                &lt;sr-users.lists.sip-router.org&gt;</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">List-Unsubscribe:

              </th>
              <td><a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="http://lists.sip-router.org/cgi-bin/mailman/options/sr-users">&lt;http://lists.sip-router.org/cgi-bin/mailman/options/sr-users&gt;</a>,
  <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sr-users-request@lists.sip-router.org?subject=unsubscribe">&lt;mailto:sr-users-request@lists.sip-router.org?subject=unsubscribe&gt;</a></td>
  </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">List-Archive:

              </th>
              <td><a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="http://lists.sip-router.org/pipermail/sr-users">&lt;http://lists.sip-router.org/pipermail/sr-users&gt;</a></td>
  </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">List-Post:

              </th>
              <td><a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="mailto:sr-users@lists.sip-router.org">&lt;mailto:sr-users@lists.sip-router.org&gt;</a></td>
  </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">List-Help:

              </th>
              <td><a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="mailto:sr-users-request@lists.sip-router.org?subject=help">&lt;mailto:sr-users-request@lists.sip-router.org?subject=help&gt;</a></td>
  </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">List-Subscribe:

              </th>
              <td><a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">&lt;http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users&gt;</a>,
  <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:sr-users-request@lists.sip-router.org?subject=subscribe">&lt;mailto:sr-users-request@lists.sip-router.org?subject=subscribe&gt;</a></td>
  </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" \
align="RIGHT">Content-Transfer-Encoding:

              </th>
              <td>7bit</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Content-Type:

              </th>
              <td>text/plain; charset="us-ascii"; Format="flowed"</td>
            </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Sender:

              </th>
              <td><a moz-do-not-send="true"
                  class="moz-txt-link-abbreviated"
                  href="mailto:sr-users-bounces@lists.sip-router.org">sr-users-bounces@lists.sip-router.org</a></td>
  </tr>
            <tr>
              <th nowrap="nowrap" valign="BASELINE" align="RIGHT">Errors-To:

              </th>
              <td><a moz-do-not-send="true"
                  class="moz-txt-link-abbreviated"
                  href="mailto:sr-users-bounces@lists.sip-router.org">sr-users-bounces@lists.sip-router.org</a></td>
  </tr>
          </tbody>
        </table>
        <br>
        <br>
        <pre>I am trying to track down a memory leak that was triggered by a patch I \
wrote for my local copy of kamailio 4.1.4 . For this, I am following the \
documentation at <a moz-do-not-send="true" class="moz-txt-link-freetext" \
href="http://www.kamailio.org/dokuwiki/doku.php/troubleshooting:memory">http://www.kamailio.org/dokuwiki/doku.php/troubleshooting:memory</a> \
. This page claims that once  memlog is set in the configuration file, a kamailio \
process will dump a report of the allocation map when shutting down, or when \
receiving a SIGUSR1. I have configured my kamailio.cfg with memlog=1 and no other \
change, and I see the memory report on  shutdown for all processes. However, when I \
send a SIGUSR1 to a kamailio process, the process does absolutely nothing, with the \
exception of the first kamailio process (the one reported as Type=attendant by \
"kamctl ps"). All of the other processes just  ignore SIGUSR1. What is going on? It \
is inconvenient to force a shutdown of all the kamailio processes just to get the \
memory report.

</pre>
      </div>
    </blockquote>
    <br>
    From examination of the source code, I see that the disabling of
    memory dumps on SIGUSR1 for child processes other than the main one
    is not a bug, but a design decision. Why?<br>
  </body>
</html>



_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic