Hi all,
I’m trying to use ruby on AIX 5.1 to generate Nagios configuration files.
It’s all been working fine until today, when I started having very, very
odd segfaults.
The thing that makes them odd is that they appear and disappear depending
on lines I add or remove in my scripts, and (here’s the weird part) those
lines can be comments or “puts” statements.
I tried adding output statements to track down the segfaults, and they
went away. So, I tried commenting the statements out, and the faults were
still gone. Okay, so I delete them, and now the faults are back.
Depending on where my print statements are and where the comments are and
other completely random things, the segfaults also appear at different
lines in the script.
This is in a 1200 line script, using an ldap.so compbiled against OpenLDAP
2.something and digest/md5. Ooh, except I just discovered that I’m not
actually using digest/md5, but removing it causes another segfault.
Yes, I’m relatively convinced that this is something I’m doing, but, well,
you’ve seen where my debugging has gotten me: very confused.
The ruby is one I compiled myself using gcc 3.3.1 on AIX 5.1. The only
configure flag I used was -qmaxmem=32768, but I did run the following
after configuring:
find . -name Makefile -exec perl -pi -e ‘s/ -brtl$//’ {} ;
perl -pi -e ‘s/^.+RSTRING.+$//’ ext/syck/emitter.c
These were necessary to compile on AIx. The -brtl fix is because
apparently -brtl must appear at the beginning of a DLDFLAGS declaration on
AIX. I know I should have submitted this bug, but I (obviously) have not.
How should I?
The emitter change was because emitter refused to compile based on a
problem with that line. The strange thing? It was commented with ‘//’.
It mentioned (in the comment) a variable not used anywhere else, so gcc
(stupidly?) complained about the missing declaration. I removed the
comment, and all went ok.
Let me guess: My build environment is very broken, so there’s not much
help for me, right?
Well, if anyone has any pointers on how I might track this problem down,
I’d appreciate it. I’m willing to just upgrade, if necessary, but I would
prefer to actually understand what is happening.
I am also willing to share the code, but it’s long enough that I didn’t
want to just spam the list with it.
Thanks,
Luke
···
–
I don’t want the world, I just want your half.