Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When polling results are null, segmentation errors may occur #150

Closed
a-vasilishin opened this issue Mar 26, 2020 · 8 comments
Closed

When polling results are null, segmentation errors may occur #150

a-vasilishin opened this issue Mar 26, 2020 · 8 comments
Labels
Milestone

Comments

@a-vasilishin
Copy link

Today I compiled newest spine https://www.cacti.net/downloads/spine/cacti-spine-1.2.10.tar.gz
tar zxvf cacti-spine-1.2.10.tar.gz
cd cacti-spine-1.2.10
./bootstrap
./configure
make
make install
cp /usr/local/spine/bin/spine /usr/sbin/spine
Now I have many entries in log:
2020/03/26 20:40:31 - SPINE: Poller[Main Poller] PID[13424] FATAL: Spine Encountered a Segmentation Fault [4, Interrupted system call] (Spine thread)

I am using
mysql Ver 15.1 Distrib 10.1.44-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux

@TheWitness
Copy link
Member

Grab the 1.2.x branch and try again. It'll be released soon.

@TheWitness
Copy link
Member

My guess is issue this is a duplicate of this one #149

@a-vasilishin
Copy link
Author

a-vasilishin commented Mar 26, 2020

I tried it. :(
-rwsr-sr-x 1 root root 429128 Mar 27 01:14 /usr/sbin/spine

2020/03/27 01:20:32 - SPINE: Poller[Main Poller] PID[9999] FATAL: Spine Encountered a Segmentation Fault [4, Interrupted system call] (Spine thread)

2020/03/27 01:25:32 - SPINE: Poller[Main Poller] PID[15310] FATAL: Spine Encountered a Segmentation Fault [4, Interrupted system call] (Spine thread)

2020/03/27 01:30:32 - SPINE: Poller[Main Poller] PID[19006] FATAL: Spine Encountered a Segmentation Fault [4, Interrupted system call] (Spine thread)

Every 5 minute, second per second

@TheWitness
Copy link
Member

Okay, please run from the command line and do a backtrace

gdb ./spine
run -V 3 -S -R
bt

Post the results of the backtrace after the segfault.

@a-vasilishin
Copy link
Author

POLLER: Active Threads is 2, Pending is 2
[Thread 0x7f2df8ff9700 (LWP 8235) exited]
Device[89] HT[1] DQ[1] RECACHE OID: .1.3.6.1.2.1.2.2.1.2.1, (assert: lo = output: U)
Device[89] HT[1] DQ[1] RECACHE OID: .1.3.6.1.2.1.2.2.1.2.2, (assert: eth0 = output: (null))

Thread 4 "spine" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f2dfbfff700 (LWP 7901)]
poll_host (host_id=host_id@entry=89, host_thread=host_thread@entry=1, last_host_thread=last_host_thread@entry=1, host_data_ids=host_data_ids@entry=0,
host_time=host_time@entry=0x7f2dfbffede0 "2020-03-27 11:59:39", host_errors=host_errors@entry=0x7f2dfbffedd8, host_time_double=host_time_double@entry=1585303179.0394671) at poller.c:836
836 if ((IS_UNDEFINED(poll_result)) || (STRIMATCH(poll_result, "No Such Instance"))) {
(gdb) bt
#0 poll_host (host_id=host_id@entry=89, host_thread=host_thread@entry=1, last_host_thread=last_host_thread@entry=1, host_data_ids=host_data_ids@entry=0,
host_time=host_time@entry=0x7f2dfbffede0 "2020-03-27 11:59:39", host_errors=host_errors@entry=0x7f2dfbffedd8, host_time_double=host_time_double@entry=1585303179.0394671) at poller.c:836
#1 0x00007f2e030c0065 in child (arg=) at poller.c:77
#2 0x00007f2e018c54a4 in start_thread (arg=0x7f2dfbfff700) at pthread_create.c:456
#3 0x00007f2e0139ed0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
(gdb)

@TheWitness TheWitness added the bug label Mar 27, 2020
TheWitness added a commit that referenced this issue Mar 27, 2020
FATAL: Spine Encountered a Segmentation Fault [4, Interrupted system call] (Spine thread)
@TheWitness
Copy link
Member

Okay, update poller.c from the 1.2.x branch, recompile and try again. This is a corner case, but a case just the same.

@a-vasilishin
Copy link
Author

Thanks! Now almost fine in log

@TheWitness TheWitness added this to the v1.2.11 milestone Mar 29, 2020
@netniV netniV changed the title FATAL: Spine Encountered a Segmentation Fault [4, Interrupted system call] (Spine thread) When polling results are null, segmentation errors may occur Apr 6, 2020
@TheWitness
Copy link
Member

There is a recent fix for unresolvable hostname. You might want to look at #155. Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants