httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: [users@httpd] Compiled/linked executable CGI script crashes when run as CGI, runs to completion when run outside HTTPD
Date Mon, 03 Dec 2012 15:45:18 GMT
On Mon, Dec 3, 2012 at 10:28 AM, J.Lance Wilkinson <jlw12@psu.edu> wrote:

> Jeff Trawick wrote:
>
>> Run under valgrind from the shell, and if that doesn't work create a
>> wrapper script to be the CGI and use the wrapper script to invoke the real
>> CGI under valgrind in that environment.
>>
>
>         Tried that already:  (executable is /.../request; paths shortened
> and
>                                 valgrind line wrapped for brevity)
>
> #!/bin/sh
> valgrind --leak-check=full --track-origins=yes  \
>    --log-file=/.../logs/valgrind.**request.log /.../request
>
>         CGI script runs to completion.


I'm not sure if you did this already, but did you use a fake CGI to capture
ulimits and envvars to aid with reproducing standalone?


>
>
>      El 03/12/12 15:37, J.Lance Wilkinson escribió:
>>
>>         Title pretty much says it all.
>>
>>         HTTPD is 2.2.15 on RHEL6.
>>
>>         Executable aborts, log files show glibc detected memory issues
>>         (messages vary).
>>         Run same executable outside of the CGI environment, on the same
>>         host and under an unprivileged user (can't run as "apache"
>>         because that's not a real ID, my sysadmin says), duplicating all
>>         input, under a debugger and not under a debugger, and it runs to
>>         completion with no errors.
>>
>>         What could HTTPD as the parent environment be imposing that
>>         would cause the aborts when they don't occur outside of Apache?
>>          I speculated some ulimit kind of thing resulting in less memory
>>         actually being available for the thousands of malloc() calls the
>>         executable performs.
>>
>
>
> --
> J.Lance Wilkinson ("Lance")             InterNet: Lance.Wilkinson@psu.edu
> Systems Design Specialist - Lead        Phone: (814) 865-4870
> Digital Library Technologies            FAX:   (814) 863-3560
> E3 Paterno Library
> Penn State University
> University Park, PA 16802
> http://ucs.psu.edu/home/jlw12@**psu.edu?fmt=freebusy<http://ucs.psu.edu/home/jlw12@psu.edu?fmt=freebusy>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@httpd.**apache.org<users-unsubscribe@httpd.apache.org>
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Mime
View raw message