ports/108459: lang/perl5.8 internal malloc (usemymalloc=y) is broken
Yuri Karaban
tech at askold.net
Sun Jan 28 00:30:31 UTC 2007
>Number: 108459
>Category: ports
>Synopsis: lang/perl5.8 internal malloc (usemymalloc=y) is broken
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Jan 28 00:30:29 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Yuri Karaban
>Release: FreeBSD 5.5-RELEASE-p2
>Organization:
>Environment:
FreeBSD myhost 5.5-RELEASE-p2 FreeBSD 5.5-RELEASE-p2 #0: Thu Aug 17 14:45:10 CDT 2006 root at myhost:/usr/obj/usr/src/sys/MYHOST i386
>Description:
Perl compiled with its internal malloc (which is default option) consuming all process address space (512MB)
with programs which doing many allocations (for example mayb programs from POE framework).
For example if to run this sample stress test:
-------[cut]---------
#! /usr/bin/perl
use strict;
use warnings;
my $d = [];
for (;;) {
if (@$d > 10) {
shift @$d;
}
push @$d, '';
while (length($d->[-1]) < 100000) {
$d->[-1] .= 'Z' x 50;
}
$d->[-1] = '';
}
-------[cut]---------
perl compiled with usemymalloc=y, in several seconds consume all process space and drops with error like:
Out of memory during "large" request for 69632 bytes, total sbrk() is 536791040 bytes at ./leak.pl line 14
However perl compiled with usemymalloc=n (WITHOUT_PERL_MALLOC=yes) running well, and memory consumption does not grow above 5MB.
>How-To-Repeat:
>Fix:
workaround is to add WITHOUT_PERL_MALLOC=yes to /etc/make.conf
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list