Segfault all over the place.

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

jfalcon
Posts: 6
Joined: Mon Apr 03, 2006 11:49 am

Segfault all over the place.

Post by jfalcon »

Greetings,

I'm currently working on installing Cacti into Solaris 9. Environment is the following.
Apache 2.8.48 with APXS compiled from source.
PHP4.4.2 and 5.0.2 from source
RRD Tool (latest from source)
MySQL 4.1.18 from source
Cacti 0.8.6g and h.

Configured per documentation however I get this in the error_log for apache with no page pulled up.

[Mon Apr 03 09:45:08 2006] [notice] child pid 8417 exit signal Segmentation fault (11)

Happens every time I go to access/refresh tha page.

Ideas?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Segfault all over the place.

Post by Howie »

jfalcon wrote:[Mon Apr 03 09:45:08 2006] [notice] child pid 8417 exit signal Segmentation fault (11)

Happens every time I go to access/refresh tha page.

Ideas?
I had this type of problem on a fresh install with Mac OS X. It turned out to be the PHP memory_limit setting in php.ini. Try changing it from 8M to something like 32M. I think some platforms are worse than others for memory efficiency, because our live Redhat system has never had this trouble, nor does my test FreeBSD box.

It wouldn't have taken a couple of days to figure out if PHP actually logged an error before dying. :roll:
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
jfalcon
Posts: 6
Joined: Mon Apr 03, 2006 11:49 am

Post by jfalcon »

Still no love Dr. Jones...
---

[Mon Apr 03 10:09:38 2006] [notice] Apache/2.0.55 (Unix) DAV/2 PHP/4.4.2 PHP/5.0.2 configured -- resuming normal operations
[Mon Apr 03 10:09:50 2006] [notice] child pid 12856 exit signal Segmentation fault (11)
[Mon Apr 03 10:09:50 2006] [notice] child pid 12853 exit signal Segmentation fault (11)
[Mon Apr 03 10:10:03 2006] [notice] child pid 12857 exit signal Segmentation fault (11)
[Mon Apr 03 10:10:03 2006] [notice] child pid 12855 exit signal Segmentation fault (11)

---
Only two refreshes so now it's dying twice in one action. :)
chris.y2k.r1
Posts: 31
Joined: Tue Mar 07, 2006 11:39 pm

Post by chris.y2k.r1 »

I had that problem when the path for the php binary file was wrong in the config.php file. Make sure that config.php is setup properly - including the mysql cacti db name, host name (localhost) login and password. Also try executing: php from the command line and see what happens - report back after you try that. Just type php and copy the results here.
jfalcon
Posts: 6
Joined: Mon Apr 03, 2006 11:49 am

Post by jfalcon »

Heh... alright here's the story so far.

I setup a second sandbox running Solaris 9/Sparc. I then went through and installed everything to get cacti running normal. Then I tried to copy my old configuration from my running cacti server which runs RHEL and MySQL 4.1.12.

Doesn't like the 'latin_1' locale. So I tried editing the .sql file by hand and injecting it... doesn't import everything...

So I looked at what version of MySQL i'm running in Solaris (4.0.21). I say ok, well let's go get the latest 4.1 (4.1.18) from mysql and install that package. Download it, install it, get it running, import the old configuration, restart apache then I get the Sigfault. I scratch my head and say hmm.

Tried it with 5.0... same deal. Maybe something is funny with how MySql AB creates packages, so I try to compile from source and get a bunch of memory issues when it hits the big linking operation in the make/compile.

Yet 4.0.21 works fine from sunfreeware...

stumped...
frivas
Posts: 18
Joined: Thu May 12, 2005 4:11 pm

Post by frivas »

I'm getting the same errors. I'm using a fresh installed Fedora Core 5, and cacti downloaded from freshrpms (using YUM).
I see that httpd goes segfault when I tried to open the cacti page. Running httpd under GDB, I get this:


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208555856 (LWP 1936)]
0x002fd105 in vfprintf () from /lib/libc.so.6
(gdb)
(gdb)
(gdb)
(gdb)
(gdb) bt
#0 0x002fd105 in vfprintf () from /lib/libc.so.6
#1 0x0039e289 in __vsprintf_chk () from /lib/libc.so.6
#2 0x0039e1dc in __sprintf_chk () from /lib/libc.so.6
#3 0x011a5462 in _convert_to_string () from /etc/httpd/modules/libphp5.so
#4 0x011cfc7b in execute () from /etc/httpd/modules/libphp5.so
#5 0x011c9ed8 in execute () from /etc/httpd/modules/libphp5.so
#6 0x011d8448 in execute () from /etc/httpd/modules/libphp5.so
#7 0x011c9ed8 in execute () from /etc/httpd/modules/libphp5.so
#8 0x011d8448 in execute () from /etc/httpd/modules/libphp5.so
#9 0x011c9ed8 in execute () from /etc/httpd/modules/libphp5.so
#10 0x011d8448 in execute () from /etc/httpd/modules/libphp5.so
#11 0x011c9ed8 in execute () from /etc/httpd/modules/libphp5.so
#12 0x011d8448 in execute () from /etc/httpd/modules/libphp5.so
<repeat until next line>
#20135 0x011c9ed8 in execute () from /etc/httpd/modules/libphp5.so
#20136 0x011cd4a2 in execute () from /etc/httpd/modules/libphp5.so
#20137 0x011c9ed8 in execute () from /etc/httpd/modules/libphp5.so
#20138 0x011ab6d0 in zend_execute_scripts () from /etc/httpd/modules/libphp5.so
#20139 0x0116c388 in php_execute_script () from /etc/httpd/modules/libphp5.so
#20140 0x0122e140 in php_ap2_register_hook () from /etc/httpd/modules/libphp5.so
#20141 0x008b2fbd in ap_run_handler () from /usr/sbin/httpd
#20142 0x008b6958 in ap_invoke_handler () from /usr/sbin/httpd
#20143 0x008c2811 in ap_process_request () from /usr/sbin/httpd
#20144 0x008bf62f in ap_register_input_filter () from /usr/sbin/httpd
#20145 0x008bae5d in ap_run_process_connection () from /usr/sbin/httpd
#20146 0x008baf5c in ap_process_connection () from /usr/sbin/httpd
#20147 0x008c6ae2 in ap_graceful_stop_signalled () from /usr/sbin/httpd
#20148 0x008c6d54 in ap_graceful_stop_signalled () from /usr/sbin/httpd
#20149 0x008c7c69 in ap_mpm_run () from /usr/sbin/httpd
#20150 0x0089e917 in main () from /usr/sbin/httpd

maybe some problems with php5??

regards,

Francisco Rivas C.
tomasperez
Posts: 37
Joined: Tue Apr 11, 2006 11:10 am

Post by tomasperez »

Do you get this error when you start apache? If so, comment out the load module line for php, see if it still seg faults. If so, then you know its an issue with php. I had this very issue, uncommented recode.so out of extensions.ini for php, uncommented out load module line for php in httpd.conf, and everything was happy again. This was on a FreeBSD 6 server with apache 2 and php5 .
frivas
Posts: 18
Joined: Thu May 12, 2005 4:11 pm

Post by frivas »

but if you comment php module in apache, cacti won't work... so it's not a solution :)

there must be something in cacti that's triggering this segfault. I did a little .php test file to check if php is working on the server, and it worked. phpinfo() worked too...
right now, I'm installing another server with fedora core 5, but I'm going to compile php4 and httpd (and mysql too), so I can see if there is a difference. Another thing: I'm using a SMP kernel (I have 4 Xeons 2.2 MP with 4GB RAM on both servers), so I'm gonna try the UP kernel to see if it makes a difference..
tomasperez
Posts: 37
Joined: Tue Apr 11, 2006 11:10 am

Post by tomasperez »

I did not mean it would be a solution, it would be a starting point on troubleshooting the problem.
frivas
Posts: 18
Joined: Thu May 12, 2005 4:11 pm

Post by frivas »

ok, I've setup another identical server, but now I'm using:


httpd-2.0.55.tar.gz
php-4.4.2.tar.gz
cacti-0.8.6h.tar.gz
mysql-standard-4.1.18-pc-linux-gnu-i686.tar.gz

now at least cacti is installed, and right now I'm going to add some devices to check if all it's working properly. I still have the other server with the non-working cacti, so I'm ready to do tests there to find what's going on....

Tomas, sorry, httpd doesn't segfault when is started. It segfault when I tried to enter the URL where I installed cacti.... but everything else is working (for example, if I put another page on the webserver, it works without problems).

regards,

Francisco Rivas C.
frivas
Posts: 18
Joined: Thu May 12, 2005 4:11 pm

Post by frivas »

anyone found a solution for this???
the RPM for Fedora Core 5 and PHP5 doesn't work at all.....
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What is the version of PHP, what is the version of HTTPD?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
frivas
Posts: 18
Joined: Thu May 12, 2005 4:11 pm

Post by frivas »

the version of the RPM's are:
httpd-2.2.0-5.1.2
php-mysql-5.1.4-1
php-pear-1.4.9-1
php-pdo-5.1.4-1
php-5.1.4-1
php-snmp-5.1.4-1
net-snmp-libs-5.3-4.2
net-snmp-5.3-4.2
php-snmp-5.1.4-1


this is a fresh installed Fedora Core 5 system, with the Livna repository added. But the packages were downloaded automatically via YUM from the Extras repository.
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Any chance of reverting to Apache 2.0.58? If you can do this, please do so and see if the problems persist.

Thanks,

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
discontent
Posts: 1
Joined: Fri May 26, 2006 2:35 am

Post by discontent »

I have been experiencing this issue over the past couple of days, and after doing a bit of debug work, it looks like it is due to PHP seg faulting when it calls preg_match_all.

This issue has been fixed is PHP 4.4.0 (and PHP 5.0.3 or something - can't find the post now) - but upgrade your PHP and it should fix your issues.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests