Monit 5.22 segfault
trace:
Program received signal SIGSEGV, Segmentation fault.
0x000000000042b9a9 in _checkProcessResources ()
(gdb) thr apply all bt
Thread 2 (Thread 0x7ffff6228700 (LWP 2811)):
#0 0x00007ffff6b5e84d in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x000000000043c110 in Engine_start ()
#2 0x000000000041c7e2 in thread_wrapper ()
#3 0x00007ffff74ac184 in start_thread (arg=0x7ffff6228700) at pthread_create.c:312
#4 0x00007ffff6b6bbed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Thread 1 (Thread 0x7ffff7fec740 (LWP 2803)):
#0 0x000000000042b9a9 in _checkProcessResources ()
#1 0x000000000042dbc2 in check_system ()
#2 0x000000000042d65a in validate ()
#3 0x0000000000413548 in do_action ()
#4 0x00000000004142c1 in main ()
Comments (16)
-
Account Deleted -
repo owner - edited description
-
assigned issue to
-
repo owner Please can you attach the coredump?
-
Account Deleted If you'll tell me how :)
-
repo owner You can attach files via "More" (menu on right side) -> "Attach files"
-
Account Deleted No I mean how to I get the coredump in the first place. I followed your comment here: https://bitbucket.org/tildeslash/monit/issues/331/monit-517-segfaults but I can't find how to get it
-
repo owner you need to enable coredumps first:
ulimit -c unlimited
then start monit in the same console ... when monit will crash, the coredump will be saved either to current directory or global coredump directory such as /var/crash/core (depends on your sysctl kernel.core_pattern settings)
-
Account Deleted - attached _usr_bin_monit.0.crash
-
Account Deleted Is this what you meant?
-
repo owner yes, thanks for data
-
repo owner Please can you send your monit configuration file to support@mmonit.com?
-
Account Deleted sent
-
repo owner The problem is triggered by the "totalmem" statement in the context of "system" service:
check system $HOST .... if totalmem > 90% for 30 cycles then alert
The "totalmem" test is for "process" service types only (it checks the total memory usage of the process and its children). It shouldn't work in the context of the "system" check ... will fix the configuration parser.
Please replace the "totalmem" test in the "check system" context with "memory" test:
if memory usage > 90% for 30 cycles then alert
-
Account Deleted It works in 5.20 :)
-
repo owner in 5.20.0 it doesn't crash, but the test doesn't work too, as the "totalmem" test cannot be performed (no data in check system context)
-
repo owner - changed status to resolved
Fixed: Issue
#614: Monit may crash if "total memory" test is used in "check system" context. The "total memory" test is for process checks only (includes children memory total) and will produce syntax error if used in system check now.→ <<cset 692514c5f207>>
- Log in to comment
Bah, opened it as anonymous user so i can't edit it now