Nagios segfault on startup when embedded perl is enabled on 7.1-stable/i386

Jarrod Sayers jarrod at netleader.com.au
Sun Apr 26 02:05:39 UTC 2009


On 25/04/2009, at 5:23 AM, Wesley Shields wrote:
> There is a PR about this issue (ports/131993) but the maintainer is
> reluctant to approve the patch listed there. The maintainer has asked
> for system information from people who report this problem in the past
> (see the PR log for details) but nothing has ever come of it. It may  
> be
> useful for you to send the same information to the maintainer who is,
> presumably, still interested in fixing this bug.

Just to clarify things, yes, I do recognise there is an issue here and  
yes, I am still working to find a resolution.  My reluctance in  
approving the patch in ports/131993 simply boils down to the fact I am  
unable to even reproduce the issue, and believe me, I have tried on  
many, many systems.

The issue seems to be the passing of the embedding variable to  
Perl_sys_init3 (aka PERL_SYS_INIT3).  The second argument to this  
function takes a char *** which init_embedded_perl() attempts to pass  
to it as a pointer to a char **, err...  This does generate a warning  
during compilation but as to why the embedded Perl functionality still  
works on my systems without faulting is beyond me.

Sebastian's patch will resolve the problem, and with some  
modifications and additional checks and warnings, I have a patch which  
now needs some testing. Grab it from the URL below, dumping it in /usr/ 
ports/net-mgmt/nagios/files.

http://www.netleader.com.au/~jarrod/FreeBSD/patch-base-utils.c

I've tested it as much as I can and don't believe it introduces a  
regression on non-faulting systems so if it solves the issue for users  
with faulting nagios binaries, then I will bundle it up and have it  
committed.

> Is the benefit to the embedded perl option worth the occasional bug
> report? Is it possible to remove this option from the port?

I believe so, systems with many Perl based probes do benefit from  
starting just one instance of the interpreter.

Jarrod.


More information about the freebsd-ports mailing list