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

Naemon fails with segfault error 4 in livestatus.so #88

Closed
andresinostroza1 opened this issue Oct 8, 2018 · 4 comments
Closed

Naemon fails with segfault error 4 in livestatus.so #88

andresinostroza1 opened this issue Oct 8, 2018 · 4 comments

Comments

@andresinostroza1
Copy link

Hello

I have a problem with naemon when I search in the "history section" in "Previous day" button.
Naemon fails with segmentation fault.


Here's messages logs.
[845180.570732] naemon[56166]: segfault at 736b ip 00007ffff6876858 sp 00007ffff7ff5ac8 error 4 in livestatus.so[7ffff6854000+7e000]

These are the software versions
[root@xxxx ~]# rpm -qa | grep naemon
naemon-core-1.0.8-0.x86_64
naemon-core-dbg-1.0.8-0.x86_64
libnaemon-1.0.8-0.x86_64
naemon-thruk-1.0.8-0.noarch
naemon-livestatus-1.0.8-0.x86_64
naemon-devel-1.0.8-0.x86_64

I run naemon in debug mode. Here is the output of "bt" command of gdb

#0 0x00007ffff7094faf in __strlen_sse42 () from /lib64/libc.so.6
#1 0x00007ffff6879f59 in Query::outputString(char const*) () from /usr/lib64/naemon/naemon-livestatus/livestatus.so
#2 0x00007ffff6879c33 in Query::printRow(void*) () from /usr/lib64/naemon/naemon-livestatus/livestatus.so
#3 0x00007ffff687d602 in Query::finish() () from /usr/lib64/naemon/naemon-livestatus/livestatus.so
#4 0x00007ffff6880407 in Store::answerGetRequest(InputBuffer*, OutputBuffer*, char const*) ()
from /usr/lib64/naemon/naemon-livestatus/livestatus.so
#5 0x00007ffff688072b in Store::answerRequest(InputBuffer*, OutputBuffer*) () from /usr/lib64/naemon/naemon-livestatus/livestatus.so
#6 0x00007ffff687fab9 in store_answer_request () from /usr/lib64/naemon/naemon-livestatus/livestatus.so
#7 0x00007ffff68b7e93 in client_thread () from /usr/lib64/naemon/naemon-livestatus/livestatus.so
#8 0x00007ffff6ae1e25 in start_thread () from /lib64/libpthread.so.0
#9 0x00007ffff705034d in clone () from /lib64/libc.so.6

[root@xxxx archives]# ls -l /var/log/naemon/archives/* | tail -7
-rw-rw-r-- 1 naemon naemon 40539681 Oct 3 03:14 /var/log/naemon/archives/naemon.log-20181003
-rw-rw-r-- 1 naemon naemon 41457190 Oct 4 03:27 /var/log/naemon/archives/naemon.log-20181004
-rw-rw-r-- 1 naemon naemon 44117390 Oct 5 03:07 /var/log/naemon/archives/naemon.log-20181005
-rw-rw-r-- 1 naemon naemon 17390780 Oct 5 18:01 /var/log/naemon/archives/naemon.log-20181006

Can you help me?
thank you.
Andrés Inostroza

@sni
Copy link
Contributor

sni commented Oct 8, 2018

so the error only occurs on certain pages? Can you nail it down to a smaller time range?

@dirtyren
Copy link

dirtyren commented Oct 8, 2018

I had the same problem that We fixed with this patch, remember @sni
naemon/naemon-livestatus#29
In our case it happened while querying the table logs.

@andresinostroza1
Copy link
Author

I have test this section with a lot of dates and it works.
Naemon crashes within this two dates.
2018-10-02 03:20:00
2018-10-02 03:25:00
(my DST is GMT -3)

I will try the patch of dirtyren...I will tell you if it works.

@andresinostroza1
Copy link
Author

I fixed it with the patch and it works ok!
Thank you very much :)

@sni sni closed this as completed Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants