[Asterisk-Users] Serious memory leak in asterisk (manager)

Roy Sigurd Karlsbakk roy at karlsbakk.net
Sun Mar 2 07:24:42 MST 2003


hi all

after getting some (or - a lot) of messages from nagios, claiming 
asterisk
to be down, I found this out...

astping xxx times repeatedly, and the manager fails to start. this 
little
script was used for testing. below, I've pasted the output from 'ps 
axfv' before and after the DoS, showing asterisk having allocated ~2GB 
RAM.

roy

#!/usr/bin/perl -w
use strict;
my $i = 0;
while (1) {
         $i++;
         system("astping pbx");
         if ($? != 0) {
                 printf("asterisk crashed after %d astpings\n", $i);
                 exit;
         }
}


------ ps axfv before DoS
14917 ?        S      0:00     60   254  2825 1544  0.6 SCREEN
14918 pts/3    S      0:00    302   505  2114 1008  0.3  \_ /bin/bash
15517 pts/3    S      0:02   8023   404 91615 4800  1.8      \_ 
asterisk -vvvcg
  6062 pts/3    S      0:00      1   404 91615 4800  1.8          \_ 
asterisk -vv
  6063 pts/3    S      0:00      1   404 91615 4800  1.8              \_ 
asterisk
  6064 pts/3    S      0:00      1   404 91615 4800  1.8              \_ 
asterisk
  6066 pts/3    S      0:00      0   404 91615 4800  1.8              \_ 
asterisk
  6067 pts/3    S      0:00      0   404 91615 4800  1.8              \_ 
asterisk
  6068 pts/3    S      0:00      0   404 91615 4800  1.8              \_ 
asterisk
  6069 pts/3    S      0:00      1   404 91615 4800  1.8              \_ 
asterisk
  6071 pts/3    S      0:00      0   404 91615 4800  1.8              \_ 
asterisk
  6072 pts/3    S      0:00      0   404 91615 4800  1.8              \_ 
asterisk
  6073 pts/3    S      0:00      0   404 91615 4800  1.8              \_ 
asterisk
  6074 pts/3    S      0:00      0   404 91615 4800  1.8              \_ 
asterisk
  6075 pts/3    S      0:00      0   404 91615 4800  1.8              \_ 
asterisk

-------- ps axfv after DoS
14917 ?        S      0:00     60   254  2825 1544  0.6 SCREEN
14918 pts/3    S      0:00    302   505  2114 1008  0.3  \_ /bin/bash
15517 pts/3    S      0:02   8023   404 2090463 7744  3.0      \_ 
asterisk -vvvc
  6062 pts/3    S      0:00      4   404 2090463 7744  3.0          \_ 
asterisk -
  6063 pts/3    S      0:00      1   404 2090463 7744  3.0              
\_ asteri
  6064 pts/3    S      0:00      1   404 2090463 7744  3.0              
\_ asteri
  6066 pts/3    S      0:00      0   404 2090463 7744  3.0              
\_ asteri
  6067 pts/3    S      0:00      0   404 2090463 7744  3.0              
\_ asteri
  6068 pts/3    S      0:00      0   404 2090463 7744  3.0              
\_ asteri
  6069 pts/3    S      0:00      1   404 2090463 7744  3.0              
\_ asteri
  6071 pts/3    S      0:00      0   404 2090463 7744  3.0              
\_ asteri
  6072 pts/3    S      0:00      0   404 2090463 7744  3.0              
\_ asteri
  6073 pts/3    S      0:00      0   404 2090463 7744  3.0              
\_ asteri
  6074 pts/3    S      0:00      0   404 2090463 7744  3.0              
\_ asteri
  6075 pts/3    S      0:00      0   404 2090463 7744  3.0              
\_ asteri




More information about the asterisk-users mailing list