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

[dev.icinga.com #13103] Config validation crashes when using command_endpoint without also having an ApiListener object #4771

Closed
icinga-migration opened this issue Nov 9, 2016 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/13103

Created by mwaldmueller on 2016-11-09 10:47:39 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2016-11-10 12:45:02 +00:00)
Target Version: 2.6.0
Last Update: 2016-12-13 07:30:10 +00:00 (in Redmine)

Icinga Version: 2.5.4
Backport?: Not yet backported
Include in Changelog: 1

gdb --args /usr/lib/x86_64-linux-gnu/icinga2/sbin/icinga2 daemon -C -DZonesDir=/dev/null -c /usr/local/LConf/tmp/lconfexport-icinga2.tmp.conf
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/lib/x86_64-linux-gnu/icinga2/sbin/icinga2...Reading symbols from /usr/lib/debug/.build-id/df/e8eb28a62c42b0221e9b6920e3c6221d3bde27.debug...done.
done.
(gdb) r
Starting program: /usr/lib/x86_64-linux-gnu/icinga2/sbin/icinga2 daemon -C -DZonesDir=/dev/null -c /usr/local/LConf/tmp/lconfexport-icinga2.tmp.conf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff2b80700 (LWP 12006)]
[New Thread 0x7ffff237f700 (LWP 12007)]
[New Thread 0x7ffff1b7e700 (LWP 12008)]
[New Thread 0x7ffff137d700 (LWP 12009)]
[New Thread 0x7ffff0b7c700 (LWP 12010)]
[New Thread 0x7fffebfff700 (LWP 12011)]
[Thread 0x7ffff137d700 (LWP 12009) exited]
[Thread 0x7fffebfff700 (LWP 12011) exited]
[Thread 0x7ffff0b7c700 (LWP 12010) exited]
[Thread 0x7ffff1b7e700 (LWP 12008) exited]
[Thread 0x7ffff237f700 (LWP 12007) exited]
[Thread 0x7ffff2b80700 (LWP 12006) exited]
process 12003 is executing new program: /usr/lib/x86_64-linux-gnu/icinga2/sbin/icinga2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff2b80700 (LWP 12013)]
[New Thread 0x7ffff2b3f700 (LWP 12014)]
[New Thread 0x7ffff2afe700 (LWP 12015)]
[New Thread 0x7ffff2abd700 (LWP 12016)]
[New Thread 0x7ffff2a7c700 (LWP 12017)]
[New Thread 0x7ffff2a3b700 (LWP 12018)]
information/cli: Icinga application loader (version: r2.5.4-1)
information/cli: Loading configuration file(s).
information/ConfigItem: Committing config item(s).
[New Thread 0x7ffff18c6700 (LWP 12107)]
[New Thread 0x7ffff1885700 (LWP 12110)]
[New Thread 0x7ffff1844700 (LWP 12112)]
[New Thread 0x7ffff1803700 (LWP 12113)]
[New Thread 0x7ffff17c2700 (LWP 12114)]
[New Thread 0x7ffff1781700 (LWP 12115)]
[New Thread 0x7ffff1740700 (LWP 12116)]
[New Thread 0x7ffff12c4700 (LWP 12117)]
[New Thread 0x7ffff1283700 (LWP 12118)]
[New Thread 0x7ffff1242700 (LWP 12119)]
[New Thread 0x7ffff1201700 (LWP 12120)]
[New Thread 0x7ffff11c0700 (LWP 12121)]
[New Thread 0x7ffff117f700 (LWP 12122)]
[New Thread 0x7ffff113e700 (LWP 12123)]
[New Thread 0x7ffff10fd700 (LWP 12126)]
[New Thread 0x7ffff10bc700 (LWP 12127)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff11c0700 (LWP 12121)]
icinga::Checkable::OnAllConfigLoaded (this=this@entry=0x7fffa0687c20) at /build/icinga2-2.5.4/lib/icinga/checkable.cpp:69
69  /build/icinga2-2.5.4/lib/icinga/checkable.cpp: Datei oder Verzeichnis nicht gefunden.

Changesets

2016-11-10 12:42:50 +00:00 by gbeutner 06e4b4e

Fix crash in Checkable::OnAllConfigLoaded

fixes #13103
@icinga-migration
Copy link
Author

Updated by mwaldmueller on 2016-11-09 10:59:17 +00:00

Backtrace:

(gdb) bt full

#0  icinga::Checkable::OnAllConfigLoaded (this=this@entry=0x7fffa0befbb0) at /build/icinga2-2.5.4/lib/icinga/checkable.cpp:69

checkableZone = {px = 0x0}
cmdZone = {px = 0x7fffb005aeb0}
endpoint = {px = 0x7fffb8055ee0}

PRETTY_FUNCTION = "virtual void icinga::Checkable::OnAllConfigLoaded()"

#1  0x00007ffff1e51eb5 in icinga::Service::OnAllConfigLoaded (this=0x7fffa0befbb0) at /build/icinga2-2.5.4/lib/icinga/service.cpp:64

zoneName = {static NPos = 18446744073709551615, m_Data = {static npos = ,

M_dataplus = {<std::allocator> = {<_gnu_cxx::new_allocator> = {}, },
_M_p = 0x7fffad3eb22c ""}}}

PRETTY_FUNCTION = "virtual void icinga::Service::OnAllConfigLoaded()"
groups = {px = 0x7}

#2  0x00007ffff74ea459 in icinga::ConfigItem::OnAllConfigLoadedHelper (this=0x7fffa5397a40)

at /build/icinga2-2.5.4/lib/config/configitem.cpp:378
No locals.

#3  0x00007ffff789d745 in operator() (this=0x7ffff1802c30) at /usr/include/boost/function/function_template.hpp:760

No locals.

#4  icinga::WorkQueue::WorkerThreadProc (this=0x7fffffffa6f0) at /build/icinga2-2.5.4/lib/base/workqueue.cpp:234

task = {Function = {<boost::function0> = {boost::function_base = {vtable = 0x7ffff7742710, functor = {
obj_ptr = 0x7ffff74ea430, type = {type = 0x7ffff74ea430, const_qualified = false, volatile_qualified = false},
func_ptr = 0x7ffff74ea430 icinga::ConfigItem::OnAllConfigLoadedHelper(), bound_memfunc_ptr = {memfunc_ptr = (
void (boost::detail::function::X::)(boost::detail::function::X const,
int)) 0x7ffff74ea430 icinga::ConfigItem::OnAllConfigLoadedHelper(), obj_ptr = 0x7fffa5397a40}, obj_ref = {obj_ptr = 0x7ffff74ea430,
is_const_qualified = false, is_volatile_qualified = false}, data = 48 '0'}}, static args = ,
static arity = }, }, Priority = icinga::PriorityNormal, ID = -335361447}
idbuf =
lock = {m = 0x7fffffffa708, is_locked = false}

#5  0x00007ffff7fe3629 in ?? () from /usr/lib/libboost_thread.so.1.49.0

No symbol table info available.

#6  0x00007ffff7bc7b50 in start_thread (arg=) at pthread_create.c:304

__res =
pd = 0x7ffff1803700
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737245099776, 8346945513706335973, 140737349755424, 140737245100480,
140737354125376, 3, -8346949424850555163, -8346962586366005531}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0},
data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call =
freesize =

PRETTY_FUNCTION = "start_thread"

#7  0x00007ffff5008fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

No locals.

#8  0x0000000000000000 in ?? ()

No symbol table info available.
(gdb)

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-11-10 10:36:03 +00:00

  • Category set to libicinga

The root cause for this was that the ApiListener object was missing in the config. Nevertheless Icinga should definitely not crash because of that.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-11-10 12:43:07 +00:00

  • Status changed from New to Assigned
  • Assigned to set to gbeutner
  • Target Version set to 2.6.0

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-11-10 12:45:02 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 06e4b4e.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-12-13 07:30:10 +00:00

  • Subject changed from Segmentation fault during config validation to Config validation crashes when using command_endpoint without also having an ApiListener object

@icinga-migration icinga-migration added bug Something isn't working libicinga labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.6.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant