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 18:11:06 GMT
On Mon, Dec 3, 2012 at 11:17 AM, J.Lance Wilkinson <jlw12@psu.edu> wrote:

> Jeff Trawick wrote:
>
>  On Mon, Dec 3, 2012 at 10:28 AM, J.Lance Wilkinson <jlw12@psu.edu<mailto:
>> 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.
>>
>
>         Yep.   ulimit reports "unlimited".
>

there are a number of limits on different resources

try 'ulimit -a' to see all the limits that the shell knows about



>
>         Script is intended for METHOD=POST, so I have a "debug" version
> which
>         simply outputs a script to set all the environment variables, and a
>         file containing all the POSTed parameters.   The regular version,
>         when REQUEST_METHOD doesn't exist and "@filename" appears on the
>         command line, reads and initializes the POST parameters from the
>         filename specified on the command line.   And runs to completion.
>         If I have its output written to a file, I can read that file in a
>         browser and see EXACTLY what I expect the script to output.  If I
>         run it as a CGI script, it aborts before 90% of the output appears
>         (but -- that 90% of the output is generated at the VERY END of the
>         script's run, after it does all its analysis and builds up a fairly
>         large N-ary tree in memory, then prints it out as an unordered list
>         (<ul><li></li><li><ul><li></**li><li></li></ul></li><li></**
> li></ul>).
>
>         Run that command at a shell prompt after setting all the
> environment
>         variables, and it runs to completion.
>
>         Run it under GDB (DDD) and same results.
>
>         Even run it under strace and it completes OK.
>
>         I'd run it under these debuggers all the time, if it didn't
>         exponentially slow it down.
>
>
> --
> 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