You can't request more than 20 challenges without solving them. Your previous challenges were flushed.

Cacti Segfaulting on CentOS5

I was getting Cacti set up and was having trouble with PHP. Specifically, it appeared that enabling the Cacti cron job caused a PHP segfault. I looked in /etc/cron.d/cacti to see what was being run:

cat /etc/cron.d/cacti
#*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

Then I ran it from the command line myself:

# php -v
PHP 5.1.6 (cli) (built: Jan 13 2010 17:13:05)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

# php /usr/share/cacti/poller.php
Segmentation fault

Sure enough, an ugly error was recorded in /var/log/messages:

kernel: php[5250]: segfault at bf29ce64 ip b788cbf3 sp bf29cdc4 error 6 in libc-2.5.so[b7851000+13f000]

It turns out that this is what happens when you bork the permissions on cacti's MySQL table. After issuing a command like the following to MySQL, my segfault went away.

GRANT ALL ON cacti.* TO 'cactiusername'@'localhost' IDENTIFIED BY 'secret';

[ Submitted by John on Sun, 2010-01-24 22:33. | | ]

Cacti's fault?

Hey John,
Am I right in saying that must be a bug with Cacti not checking db returns then?

[ Submitted by Andy (not verified) on Fri, 2010-02-05 23:42. | ]

Maybe

There is a bug #0000814 that mentions segfaulting and permissions, but I'm seeing this on 0.8.7.e and the bug was supposedly fixed in an earlier version. Yes, I believe the finger points to Cacti but I have not dug in enough to see what's really going wrong.

[ Submitted by John on Mon, 2010-02-08 09:53. | ]

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question tests your humanity.