This issue is now resolved: my fortran binary handles very large arrays and 
complex functions requiring an unlimited stack size. 

Despite that the stack size limit was defined on a system-wide basis (in 
/etc/security/limits.conf), for any reason it appears that the 
"apache/perl/fortran binary" ensemble was not aware of that (causing my binary 
to crash each time it was called). At the contrary, when I manually restarted 
apache at the shell prompt, the stacksize limit was correctly passed (.bashrc 
with 'ulimit -S -s unlimited').

As a workaround, I used BSD::Resource module 
(http://search.cpan.org/~jhi/BSD-Resource-1.2907/Resource.pm) to define 
stacksize directly in my perl script by using e.g. setrlimit(RLIMIT_STACK, 
$softlimit, $hardlimit); Thus, these new stack size limits are now directly 
passed from my perl script to my binary. 

Thanks for your time and providing me with insights to fix this issue! Cheers. 
 


---- Message d'origine ----
De : le...@netcourrier.com
À : "Pete Houston" <p...@openstrike.co.uk>;
   users@httpd.apache.org
Objet : Re: Re: [users@httpd] Strange apache behaviour when lauching an 
externalbinary called by a perl script
Date : 21/11/2013 16:53:10 CET

Nice suggestion. But unfortunately both environments are the same (and my 
binary is compiled with static library option).

---- Message d'origine ----
De : "Pete Houston" <p...@openstrike.co.uk>
À : users@httpd.apache.org
Objet : Re: [users@httpd] Strange apache behaviour when lauching an 
externalbinary called by a perl script
Date : 21/11/2013 14:40:33 CET

Possibly a difference in environment would cause this (perhaps
LD_LIBRARY_PATH or similar?).

Compare the environment in your failing at job with the environment in
your successful shell command and determine if there are any
differences.

HTH,

Pete
-- 
Openstrike - improving business through open source
http://www.openstrike.co.uk/ or call 01722 770036 / 07092 020107

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAlKODVEACgkQdzfnYmsKt524FACgncbrG/UwTOKTXPMp5Zs26FoA
HI4AoKIpwfFsqkJHQSuOdolX0lXnCHWh
=6+wF
-----END PGP SIGNATURE-----


Reply via email to