Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8B80310005 for ; Fri, 22 Nov 2013 09:06:32 +0000 (UTC) Received: (qmail 78936 invoked by uid 500); 22 Nov 2013 09:06:29 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 78698 invoked by uid 500); 22 Nov 2013 09:06:23 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 78690 invoked by uid 99); 22 Nov 2013 09:06:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Nov 2013 09:06:22 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ledoc@netcourrier.com designates 213.182.54.9 as permitted sender) Received: from [213.182.54.9] (HELO relay-4.mailobj.net) (213.182.54.9) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Nov 2013 09:06:16 +0000 Received: from w-4 (w-4.in.mailobj.net [192.168.90.245]) by relay-4.mailobj.net (Postfix) with SMTP id C7CA57E870; Fri, 22 Nov 2013 09:51:30 +0100 (CET) Received: from [193.55.43.238] by w-4.netcourrier.com with http webmail; Fri, 22 Nov 2013 10:05:55 +0100 (CET) X-EA-Auth: /8S9/obFQWVY27ZXWRgbce0JiyHqDJAB0ZpNGVps3ziZbkzwx3NIfSKmb2R FXmgqPjjMnpP8OYFTNQUdDZzLAw== From: ledoc@netcourrier.com To: ph1@openstrike.co.uk, users@httpd.apache.org Date: Fri, 22 Nov 2013 10:05:55 +0100 (CET) X-Priority: 3 MIME-Version: 1.0 X-Mailer: COMS/EA13.10/r20131028 Message-ID: In-Reply-To: Content-Type: multipart/alternative; boundary="----=_NextPart_001_528f1e73_3a52_4ddf4054" X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Strange apache behaviour when lauching an externalbinary called by a perl script ------=_NextPart_001_528f1e73_3a52_4ddf4054 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable This issue is now resolved: my fortran binary handles very large arrays and= complex functions requiring an unlimited stack size.=20 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 wit= h '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 sc= ript by using e.g. setrlimit(RLIMIT_STACK, $softlimit, $hardlimit); Thus, t= hese new stack size limits are now directly passed from my perl script to m= y binary.=20 Thanks for your time and providing me with insights to fix this issue! Che= ers.=C2=A0=20 ---- Message d'origine ---- De : ledoc@netcourrier.com =C0 : "Pete Houston" ; =C2=A0=C2=A0=C2=A0users@httpd.apache.org Objet : Re: Re: [users@httpd] Strange apache behaviour when lauching an ex= ternalbinary 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" =C0 : users@httpd.apache.org Objet : Re: [users@httpd] Strange apache behaviour when lauching an extern= albinary 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 --=20 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 =3D6+wF -----END PGP SIGNATURE----- ------=_NextPart_001_528f1e73_3a52_4ddf4054 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable This issue is now resolved: my fortran binary handles very large arr= ays and complex functions requiring an unlimited stack size.

Despit= e that the stack size limit was defined on a system-wide basis (in /etc/sec= urity/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 ti= me it was called). At the contrary, when I manually restarted apache at the= shell prompt, the stacksize limit was correctly passed (.bashrc with 'ulim= it -S -s unlimited').

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

Thanks for your time and prov= iding me with insights to fix this issue! Cheers. 


---- Me= ssage d'origine ----
De : ledoc@netcourrier.com
=C0 : "Pete Houston" <ph1@openstrike.co.uk>;
   users@httpd.apache.org
Objet : Re: Re: [users@httpd] Strange apache behaviour when lauching an ex= ternalbinary 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'origi= ne ----
De : "Pete Houston" <ph1@openstrike.co.uk>
=C0 : users@httpd.apache.org
Objet : Re: [users@httpd] Strange apache behaviour when lauching an extern= albinary 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
=3D6+wF
-----END PGP SIGNATURE-----

------=_NextPart_001_528f1e73_3a52_4ddf4054--