develooper Front page | perl.perl5.porters | Postings from July 2019

[perl #134305] Memory Leak in perl 5.28 and 5.30

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
July 24, 2019 22:07
Subject:
[perl #134305] Memory Leak in perl 5.28 and 5.30
Message ID:
rt-4.0.24-24528-1564006068-71.134305-15-0@perl.org
On Tue, 23 Jul 2019 17:22:46 GMT, a.shikov@dtel-ix.net wrote:
> 
> This is a bug report for perl from a.shikov@dtel-ix.net,
> generated with the help of perlbug 1.41 running under perl 5.28.1.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> Hello!
> 
> Recently we migrated some Perl scripts from old to another server.
> Both servers - FreeBSD.
> On the old server there were 11.2-RELEASE, Perl 5.24.
> On the new server there are  12.0-RELEASE, Perl 5.28.2.
> 
> On a new server we've noticed an intensive memory leak. After
> investigation
> the trouble we've found that memory leak is caused by Sys::Syslog and
> can be
> reproduced by simple script:
> 
> ---------------------------------------------------------------------------
> #!/usr/local/bin/perl -w
> 
> use strict;
> use Sys::Syslog qw(:standard :macros);
> 
> openlog('syslog-demo', 'ndelay', LOG_LOCAL2);
> 
> my $c = 0;
> 
> my @chars = ("A".."Z", "a".."z", "0".."9", "." , "-", "_" );
> 
> while ($c++ <= 10000) {
>         my $string = '';
>         $string .= $chars[rand @chars] for 1..32;
>         for (1..512) {
>                 syslog(LOG_DEBUG, "DEBUG LOG %d/%d RANDOM STRING: %s",
> $c, $_, $string );
>         }
>         sleep 1;
> }
> ---------------------------------------------------------------------------
> 
> Add the line below to syslog.conf to save log to file:
> local2.*                                        /var/log/yarpd.log

I tried that (as well as another spelling including this ticket number) but each time the output was simply appended to /var/log/debug.log.

How can I get this to go to a file just for this problem?

Thank you very much.

-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=134305

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About