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

icinga 2.11 exits without errors on FreeBSD 11.3 #7539

Open
nielsk opened this issue Sep 25, 2019 · 119 comments
Open

icinga 2.11 exits without errors on FreeBSD 11.3 #7539

nielsk opened this issue Sep 25, 2019 · 119 comments
Labels
core/crash Shouldn't happen, requires attention help wanted Extra attention is needed needs feedback We'll only proceed once we hear from you again

Comments

@nielsk
Copy link

nielsk commented Sep 25, 2019

Describe the bug

After upgrading from icinga 2.10.5 to 2.11 on FreeBSD 11.3-p3, icinga2 daemon -C shows that the configuration is correct, but starts and immediately exits when the api-feature is enabled. It works without the api-feature.

After re-running the api setup, I got it working but it crashed when I tried to send a notification.

output from running truss icinga2 daemon -x debug before 'api setup'

[2019-09-25 08:50:29 +0200] information/DbConnection: 'ido-mysql' started.                                                                                                                                                                    
[2019-09-25 08:50:29 +0200] information/ExternalCommandListener: 'command' started.                                                                                                                                                           
[2019-09-25 08:50:29 +0200] warning/ExternalCommandListener: This feature is DEPRECATED and will be removed in future releases. Check the roadmap at https://github.com/Icinga/icinga2/milestones                                             
Context:                                                                                                                                                                                                                                      
        (0) Activating object 'command' of type 'ExternalCommandListener'                                                                                                                                                                     
                                                                                                                                                                                                                                              
[2019-09-25 08:50:29 +0200] information/NotificationComponent: 'notification' started.                                                                                                                                                        
[2019-09-25 08:50:29 +0200] information/CheckerComponent: 'checker' started.                                                                                                                                                                  
[2019-09-25 08:50:29 +0200] information/ConfigItem: Activated all objects.
[2019-09-25 08:50:29 +0200] notice/WorkQueue: Stopped WorkQueue threads for 'DaemonCommand::Run'
nanosleep({ 0.200000000 })                       = 0 (0x0)
wait4(60659,{ SIGNALED,sig=64 },WNOHANG,0x0)     = 0 (0x0)
nanosleep({ 0.200000000 })                       ERR#4 'Interrupted system call'
SIGNAL 20 (SIGCHLD) code=CLD_KILLED pid=60659 uid=183 status=11
sigprocmask(SIG_SETMASK,{ SIGCHLD },0x0)         = 0 (0x0)
sigreturn(0x7fffffffca80)                        ERR#4 'Interrupted system call'
wait4(60659,{ SIGNALED,sig=SIGSEGV },WNOHANG,0x0) = 60659 (0xecf3)
[2019-09-25 08:50:29 +0200] notice/cli: Seemless worker (PID 60659) stopped, stopping as well
write(1,"[2019-09-25 08:50:29 +0200] \^[["...,103) = 103 (0x67)
unlink("/var/run/icinga2/icinga2.pid")           = 0 (0x0)
close(11)                                        = 0 (0x0)
_umtx_op(0x8010b2038,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2098,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b20e0,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b20f8,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2110,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2140,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2068,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2128,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8054182b8,UMTX_OP_NWAKE_PRIVATE,0x18,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2230,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2170,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2158,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2200,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2188,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b20c8,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b21a0,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b21e8,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2008,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b21d0,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2080,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2218,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2050,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b20b0,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2020,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b21b8,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8055c09e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8055c09e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8055c09e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8055c09e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8055c09e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8055c09e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8055c09e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8055c09e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAKE2,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x80552b5e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8055c09e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8055c09e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
…
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010c0000,4096)                         = 0 (0x0)                                                             
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
<thread 102033 exited>                                                                                                 
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010be000,4096)                         = 0 (0x0)                                                             
<thread 102025 exited>                                                                                                 
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010bf000,4096)                         = 0 (0x0)                                                             
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
<thread 102032 exited>                                                                                                                                                                                                               [72/4901]
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010c3000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
<thread 102096 exited>
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010c5000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
<thread 102213 exited>
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010c9000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
<thread 102241 exited>
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010c8000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
<thread 102240 exited>
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010ca000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x805483e00,UMTX_OP_WAIT,0x18f63,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
<thread 102243 exited>
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010b9000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)                                                                                                                                                                        [18/4901]
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
<thread 101153 exited>
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010b4000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
<thread 100701 exited>
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010bd000,4096)                         = 0 (0x0)
munmap(0x8010bc000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
<thread 102024 exited>
munmap(0x8010bb000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
<thread 101278 exited>
<thread 101274 exited>
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010b8000,4096)                         = 0 (0x0)
<thread 101144 exited>
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010c7000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010c6000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
<thread 102239 exited>
_umtx_op(0x805484d00,UMTX_OP_WAIT,0x18f5f,0x0,0x0) = 0 (0x0)
munmap(0x8010ba000,4096)                         = 0 (0x0)
<thread 102236 exited>
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
<thread 101163 exited>
munmap(0x8010b7000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010b3000,4096)                         = 0 (0x0)
<thread 100918 exited>
<thread 100489 exited>
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010c1000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010b6000,4096)                         = 0 (0x0)
<thread 102035 exited>
<thread 100805 exited>
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010c2000,4096)                         = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_UNLOCK,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x804020800,UMTX_OP_RW_WRLOCK,0x0,0x0,0x0) = 0 (0x0)
munmap(0x8010b5000,4096)                         = 0 (0x0)
<thread 102036 exited>
<thread 100799 exited>
munmap(0x8010c4000,4096)                         = 0 (0x0)
<thread 102158 exited>
_umtx_op(0x805485c00,UMTX_OP_WAIT,0x18f0e,0x0,0x0) = 0 (0x0)
exit(0x8b)
process exit, rval = 139

crash

  Application version: r2.11.0-1

System information:
  Platform: Unknown
  Platform version: Unknown
  Kernel: FreeBSD
  Kernel version: 11.3-RELEASE-p3
  Architecture: amd64

Build information:
  Compiler: Clang 8.0.0
  Build host: ic-11_3-RELEASE-HEAD-job-03

Application information:

General paths:
  Config directory: /usr/local/etc/icinga2
  Data directory: /var/lib/icinga2
  Log directory: /var/log/icinga2
  Cache directory: /var/cache/icinga2
  Spool directory: /var/spool/icinga2
  Run directory: /var/run/icinga2

Old paths (deprecated):
  Installation root: /usr/local
  Sysconf directory: /usr/local/etc
  Run directory (base): /var/run
  Local state directory: /var

Internal paths:
  Package data directory: /usr/local/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /var/run/icinga2/icinga2.pid

Error: Function call 'send' failed with error code 32, 'Broken pipe'


***
* This would indicate a runtime problem or configuration error. If you believe this is a bug in Icinga 2
* please submit a bug report at https://github.com/Icinga/icinga2 and include this stack trace as well as any other
* information that might be useful in order to reproduce this problem.
***
quit: No such file or directory.
ptrace: Operation not permitted.
//65707: No such file or directory.

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • Version used (icinga2 --version): r2.11.0-1
  • Operating System and version: FreeBSD 11.3-p3
  • Enabled features (icinga2 feature list): api checker command ido-mysql mainlog notification
  • Icinga Web 2 version and modules (System - About):
Version 2.7.1
Git Commit f98f988aff19fd797531e4a0555e872ae3155142
PHP Version 7.2.22
cube 1.0.1
doc 2.7.1
iframe 0.0.0
ipl v0.1.1
monitoring 2.7.1
reactbundle v0.4.1
setup 2.7.1
unicorn 1.0.2
x509 1.0.0
  • Config validation (icinga2 daemon -C):
[2019-09-25 12:26:53 +0200] information/cli: Icinga application loader (version: r2.11.0-1)
[2019-09-25 12:26:53 +0200] information/cli: Loading configuration file(s).
[2019-09-25 12:26:54 +0200] information/ConfigItem: Committing config item(s).
[2019-09-25 12:26:54 +0200] information/ApiListener: My API identity: ic.ops.eusc.inter.net
[2019-09-25 12:26:59 +0200] warning/ApplyRule: Apply rule '' (in /usr/local/etc/icinga2/zones.d/icinga2-global-templates/generic_services_icagent/raid_win.conf: 1:0-1:59) for type 'Service' does not match anywhere!
[2019-09-25 12:26:59 +0200] warning/ApplyRule: Apply rule '' (in /usr/local/etc/icinga2/zones.d/icinga2-global-templates/generic_services_icagent/replica_win.conf: 1:0-1:65) for type 'Service' does not match anywhere!
[2019-09-25 12:26:59 +0200] warning/ApplyRule: Apply rule 'cibix_tcp' (in /usr/local/etc/icinga2/zones.d/icinga2-master-cluster/platform/commands/cibix_tcp.conf: 1:0-1:24) for type 'Service' does not match anywhere!
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 84 Comments.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 3138 Dependencies.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 362 Downtimes.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 19687 Notifications.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 207 ScheduledDowntimes.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 5098 Services.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 3 ServiceGroups.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 5 TimePeriods.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 13 Users.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 54 UserGroups.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 1 IdoMysqlConnection.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 232 CheckCommands.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 33 HostGroups.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 659 Hosts.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 1 FileLogger.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 1 ExternalCommandListener.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 1 ApiListener.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 3 ApiUsers.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 10 Endpoints.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 1 CheckerComponent.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 10 Zones.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 1 EventCommand.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 1 NotificationComponent.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 1 IcingaApplication.
[2019-09-25 12:26:59 +0200] information/ConfigItem: Instantiated 6 NotificationCommands.
[2019-09-25 12:26:59 +0200] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
[2019-09-25 12:26:59 +0200] information/cli: Finished validating the configuration file(s).

additional context

I opened a thread on the community discourse where I might have wrote more:
https://community.icinga.com/t/problems-with-upgrading-icinga-2-10-5-to-2-11-on-freebsd/2325

@dnsmichi
Copy link
Contributor

@bsdlme can you confirm that behaviour please? I'm not sure how FreeBSD handles the umbrella process and reloads here. Or maybe it is a problem with boost asio & context on BSD specifically.

@dnsmichi dnsmichi added the needs feedback We'll only proceed once we hear from you again label Sep 25, 2019
@bsdlme
Copy link
Contributor

bsdlme commented Sep 25, 2019

@nielsk: does dmesg(1) show a SIGBUS error for the icinga2 process?

@mat813
Copy link
Contributor

mat813 commented Sep 25, 2019

I have the same problem, I described it a bit more in FreeBSD #240812. I discovered after running dmesg that icinga2 was diying with a SIGBUS.

@dnsmichi
Copy link
Contributor

Is there a difference if you omit -d during that run?

@bsdlme
Copy link
Contributor

bsdlme commented Sep 25, 2019

@nielsk is running FreeBSD 11.3 / amd64. @mat813 11.2 / i386 both with the API feature enabled.

I was successfully running 2.11.0 on FreeBSD 12.0 / amd64 with API feature.

So the problematic case seems to be API on 11.x

@nielsk
Copy link
Author

nielsk commented Sep 25, 2019 via email

@dnsmichi
Copy link
Contributor

@bsdlme which boost versions are provided with 11.2 & 3?

@nielsk
Copy link
Author

nielsk commented Sep 26, 2019

1.71 is in ports

@dnsmichi
Copy link
Contributor

I'm not a FreeBSD user, what else differs between 11.3 and 12 in terms of compiler versions, cmake, build flags, openssl versions, etc. in specific regard to Icinga dependencies?

@bsdlme
Copy link
Contributor

bsdlme commented Sep 26, 2019

FreeBSD 11.2 (@mat813): clang 6.0.0, OpenSSL 1.0.2o
FreeBSD 11.3 (@nielsk): clang 8.0.0, OpenSSL 1.0.2s
FreeBSD 12.0 (@bsdlme): clang 6.0.1, OpenSSL 1.1.1a

11.3 was released after 12.0 that's why it has a newer clang version.

Cmake is not in base but installed from ports. Ports have the same version for all FreeBSD versions. The latest cmake in ports is cmake-3.15.3, probably used by all of us.

CFLAGS are:

-DBOOST_COROUTINES_NO_DEPRECATION_WARNING -DBOOST_FILESYSTEM_NO_DEPRECATED -Ithird-party/nlohmann_json -Ithird-party/utf8cpp/source -I. -Ilib -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Qunused-arguments -fcolor-diagnostics -pthread -Winvalid-pch -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -MD -MT 

@dnsmichi
Copy link
Contributor

Thanks. As far as I can see, 11.x is still supported. https://www.freebsd.org/security/#sup

@bsdlme How difficult is it for you to spin up 11.3 and test this?

@bsdlme
Copy link
Contributor

bsdlme commented Sep 26, 2019

I can create a VM at Azure with 11.3. If you like I can give you the login credentials, so you can play around yourself.

@dnsmichi
Copy link
Contributor

I would but unfortunately I have no time atm. I'm merely interested in the fact if you can reproduce this by yourself, and do the backtrace dance. I don't remember whether FreeBSD has gdb or lldb though.

@bsdlme
Copy link
Contributor

bsdlme commented Sep 30, 2019

Now I set up a 11.3 amd64 VM and installed 2.11 using packages.
I needed to change permissions on /usr/local/etc/icinga2 so that the icinga group has write permissions to it (this has changed in 2.11). After that I set a ticket salt, ran "icinga2 api setup" and "icinga2 feature enable api" and could start Icinga using the rc script. I does not crash for me and I am able to use curl to connect to the API port.

@nielsk
Copy link
Author

nielsk commented Sep 30, 2019

So, what can I do to debug this further?
I had set the directory to write-permissions as well because otherwise it wouldn't start in the first place.
I just tried the upgrade again, chowned everything in /usr/local/etc/icinga2 to icinga and get a signal 11.
According to truss right after the icinga-satellites and an agent started connecting to icinga 2.11

[2019-09-30 21:30:01 +0200] information/ApiListener: Started new listener on '[::]:5665'
[2019-09-30 21:30:01 +0200] information/ApiListener: Reconnecting to endpoint 'sat1.fqdn' via host 'sat1.fqdn' and port '5665'
[2019-09-30 21:30:01 +0200] information/ApiListener: Reconnecting to endpoint 'sat2.fqdn' via host 'sat2.fqdn' and port '5665'
[2019-09-30 21:30:01 +0200] information/ApiListener: Reconnecting to endpoint 'sat3.fqdn' via host 'sat3.fqdn' and port '5665'
[2019-09-30 21:30:01 +0200] information/ApiListener: Reconnecting to endpoint 'sat4.fqdn' via host 'sat4.fqdn' and port '5665'
[2019-09-30 21:30:01 +0200] information/ApiListener: Reconnecting to endpoint 'sat5.fqdn' via host 'sat5.fqdn' and port '5665'
[2019-09-30 21:30:01 +0200] information/ApiListener: Reconnecting to endpoint 'sat6.fqdn' via host 'sat6.fqdn' and port '5665'
[2019-09-30 21:30:01 +0200] information/ApiListener: Reconnecting to endpoint 'icinga-agent1' via host 'icinga-agent1' and port '5665'
nanosleep({ 0.200000000 })                       ERR#4 'Interrupted system call'
SIGNAL 20 (SIGCHLD) code=CLD_KILLED pid=38116 uid=183 status=11
sigprocmask(SIG_SETMASK,{ SIGCHLD },0x0)         = 0 (0x0)
sigreturn(0x7fffffffcac0)                        ERR#4 'Interrupted system call'
wait4(38116,{ SIGNALED,sig=SIGSEGV },WNOHANG,0x0) = 38116 (0x94e4)
unlink("/var/run/icinga2/icinga2.pid")           = 0 (0x0)
close(11)                                        = 0 (0x0)
_umtx_op(0x8010b2020,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2098,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2170,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2140,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b20f8,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b21d0,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2158,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8055c09e0,UMTX_OP_MUTEX_WAIT,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2128,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2110,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b21e8,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)
_umtx_op(0x8054182b8,UMTX_OP_NWAKE_PRIVATE,0x18,0x0,0x0) = 0 (0x0)
_umtx_op(0x8010b2080,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0)

@nielsk
Copy link
Author

nielsk commented Sep 30, 2019

I tried now switching for icinga2 back to the freebsd-pkg-repo instead of our own and it still crashes with the same output as above

@bsdlme
Copy link
Contributor

bsdlme commented Oct 1, 2019

You could try by using the sample config and adding more and more of your config and see when it starts to crash.

@nielsk
Copy link
Author

nielsk commented Oct 1, 2019

It would be easier to set up a new server with an officially supported linux-distribution and migrate the config than doing this. I have to speak with my team about it.

@bsdlme
Copy link
Contributor

bsdlme commented Oct 1, 2019

Or upgrade to 12.0-RELEASE.

@nielsk
Copy link
Author

nielsk commented Oct 1, 2019 via email

@dnsmichi
Copy link
Contributor

dnsmichi commented Oct 2, 2019

I don't have much time atm, one thought is how the Boost libraries are compiled on your system. There could be specific hardening compiler flags which create troubles here, or specific stack guard patches which are wrong in the way how Boost Coroutine and Context work. See my analysis for the Nessus scan crashes in #7431.

Since it always crashes on TLS connection start, this would be the place where I'd start debugging. Maybe also the OpenSSL version/linkage on FreeBSD causes trouble here.

@bsdlme
Copy link
Contributor

bsdlme commented Oct 2, 2019

How? I am using 11.3. You cannot upgrade from 11.3 to 12.0 because of the new zfs-features in 11.3.

Oh, I see. Then you could upgrade to 12.1-BETA2 or wait for 12.1-RC1 which will be released on Oct, 11.
Or install 12.0-RELEASE and migrate the data.
Unfortunately I don't have any clue of C++, so I can't debug this any further...

@davehayes
Copy link

davehayes commented Oct 14, 2019

Chiming in with the same problem FreeBSD 11.3 here. I just upgraded to 2.11.0 from 2.10.5, and now I'm also getting this SIGV (11), but I get the same thing from truss:

[2019-10-13 16:47:09 -0700] notice/JsonRpcConnection: Received 'log::SetLogPosition' message from identity 'teraraid.dream-tech.com'.
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 = 0 (0x0)
wait4(62587,{ SIGNALED,sig=64 },WNOHANG,0x0)	 = 0 (0x0)
nanosleep({ 0.200000000 })			 ERR#4 'Interrupted system call'
SIGNAL 20 (SIGCHLD) code=CLD_DUMPED pid=62587 uid=183 status=11
sigprocmask(SIG_SETMASK,{ SIGCHLD },0x0)	 = 0 (0x0)
sigreturn(0x7fffffffc6c0)			 ERR#4 'Interrupted system call'
wait4(62587,{ SIGNALED,sig=SIGSEGV,cored },WNOHANG,0x0) = 62587 (0xf47b)
[2019-10-13 16:47:12 -0700] notice/cli: Seemless worker (PID 62587) stopped, stopping as well
write(1,"[2019-10-13 16:47:12 -0700] \^[["...,103) = 103 (0x67)
unlink("/var/run/icinga2/icinga2.pid")		 = 0 (0x0)
close(11)					 = 0 (0x0)

I'm using clang 8.0.0 but LibreSSL 2.9.2. This might at least point away from SSL being the culprit. I can confirm that this crash is only related to being a master, since one of my satellites is running the exact same build but hasn't crashed yet.

@bsdlme - did you have any satellites connected to your test? I suspect that might be necessary so you can see the crash

@dnsmichi
Copy link
Contributor

LibreSSL is something we don't support as the syscalls/APIs may behave differently. We only test OpenSSL. Is this a thing on FreeBSD to set via the ports package?

I'm not sure how to interpret truss, but given that CLD_DUMPED leads to the real error here, is there a possibility to follow child forks? https://vegdave.wordpress.com/2006/10/23/an-example-on-running-truss/ says so.

It may also help to attach gdb/lldb and follow the fork.

@bsdlme
Copy link
Contributor

bsdlme commented Oct 14, 2019

You can trace child processes with "truss -f".

@davehayes
Copy link

LibreSSL is usually a drop in replacement for OpenSSL. We can set a knob when building packages to use that instead of openssl; I can provide more gory details on request. Note that I do not use the normal ports methodology of make; make install as I build far too many packages for too many people. Instead I use poudriere. It is pretty much the same idea with respect to the knob mentioned above.

LibreSSL works 98% of the time; I've built 100s of packages with LibreSSL that work just fine with it including perl, php, nginx, and icinga2. Specific to icinga2, I have it running just fine with LibreSSL at two different sites for the past two years. That being said, there are a few edge case packages that do not build correctly with LibreSSL and these issues are (to my knowledge) handled by the ports system.

I don't think the issue is the LibreSSL api because other users are using the stock OpenSSL api and having the same crash.

So I just backed out to 2.10.5 because I needed it working. I can make some time to try 2.11 again if you are patient with me. :)

@bsdlme
Copy link
Contributor

bsdlme commented Oct 15, 2019

I can make some time to try 2.11 again if you are patient with me. :)

Yes please. I'm not able to fix it, @dnsmichi is ENOTIME and we should really try to find the cause.

Thanks in advance!

@mat813
Copy link
Contributor

mat813 commented Oct 21, 2019

So, I updated a 11.2 / i386 box to 12.0, and icinga crashes in the same way :(

@mvanduren-cloudvps
Copy link

One minor sidenote, which probably doesn't apply to your implementation (I don't know what std::atomic_flag uses under the hood, but probably not the pthread_spin_* family): POSIX states that a pthread_spin_unlock called by a thread not owning the lock results in undefined behaviour[0] and could just as easily cause an abort, similar to what pthread_mutex_unlock does on OpenBSD.

[0] https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_spin_unlock.html

@mvanduren-cloudvps
Copy link

After a couple of days it still seems to run as expected.

There's one minor issue where after some time icinga fails to exit when sending it a SIGTERM via:

pkill -T "0" -xf "/usr/local/lib/icinga2/sbin/icinga2 daemon.*"

as per OpenBSD's rc-framework. This however seems not directly related to this diff, since I can restart icinga just after a config-update has been pushed. I'll investigate further and if I find something useful I'll place it on an appropriate ticket.

@bsdlme
Copy link
Contributor

bsdlme commented Oct 21, 2020

Is the patch included in the latest 2.12.1 release?

@Al2Klimov
Copy link
Member

#8308? Yes.

@bsdlme
Copy link
Contributor

bsdlme commented Oct 22, 2020

Great!
I just updated the FreeBSD port, @nielsk and @mat813 can you please confirm that you setup does work now?

@nielsk
Copy link
Author

nielsk commented Oct 22, 2020

Great!

I just updated the FreeBSD port, @nielsk and @mat813 can you please confirm that you setup does work now?

I will try to find time next week. If it doesn't work m, the rollback can be quite cumbersome.
Thanks a lot already to all who worked on this.

@mat813
Copy link
Contributor

mat813 commented Oct 24, 2020

@bsdlme With icinga2-2.12.1, it absolutely still crashes on startup on i386 boxes.

@nielsk
Copy link
Author

nielsk commented Oct 25, 2020

@bsdlme With icinga2-2.12.1, it absolutely still crashes on startup on i386 boxes.

Did you try i386 or x64? I just want to be sure before I do my test.

@mat813
Copy link
Contributor

mat813 commented Oct 25, 2020

Well, the answer is in the comment you are responding to, i386. I never had any problems on amd64.

@nielsk
Copy link
Author

nielsk commented Oct 25, 2020

Thanks. I just wanted to be sure because I have seen people using i386 and x64 interchangeably.

@nielsk
Copy link
Author

nielsk commented Oct 28, 2020

@bsdlme I tried to build it today on my poudriere (with a FreeBSD 11.4-jail) and it fails. I created a bug in the FreeBSD-bugzilla.

@bsdlme
Copy link
Contributor

bsdlme commented Oct 29, 2020

@nielsk Yes, but you seem to have a local patch that can't be applied correctly.

@nielsk
Copy link
Author

nielsk commented Oct 29, 2020

I could now update -- I had to upgrade to 11.4 because 11.3 is not supported anymore.
@bsdlme icinga2 r2.12.1-1 still crashes (x64)

icinga2 - The Icinga 2 network monitoring daemon (version: r2.12.1-1)

Copyright (c) 2012-2020 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

System information:
  Platform: Unknown
  Platform version: Unknown
  Kernel: FreeBSD
  Kernel version: 11.4-RELEASE-p3
  Architecture: amd64

Build information:
  Compiler: Clang 10.0.0
  Build host: ic-11_4-RELEASE-HEAD-job-01
  OpenSSL version: OpenSSL 1.1.1h  22 Sep 2020

Application information:

General paths:
  Config directory: /usr/local/etc/icinga2
  Data directory: /var/lib/icinga2
  Log directory: /var/log/icinga2
  Cache directory: /var/cache/icinga2
  Spool directory: /var/spool/icinga2
  Run directory: /var/run/icinga2

Old paths (deprecated):
  Installation root: /usr/local
  Sysconf directory: /usr/local/etc
  Run directory (base): /var/run
  Local state directory: /var

Internal paths:
  Package data directory: /usr/local/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /var/run/icinga2/icinga2.pid

@bsdlme
Copy link
Contributor

bsdlme commented Oct 29, 2020

Too bad. So we're back at the beginning.

@julianbrost
Copy link
Contributor

Random thought I just had what might be causing this (did not investigate this further, just writing it down so I don't forget): Icinga 2.11 changed the network stack to use Boost.Asio and executes coroutines on multiple worker theads. AFAIK Boost.Asio may schedule these coroutines on arbitrary worker threads, thus if a coroutine holds a mutex while it performs a yield operation, the mutex might be unlocked on a different thread.

@davehayes
Copy link

davehayes commented Mar 28, 2021

Confirming this bug is still here after upgrading to 12.2 and 2021Q1 packages:

# pkg info | egrep 'boost|icinga'
boost-libs-1.72.0_3            Free portable C++ libraries (without Boost.Python)
icinga2-2.12.3                 Monitoring and management system for hosts, services and networks

How can I tell icinga not to use multiple threads as a workaround?

# icinga2 -V
icinga2 - The Icinga 2 network monitoring daemon (version: r2.12.3-1)

Copyright (c) 2012-2021 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

System information:
  Platform: Unknown
  Platform version: Unknown
  Kernel: FreeBSD
  Kernel version: 12.2-STABLE
  Architecture: amd64

Build information:
  Compiler: Clang 10.0.1
  Build host: pkg.dream-tech.com
  OpenSSL version: LibreSSL 3.2.5

Application information:

General paths:
  Config directory: /usr/local/etc/icinga2
  Data directory: /var/lib/icinga2
  Log directory: /var/log/icinga2
  Cache directory: /var/cache/icinga2
  Spool directory: /var/spool/icinga2
  Run directory: /var/run/icinga2

Old paths (deprecated):
  Installation root: /usr/local
  Sysconf directory: /usr/local/etc
  Run directory (base): /var/run
  Local state directory: /var

Internal paths:
  Package data directory: /usr/local/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /var/run/icinga2/icinga2.pid

@julianbrost
Copy link
Contributor

How can I tell icinga not to use multiple threads as a workaround?

No threads at all won't work, the best you could try would be to reduce the size of thread pools to 1, however that's not configurable at runtime.

You'd have to patch the following line to say ... m_Threads(1) ...:

IoEngine::IoEngine() : m_IoContext(), m_KeepAlive(boost::asio::make_work_guard(m_IoContext)), m_Threads(decltype(m_Threads)::size_type(std::thread::hardware_concurrency() * 2u)), m_AlreadyExpiredTimer(m_IoContext)

And ... threads = 1 ... here:

ThreadPool(size_t threads = std::thread::hardware_concurrency() * 2u);

@davehayes
Copy link

That looks potentially dangerous. Still, I may try it in desperation.

@davehayes
Copy link

So I tried both of the changes suggested above and icinga2 still crashes.

@Al2Klimov Al2Klimov added the core/crash Shouldn't happen, requires attention label Oct 12, 2021
@Al2Klimov Al2Klimov added the help wanted Extra attention is needed label Oct 26, 2021
@Al2Klimov
Copy link
Member

@nielsk And 12.x+?

@nielsk
Copy link
Author

nielsk commented Jan 18, 2022

I don't know. I can't update the server because of this issue, I think I even tried once 12.x and had the same problem but it is quite a while ago.

And I am migrating currently to checkmk.

@Al2Klimov
Copy link
Member

To all FreeBSD users subscribed here:

Please could you test a recent Icinga 2 version on a recent FreeBSD version and report:

@henningkessler
Copy link

henningkessler commented Jan 19, 2022 via email

@davehayes
Copy link

icinga2-2.13.2, FreeBSD 12.2-STABLE, amd64.

I am running icinga2 at a remote site that works, but has never crashed. I am using the patch to boost libraries in this bug:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260143

which was thankfully provided to me by #9174. This installation is now having a swap space resource exhaustion issue, but that is probably different than the relevant issue.

I could no longer use the icinga2 site that has crashed before so it has been retired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core/crash Shouldn't happen, requires attention help wanted Extra attention is needed needs feedback We'll only proceed once we hear from you again
Projects
None yet
Development

No branches or pull requests