You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by le...@netcourrier.com on 2013/11/21 16:53:10 UTC
Re: Re: [users@httpd] Strange apache behaviour when lauching an
externalbinary called by a perl script
Nice suggestion. But unfortunately both environments are the same (and my binary is compiled with static library option).
---- Message d'origine ----
De : "Pete Houston" <ph...@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-----
Re: [users@httpd] Strange apache behaviour when lauching an
externalbinary called by a perl script
Posted by le...@netcourrier.com.
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 : ledoc@netcourrier.com
À : "Pete Houston" <ph...@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" <ph...@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-----