Bug 463858 - cacti segfault
cacti segfault
Product: Fedora
Classification: Fedora
Component: cacti (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike McGrath
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-09-24 18:57 EDT by Orion Poplawski
Modified: 2009-07-14 10:30 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-07-14 10:30:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2008-09-24 18:57:51 EDT
Description of problem:

I'm trying to install cacti on my F9 box.  When I access the main cacti page apache segfaults.

(gdb) bt
#0  execute (op_array=0xb9cee26c) at /usr/include/bits/string3.h:85
#1  0x00ba38b6 in zend_do_fcall_common_helper_SPEC (execute_data=0xbee47bf8)
    at /usr/src/debug/php-5.2.6/Zend/zend_vm_execute.h:234
#2  0x00b8f48b in execute (op_array=0xb9cee1d8)
    at /usr/src/debug/php-5.2.6/Zend/zend_vm_execute.h:92
#3  0x00ba38b6 in zend_do_fcall_common_helper_SPEC (execute_data=0xbee480d8)
#22741 0x00ba38b6 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfa40518)
    at /usr/src/debug/php-5.2.6/Zend/zend_vm_execute.h:234
#22742 0x00b8f48b in execute (op_array=0xb9b18790)
    at /usr/src/debug/php-5.2.6/Zend/zend_vm_execute.h:92
#22743 0x00ba38b6 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfa418c8)
    at /usr/src/debug/php-5.2.6/Zend/zend_vm_execute.h:234
#22744 0x00b8f48b in execute (op_array=0xb9cf38e8)
    at /usr/src/debug/php-5.2.6/Zend/zend_vm_execute.h:92
#22745 0x00b94b58 in ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER (execute_data=0xbfa42b08)
    at /usr/src/debug/php-5.2.6/Zend/zend_vm_execute.h:4612
#22746 0x00b8f48b in execute (op_array=0xb93fd9e4)
    at /usr/src/debug/php-5.2.6/Zend/zend_vm_execute.h:92
#22747 0x00b926b8 in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER (execute_data=0xbfa431b8)
    at /usr/src/debug/php-5.2.6/Zend/zend_vm_execute.h:2037
#22748 0x00b8f48b in execute (op_array=0xb93fd1bc)
    at /usr/src/debug/php-5.2.6/Zend/zend_vm_execute.h:92
#22749 0x00b926b8 in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER (execute_data=0xbfa43378)
    at /usr/src/debug/php-5.2.6/Zend/zend_vm_execute.h:2037
#22750 0x00b8f48b in execute (op_array=0xb93fcad4)
    at /usr/src/debug/php-5.2.6/Zend/zend_vm_execute.h:92
#22751 0x00b6a170 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /usr/src/debug/php-5.2.6/Zend/zend.c:1134
#22752 0x00b20d1a in php_execute_script (primary_file=0xbfa45638)
    at /usr/src/debug/php-5.2.6/main/main.c:2005
#22753 0x00be1bac in php_handler (r=0xb98a0c58)
    at /usr/src/debug/php-5.2.6/sapi/apache2handler/sapi_apache2.c:629
#22754 0xb801fa4d in ap_run_handler (r=0xb98a0c58)
    at /usr/src/debug/httpd-2.2.9/server/config.c:158
#22755 0xb802359f in ap_invoke_handler (r=0xb98a0c58)
    at /usr/src/debug/httpd-2.2.9/server/config.c:372
#22756 0xb802fd41 in ap_process_request (r=0xb98a0c58)
    at /usr/src/debug/httpd-2.2.9/modules/http/http_request.c:258
#22757 0xb802c958 in ap_process_http_connection (c=0xb9878578)
    at /usr/src/debug/httpd-2.2.9/modules/http/http_core.c:190
#22758 0xb8027d6d in ap_run_process_connection (c=0xb9878578)
    at /usr/src/debug/httpd-2.2.9/server/connection.c:43
#22759 0xb8035191 in child_main (child_num_arg=<value optimized out>)
    at /usr/src/debug/httpd-2.2.9/server/mpm/prefork/prefork.c:650
#22760 0xb80354a3 in make_child (s=<value optimized out>, slot=3)
    at /usr/src/debug/httpd-2.2.9/server/mpm/prefork/prefork.c:746
#22761 0xb80361f1 in ap_mpm_run (_pconf=0xb91a05c0, plog=0xb91ce678, s=0xb91a24b0)
    at /usr/src/debug/httpd-2.2.9/server/mpm/prefork/prefork.c:881
#22762 0xb800a6d9 in main (argc=-1189485128, argv=0xbfa45b54)
    at /usr/src/debug/httpd-2.2.9/server/main.c:730

(gdb) list
80        if (__builtin_constant_p (__len) && __len == 0)
81          {
82            __warn_memset_zero_len ();
83            return __dest;
84          }
85        return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
86      }
88      #ifdef __USE_BSD
89      __extern_always_inline void

(gdb) print *op_array
$2 = {type = 2 '\002', function_name = 0xb9a2e280 "_Execute", scope = 0xb9a178c4,
  fn_flags = 65792, prototype = 0x0, num_args = 2, required_num_args = 1,
  arg_info = 0xb9a2e458, pass_rest_by_reference = 0 '\0', return_reference = 1 '\001',
  refcount = 0xb9a2e1a0, opcodes = 0xb9b925d8, last = 129, size = 129,
  vars = 0xb9a2e370, last_var = 8, size_var = 16, T = 68, brk_cont_array = 0x0,
  last_brk_cont = 0, current_brk_cont = 4294967295, try_catch_array = 0x0,
  last_try_catch = 0, static_variables = 0x0, start_op = 0x0, backpatch_count = 0,
  done_pass_two = 1 '\001', uses_this = 1 '\001',
  filename = 0xb9a06d10 "/usr/share/cacti/lib/adodb/adodb.inc.php", line_start = 840,
  line_end = 888, doc_comment = 0x0, doc_comment_len = 0, reserved = {0x0, 0x0, 0x0,

Version-Release number of selected component (if applicable):

How reproducible:
Comment 1 Joe Orton 2008-09-25 03:19:17 EDT
#3  0x00ba38b6 in zend_do_fcall_common_helper_SPEC (execute_data=0xbee480d8)
#22741 0x00ba38b6 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfa40518)
    at /usr/src/debug/php-5.2.6/Zend/zend_vm_execute.h:234

this is a recursive function call in the PHP script, which will kill the interpreter.
Comment 2 Orion Poplawski 2008-09-25 12:18:17 EDT
Okay, tracked this down to db_fetch_row in database.php:

function db_fetch_row($sql, $log = TRUE) {
        global $cnn_id;

        $sql = str_replace("\n", "", str_replace("\r", "", str_replace("\t", " ", $sql)));

        if (($log) && (read_config_option("log_verbosity") == POLLER_VERBOSITY_DEBUG)) {
                cacti_log("DEBUG: SQL Row: \"" . $sql . "\"\n", FALSE);

        $query = $cnn_id->Execute($sql);

        if (($query) || ($cnn_id->ErrorNo() == 1032)) {
                if (!$query->EOF) {
                        $fields = $query->fields;


        }else if (($log) || (read_config_option("log_verbosity") == POLLER_VERBOSITY_DEBUG)) {
                cacti_log("ERROR: SQL Row Failed!, Error:'" . $cnn_id->ErrorNo() . "', SQL:\"" . str_replace("\n", "", str_replace("\r", "", str_replace("\t", " ", $sql))) . "\"", FALSE);

If the query fails (due to database errors) we enter a recursive loop because we call read_config_option which calls db_fetch_row, which fails and so on.

This only happens when there is a problem with the database (as was my case).  In normal operation this doesn't occur.
Comment 3 Francois Cartegnie 2009-01-22 19:05:04 EST
seems DUP of https://bugzilla.redhat.com/show_bug.cgi?id=480500
Comment 4 Bug Zapper 2009-06-09 22:48:00 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 5 Bug Zapper 2009-07-14 10:30:29 EDT
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.