Bug 151770 - net-mgmt/cacti-spine: spine 0.8.7g hangs up after one host poll
Summary: net-mgmt/cacti-spine: spine 0.8.7g hangs up after one host poll
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Steven Kreuzer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-27 07:20 UTC by Boris Kovalenko
Modified: 2010-11-04 22:30 UTC (History)
0 users

See Also:


Attachments
cacti-spine.shar.txt (14.62 KB, text/plain)
2010-11-01 15:38 UTC, Panagiotis Christias
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Kovalenko 2010-10-27 07:20:04 UTC
Spine hangs up after host poll (see debug output). IMHO the problem is in poller.c line 68: thread_mutex_lock(LOCK_THREAD)

[root@oms ~]# spine -H 0 -V 5]
SPINE: Using spine config file [/usr/local/etc/spine.conf]
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The path_php_server variable is /usr/local/share/cacti/script_server.php
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The path_cactilog variable is /usr/local/share/cacti/log/cacti.log
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The log_destination variable is 1 (FILE)
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The path_php variable is /usr/local/bin/php
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The availability_method variable is 2
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The ping_recovery_count variable is 3
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The ping_failure_count variable is 2
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The ping_method variable is 2
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The ping_retries variable is 1
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The ping_timeout variable is 400
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The snmp_retries variable is 3
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The log_perror variable is 1
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The log_pwarn variable is 0
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The boost_redirect variable is 0
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The log_pstats variable is 0
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The threads variable is 8
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The polling interval is 300 seconds
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The number of concurrent processes is 1
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The script timeout is 60
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The number of php script servers to run is 4
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: Host List to be polled='0', TotalPHPScripts='0'
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The PHP Script Server is Not Required
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The Maximum SNMP OID Get Size is 10
10/27/2010 12:15:49 PM - SPINE: Poller[0] Version 0.8.7g starting
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: MySQL is Thread Safe!
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: Spine is running asroot.
10/27/2010 12:15:49 PM - SPINE: Poller[0] SPINE: Initializing Net-SNMP API
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: Issues with SNMP Header Version information, assuming old version of Net-SNMP.
10/27/2010 12:15:49 PM - SPINE: Poller[0] SPINE: Initializing PHP Script Server(s)
10/27/2010 12:15:49 PM - SPINE: Poller[0] NOTE: Spine did not detect multithreaded device polling.
10/27/2010 12:15:49 PM - SPINE: Poller[0] NOTE: Spine is behaving in a 0.8.7g manner
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: Initial Value of Active Threads is 0
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: Valid Thread to be Created
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: In Poller, About to Start Polling of Host
10/27/2010 12:15:49 PM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 1
10/27/2010 12:15:49 PM - SPINE: Poller[0] Host[0] TH[1] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function

How-To-Repeat: Install and run cacti-spine 0.8.7g on FreeBSD 7.2R-amd64 jailed enviroment
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2010-10-28 23:51:28 UTC
Responsible Changed
From-To: freebsd-ports-bugs->skreuzer

Fix synopsis and assign.
Comment 2 Panagiotis Christias 2010-11-01 15:38:52 UTC
Patch is available as "Unified Patch 2010/08/31" at:

   http://www.cacti.net/spine_download_patches.php

Tested and prepared new version for net-mgmt/cacti-spine (see attached 
shar file).

-- 
Panagiotis J. Christias    Network Management Center
p.christias@noc.ntua.gr    National Technical Univ. of Athens, GREECE
Comment 3 Olli Hauer freebsd_committer 2010-11-01 23:13:18 UTC
I also run into the same issue on my prod machine
and the Vendor patch solved this.

patch change.log:
======================
Patched 0.8.7g
-bug#0001669: Problems with getting data from script using SPINE on Windows Server 2003 x32
-bug#0001829: Wrong string numerical value got from Spine SNMP poller
-bug: Net-snmp API issues cause spine crashes with some SNMP agents
-bug: Host list not properly initialized
-bug: Mutex locking issues cause deadlocks in Windows
-bug: Escape windows type back slashes in scripts


The following diff is a little smaller and clearer.

--- patch_cacti-spine.txt begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/net-mgmt/cacti-spine/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- Makefile	12 Oct 2010 23:08:33 -0000	1.24
+++ Makefile	1 Nov 2010 22:00:25 -0000
@@ -7,10 +7,16 @@
 
 PORTNAME=	spine
 PORTVERSION=	0.8.7.g
+PORTREVISION=	1
 CATEGORIES=	net-mgmt
 MASTER_SITES=	http://www.cacti.net/downloads/${PORTNAME}/
 DISTNAME=	cacti-${PORTNAME}-0.8.7g
 
+# Vendor's patches
+PATCH_SITES=	http://www.cacti.net/downloads/spine/patches/0.8.7g/
+PATCHFILES= 	unified_issues.patch
+PATCH_DIST_STRIP=-p1
+
 MAINTAINER=	skreuzer@FreeBSD.org
 COMMENT=	A multithreaded poller for Cacti written in C
 
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/net-mgmt/cacti-spine/distinfo,v
retrieving revision 1.9
diff -u -r1.9 distinfo
--- distinfo	11 Oct 2010 16:17:53 -0000	1.9
+++ distinfo	1 Nov 2010 22:00:25 -0000
@@ -1,3 +1,4 @@
-MD5 (cacti-spine-0.8.7g.tar.gz) = 22c2b1986c880b9c587876c18d5c3f9f
 SHA256 (cacti-spine-0.8.7g.tar.gz) = 2735fbc1fc38d31651009d0a8d6ea121b29403d6020b13ba245ab4f3e0f6d561
 SIZE (cacti-spine-0.8.7g.tar.gz) = 592801
+SHA256 (unified_issues.patch) = 5bfc4fe3eeedbab4d32620b6e141b0b6cfe674e76a938c19e13fb1b70e80fa0b
+SIZE (unified_issues.patch) = 11583
--- patch_cacti-spine.txt ends here ---
Comment 4 dfilter service freebsd_committer 2010-11-04 22:25:12 UTC
skreuzer    2010-11-04 22:25:05 UTC

  FreeBSD ports repository

  Modified files:
    net-mgmt/cacti-spine Makefile distinfo 
  Log:
  Apply "Unified Patch 2010/08/31" from vendor
  
  PR:             ports/151770
  Submitted by:   Olli Hauer <ohauer@FreeBSD.org>
  
  Revision  Changes    Path
  1.25      +6 -0      ports/net-mgmt/cacti-spine/Makefile
  1.10      +2 -1      ports/net-mgmt/cacti-spine/distinfo
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Steven Kreuzer freebsd_committer 2010-11-04 22:25:24 UTC
State Changed
From-To: open->closed

Committed. Thanks!