https://bz.apache.org/bugzilla/show_bug.cgi?id=64096

--- Comment #2 from Jacob Tolar <[email protected]> ---
Example config and perl script to see the issue in action:

in /pwd/devel: 

example.conf: 

```
Listen 59999
<VirtualHost localhost:59999>
ServerName localhost
TimeOut 10

DocumentRoot /pwd/devel/
<Directory "/pwd/devel">
    require all granted
    Options +ExecCGI
    AddHandler cgi-script .cgi .pl
</Directory>

</VirtualHost>
```

test.pl
```
#!/usr/bin/perl -w
use CGI qw/:standard/;

sub run {
    my $q = CGI->new;
    sleep 12;
    print $q->header();
    # ~ 500MB of data
    print "a" x (1000 * 1000 * 500) ;
}

run();
```

$ apachectl -c "Include `pwd`/*.conf"

$ curl http://localhost:59999/test.pl

$ ps -opid,rss -u daemon
  PID   RSS
98314  3852
98315  3852
98317 525200
98401  3856


The worker that handled the request has ~500MB of data that at least in my
observation it doesn't ever free.

I'm a little confused why the memory hangs around past the lifetime of the
request (this is all before the patch submitted as attachment 36980), since the
buckets of cgi stdout data seem to be allocated from the request's pool (I'd
think when the pool cleanup happened they'd get freed, but that doesn't seem to
happen).

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to