naemon / naemon-core

Networks, Applications and Event Monitor
http://www.naemon.io/
GNU General Public License v2.0
153 stars 63 forks source link

Naemon SIGSEGV if plugin output is only a new line #121

Closed nook24 closed 8 years ago

nook24 commented 8 years ago

Hi, today i had a plugin that returned just a new line and this killed my naemon.

I created a new Naemon 1.0.3 box on Ubuntu 14.04 to reproduce this error, thats my result:

Successfully launched command file worker with pid 14337

Program received signal SIGSEGV, Segmentation fault.
__strchr_sse2 () at ../sysdeps/x86_64/multiarch/../strchr.S:32
32  ../sysdeps/x86_64/multiarch/../strchr.S: No such file or directory.
(gdb)

My Naemon configuration only contains 1 host with 1 service. No broker moduls like livestatus or mod_gearman, just plain Naemon.

This is my test plugin, that creates a sigsegv:

<?php
echo "\n";

It looks like that an empty output is ok for naemon, so if you use

<?php
echo "";

nothing will happen...

catharsis commented 8 years ago

Until this is resolved; This is fixed by this op5 commit: http://git.op5.org/gitweb?p=monitor/naemon.git;a=commit;h=1a16d0ed406a2f02bdee195792ed2ff8073ea6a2

We're aware we're lagging behind with upstreaming a lot of our (op5's) code, but I'll do my best to make sure it gets here sooner rather than later.

catharsis commented 8 years ago

Fixed by 1a16d0ed406a2f02bdee195792ed2ff8073ea6a2.