Brand new install. Segmentation Fault

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

Moderators: Developers, Moderators

Post Reply
ptera
Posts: 14
Joined: Mon Jul 24, 2006 2:39 pm

Brand new install. Segmentation Fault

Post by ptera »

Brand new install.
When I tried to access the cacti files for the first time with the browser I got
[Mon Jul 24 12:35:29 2006] [notice] child pid 1781 exit signal Segmentation fault (11)

I tried running poller.php to see if it would tell me same thing it told you but all I got was

Segmentation Fault

I am running Fedora Core 5
with all the latest updates to all packages used to run cacati
cacti-0.8.6h-6.fc5
mysql-5.0.22-1.FC5.1
php-5.1.4-1
rrdtool-1.2.15-1.fc5
httpd-2.2.2-1.0

Any help in what I could be doing wrong here?
Are there other logs I can loook at for help?
ptera
Posts: 14
Joined: Mon Jul 24, 2006 2:39 pm

Post by ptera »

ran php -a /usr/share/cacti/poller.php

> php -a /usr/share/cacti/poller.php
Interactive mode enabled

PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 622592 bytes) in /usr/share/cacti/lib/adodb/adodb.inc.php on line 385

Here is the code in that area

function ServerInfo()
{
return array('description' => '', 'version' => '');
}

function IsConnected()
{
return !empty($this->_connectionID);
}

function _findvers($str)
{
if (preg_match('/([0-9]+\.([0-9\.])+)/',$str, $arr)) return $arr[1];
else return '';
}

/**
* All error messages go through this bottleneck function.
* You can define your own handler by defining the function name in ADODB_OUTP.
*/
function outp($msg,$newline=true)
{
global $HTTP_SERVER_VARS,$ADODB_FLUSH,$ADODB_OUTP;

if (defined('ADODB_OUTP')) {
$fn = ADODB_OUTP;
$fn($msg,$newline);
return;
} else if (isset($ADODB_OUTP)) {
$fn = $ADODB_OUTP;
$fn($msg,$newline);
return;
}

if ($newline) $msg .= "<br>\n";

if (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT']) || !$newline) echo $msg;
else echo strip_tags($msg);


if (!empty($ADODB_FLUSH) && ob_get_length() !== false) flush(); // do not flush if output buffering enabled - useless - thx to Jesse Mullan

}
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

ptera wrote:PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 622592 bytes) in /usr/share/cacti/lib/adodb/adodb.inc.php on line 385
There is your answer...

Increase your max memory from 8M to 64M.

How many data sources do you have?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
ptera
Posts: 14
Joined: Mon Jul 24, 2006 2:39 pm

Post by ptera »

PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 622592 bytes) in /usr/share/cacti/lib/adodb/adodb.inc.php on line 385

All that did was change the first bytes size for allowed memory. Please notice it is trying to allocate 622592 bytes which is way less then 67108864 bytes
ptera
Posts: 14
Joined: Mon Jul 24, 2006 2:39 pm

Post by ptera »

And this is a new install. I have not been able to start cacti at all.
ptera
Posts: 14
Joined: Mon Jul 24, 2006 2:39 pm

Post by ptera »

seems to be function that starts at line 385

function Time()
{
$rs =& $this->_Execute("select $this->sysTimeStamp");
if ($rs && !$rs->EOF) return $this->UnixTimeStamp(reset($rs->fields));

return false;
}
User avatar
anakemak
Posts: 10
Joined: Thu Jul 13, 2006 2:33 pm
Location: Malaysia
Contact:

Post by anakemak »

rony wrote:
ptera wrote:PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 622592 bytes) in /usr/share/cacti/lib/adodb/adodb.inc.php on line 385
There is your answer...

Increase your max memory from 8M to 64M.

How many data sources do you have?
do you mean should add more RAM or is there any other thing for this solution
.:: Anak Emak ::.
User avatar
NHDave
Cacti User
Posts: 61
Joined: Sun Mar 20, 2005 9:14 am
Contact:

Post by NHDave »

anakemak wrote:
rony wrote:
ptera wrote:PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 622592 bytes) in /usr/share/cacti/lib/adodb/adodb.inc.php on line 385
There is your answer...

Increase your max memory from 8M to 64M.

How many data sources do you have?
do you mean should add more RAM or is there any other thing for this solution
Increase your max memory setting in php.ini and restart apache.
ptera
Posts: 14
Joined: Mon Jul 24, 2006 2:39 pm

Increase your max memory setting in php.ini and restart apac

Post by ptera »

Has no effect
tdt
Posts: 1
Joined: Thu Apr 24, 2008 10:49 am

same problem / Allowed memory exhausted

Post by tdt »

Same problem with a fresh debian etch + aptitude -y install less bzip2 apache2 mysql-server-5.0 php5 php5-cli php5-json php5-ldap php5-snmp php5-imap php5-mysql php5-mcrypt php5-imagick php5-json php5-xsl rrdtool libphp-adodb.

I've just installed cacti 0.8.7b and apply the last patchs (upgrade_from_086k_fix, snmp_auth_none_notice, reset_each_patch)

with the default php.ini 'memory_limit = 16M' I have this error

Code: Select all

http:/var/www/cacti# php -a index.php
Interactive mode enabled
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 983040 bytes) in /var/www/cacti/lib/adodb/adodb.inc.php on line 404

http:/var/www/cacti# php -a poller.php
Interactive mode enabled
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 983040 bytes) in /var/www/cacti/lib/adodb/adodb.inc.php on line 428

So I increase 'memory_limit' to 128M and got this errors :

Code: Select all

http:/var/www/cacti# php -a index.php
Interactive mode enabled
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 983040 bytes) in /var/www/cacti/lib/adodb/adodb.inc.php on line 2548

http:/var/www/cacti# php -a poller.php
Interactive mode enabled
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 983040 bytes) in /var/www/cacti/lib/adodb/adodb.inc.php on line 2633
And finaly with 256M :

Code: Select all

http:/var/www/cacti# php -a poller.php
Interactive mode enabled
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 983040 bytes) in /var/www/cacti/lib/functions.php on line 1326

http:/var/www/cacti# php -a index.php
Interactive mode enabled
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 983040 bytes) in /var/www/cacti/lib/functions.php on line 1284
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Is your database initialized? Have you imported it? Typically, segaults happend when you have not initialized the database.

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests