httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Lance Wilkinson" <>
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 16:17:20 GMT
Jeff Trawick wrote:
> On Mon, Dec 3, 2012 at 10:28 AM, J.Lance Wilkinson < 
> <>> 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".

	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

	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:
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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message