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 #10830] Config validation doesn't fail when templates are used as object names #3775

Closed
icinga-migration opened this issue Dec 13, 2015 · 8 comments
Milestone

Comments

@icinga-migration
Copy link
Member

@icinga-migration icinga-migration commented Dec 13, 2015

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

Created by bldewolf on 2015-12-13 00:07:18 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2015-12-17 12:50:03 +00:00)
Target Version: 2.4.2
Last Update: 2016-02-23 09:58:31 +00:00 (in Redmine)

Icinga Version: 2.4.1
Backport?: Already backported
Include in Changelog: 1

I tried to add a new check today without thinking very hard about what I was typing and caused Icinga2 to segfault. I made a new CheckCommand but marked it as a template instead of an object. The config parser should probably catch that the check_command is not valid.

Here is an example:

template CheckCommand "somecommand" {
        import "plugin-check-command"

        command = [ PluginDir + "/check" ]
}

apply Service "someservice" {
        import "generic-service"

        check_command = "somecommand"

        assign where true
}

Attachments

  • 10830.conf mfriedrich - 2015-12-17 10:02:58 +00:00

Changesets

2015-12-17 12:49:30 +00:00 by mfriedrich 323b759

Fix config validation for templates used as object reference name

fixes #10830

2016-02-23 08:16:22 +00:00 by mfriedrich 925161d

Fix config validation for templates used as object reference name

fixes #10830
@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Dec 13, 2015

Updated by mfriedrich on 2015-12-13 09:25:57 +00:00

  • Status changed from New to Feedback
  • Assigned to set to bldewolf

Please run icinga with gdb and attach a full backtrace (details in the docs).

Seems a check for IsAbstract is missing somewhere.

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Dec 14, 2015

Updated by bldewolf on 2015-12-14 18:44:29 +00:00

Woops, I got a backtrace but forgot to include it. It doesn't actually point to where the real error is because the daemon crashes when it first tries to find/use the nonexistent CheckCommand.

(gdb) bt full

#0  icinga::Checkable::ExecuteCheck (this=0x174cee0) at /build/icinga2-2.4.1/lib/icinga/checkable-check.cpp:420

currentContextFrame = {}
reachable =
before_check = 1449959758.030185
local =
scheduled_start = 1449959818.03
cr = {px = 0x1776e90}
endpoint = {px = 0x0}

#1  0x00002b4afb73951d in icinga::CheckerComponent::ExecuteCheckHelper (this=0x1744ab0, checkable=...)

at /build/icinga2-2.4.1/lib/checker/checkercomponent.cpp:200
No locals.

#2  0x00002b4af48152a1 in operator() (this=0x2b4af97dc9e0) at /usr/include/boost/function/function_template.hpp:760

No locals.

#3  icinga::ThreadPool::WorkerThread::ThreadProc (this=0x2b4af4adc730, queue=...) at /build/icinga2-2.4.1/lib/base/threadpool.cpp:138

wi = {Callback = {<boost::function0> = {boost::function_base = {vtable = 0x2b4afb95efb0, functor = {obj_ptr = 0x183d6f0, type = {
type = 0x183d6f0, const_qualified = false, volatile_qualified = false}, func_ptr = 0x183d6f0, bound_memfunc_ptr = {memfunc_ptr = (
void (boost::detail::function::X::)(boost::detail::function::X const, int)) 0x183d6f0, obj_ptr = 0x1757570}, obj_ref = {obj_ptr = 0x183d6f0,
is_const_qualified = false, is_volatile_qualified = false}, data = -16 '\360'}}, static args = ,
static arity = }, }, Timestamp = 1449959758.030076}
st = 1449959758.030093
et =
latency =
idbuf =
lock = {m = 0x2b4af4adc5f0, is_locked = true}

#4  0x00002b4af42a0629 in ?? () from /usr/lib/libboost_thread.so.1.49.0

No symbol table info available.

#5  0x00002b4af448eb50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0

No symbol table info available.

#6  0x00002b4af702e95d in clone () from /lib/x86_64-linux-gnu/libc.so.6

No symbol table info available.

#7  0x0000000000000000 in ?? ()

No symbol table info available.

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Dec 17, 2015

Updated by mfriedrich on 2015-12-17 10:02:16 +00:00

  • Status changed from Feedback to Assigned

  • Assigned to changed from bldewolf to mfriedrich

  • Target Version set to Backlog

    mbmif /usr/local/icinga2 (master) # lldb -- /usr/local/icinga2/lib/icinga2/sbin/icinga2 daemon
    (lldb) target create "/usr/local/icinga2/lib/icinga2/sbin/icinga2"
    Current executable set to '/usr/local/icinga2/lib/icinga2/sbin/icinga2' (x86_64).
    (lldb) settings set -- target.run-args "daemon"
    (lldb) r
    Process 40149 launched: '/usr/local/icinga2/lib/icinga2/sbin/icinga2' (x86_64)
    [2015-12-17 11:00:05 +0100] information/cli: Icinga application loader (version: v2.4.1-80-g8b6d335; debug)
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/icinga2.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/constants.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/zones.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/itl
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/command.conf
    [2015-12-17 11:00:05 +0100] information/Utility: Loading library 'libmethods.dylib'
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/command-icinga.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/timeperiod.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/plugins
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/command-plugins.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/plugins-contrib
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/plugins-contrib.d/databases.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/plugins-contrib.d/hardware.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/plugins-contrib.d/ipmi.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/plugins-contrib.d/network-components.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/plugins-contrib.d/operating-system.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/plugins-contrib.d/virtualization.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/plugins-contrib.d/vmware.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/share/icinga2/include/plugins-contrib.d/web.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/features-enabled/api.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/features-enabled/checker.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/features-enabled/command.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/features-enabled/debuglog.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/features-enabled/graphite.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/features-enabled/ido-mysql.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/features-enabled/livestatus.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/features-enabled/mainlog.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/features-enabled/notification.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/features-enabled/perfdata.conf
    [2015-12-17 11:00:05 +0100] information/Utility: Loading library 'libchecker.dylib'
    [2015-12-17 11:00:05 +0100] information/Utility: Loading library 'libcompat.dylib'
    [2015-12-17 11:00:05 +0100] information/Utility: Loading library 'libperfdata.dylib'
    [2015-12-17 11:00:05 +0100] information/Utility: Loading library 'libdb_ido_mysql.dylib'
    [2015-12-17 11:00:05 +0100] information/Utility: Loading library 'liblivestatus.dylib'
    [2015-12-17 11:00:05 +0100] information/Utility: Loading library 'libnotification.dylib'
    [2015-12-17 11:00:05 +0100] information/Utility: Loading library 'libperfdata.dylib'
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/api-users.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/app.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/commands.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/downtimes.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/groups.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/hosts.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/ido.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/notifications.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/satellite.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/services.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/templates.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/test.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/timeperiods.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/conf.d/users.conf
    [2015-12-17 11:00:05 +0100] information/config: []
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/tests/10237.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/tests/10830.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/tests/8183.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/tests/dep.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/tests/downtime.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/tests/groups.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/tests/hosts.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/tests/mw.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/tests/out.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/tests/random.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/tests/ug.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/etc/icinga2/tests/utf8.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/_api/include.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/_api/mbmif.int.netways.de-1442309540-1/include.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/_api/mbmif.int.netways.de-1442309540-1/../active.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/_api/mbmif.int.netways.de-1442309540-1/conf.d/comments/mbmif.int.netways.de!procs!mbmif.int.netways.de-1450175944-0.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/_api/mbmif.int.netways.de-1442309540-1/conf.d/hosts/shtest.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/example-cmdb/include.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/example-cmdb/mbmif.int.netways.de-1449759511-0/include.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/example-cmdb/mbmif.int.netways.de-1449759585-0/include.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/example-cmdb/mbmif.int.netways.de-1449831656-1/include.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/example-cmdb/mbmif.int.netways.de-1449759511-0/../active.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/example-cmdb/mbmif.int.netways.de-1449759585-0/../active.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/example-cmdb/mbmif.int.netways.de-1449759585-0/zones.d/mbmif.int.netways.de/test.conf
    [2015-12-17 11:00:05 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/example-cmdb/mbmif.int.netways.de-1449831656-1/../active.conf
    [2015-12-17 11:00:05 +0100] warning/config: Ignoring non local config include for zone 'mbmif.int.netways.de': We already have an authoritative copy included.
    [2015-12-17 11:00:05 +0100] information/ConfigItem: Committing config items
    [2015-12-17 11:00:05 +0100] information/ApiListener: My API identity: mbmif.int.netways.de
    [2015-12-17 11:00:11 +0100] warning/ApplyRule: Apply rule 'satellite-host' (in /usr/local/icinga2/etc/icinga2/conf.d/satellite.conf: 29:1-29:41) for type 'Dependency' does not match anywhere!
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1 Endpoint.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1 Zone.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1 ApiListener.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 2 FileLoggers.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1 ApiUser.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1 ExternalCommandListener.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1 NotificationComponent.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 12102 Dependencies.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 11072 Services.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 3 ServiceGroups.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 3 TimePeriods.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 14 Users.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 4 UserGroups.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1030 Hosts.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 6 HostGroups.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1 IcingaApplication.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 2 NotificationCommands.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 14 Notifications.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 155 CheckCommands.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1 Comment.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 11 ScheduledDowntimes.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1 GraphiteWriter.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1 PerfdataWriter.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1 IdoMysqlConnection.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1 CheckerComponent.
    [2015-12-17 11:00:11 +0100] information/ConfigItem: Instantiated 1 LivestatusListener.
    [2015-12-17 11:00:11 +0100] information/ScriptGlobal: Dumping variables to file '/usr/local/icinga2/var/cache/icinga2/icinga2.vars'
    [2015-12-17 11:00:11 +0100] information/ConfigObject: Restoring program state from file '/usr/local/icinga2/var/lib/icinga2/icinga2.state'
    [2015-12-17 11:00:13 +0100] information/ConfigObject: Restored 22381 objects. Loaded 2061 new objects without state.
    [2015-12-17 11:00:13 +0100] information/ConfigItem: Triggering Start signal for config items
    [2015-12-17 11:00:13 +0100] information/ApiListener: Copying 1 zone configuration files for zone 'mbmif.int.netways.de' to '/usr/local/icinga2/var/lib/icinga2/api/zones/mbmif.int.netways.de'.
    [2015-12-17 11:00:13 +0100] information/ApiListener: Adding new listener on port '5665'
    [2015-12-17 11:00:13 +0100] information/DbConnection: Resuming IDO connection: ido-mysql
    [2015-12-17 11:00:13 +0100] information/LivestatusListener: Created UNIX socket in '/usr/local/icinga2/var/run/icinga2/cmd/livestatus'.
    [2015-12-17 11:00:14 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/_api/mbmif.int.netways.de-1442309540-1/conf.d/downtimes/downtime-test-1!downtime-test!mbmif.int.netways.de-1450346414-1.conf
    [2015-12-17 11:00:14 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/_api/mbmif.int.netways.de-1442309540-1/conf.d/downtimes/downtime-test-0!downtime-test!mbmif.int.netways.de-1450346414-0.conf
    [2015-12-17 11:00:14 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/api/packages/_api/mbmif.int.netways.de-1442309540-1/conf.d/downtimes/downtime-test-6!downtime-test!mbmif.int.netways.de-1450346414-2.conf
    [2015-12-17 11:00:14 +0100] information/ConfigItem: Committing config items
    [2015-12-17 11:00:14 +0100] information/ConfigItem: Committing config items
    [2015-12-17 11:00:14 +0100] information/ConfigItem: Committing config items
    [2015-12-17 11:00:14 +0100] warning/ApplyRule: Apply rule 'satellite-host' (in /usr/local/icinga2/etc/icinga2/conf.d/satellite.conf: 29:1-29:41) for type 'Dependency' does not match anywhere!
    [2015-12-17 11:00:14 +0100] information/ConfigItem: Instantiated 1 Downtime.
    [2015-12-17 11:00:14 +0100] warning/ApplyRule: Apply rule 'satellite-host' (in /usr/local/icinga2/etc/icinga2/conf.d/satellite.conf: 29:1-29:41) for type 'Dependency' does not match anywhere!
    [2015-12-17 11:00:14 +0100] information/ConfigItem: Instantiated 1 Downtime.
    [2015-12-17 11:00:14 +0100] warning/ApplyRule: Apply rule 'satellite-host' (in /usr/local/icinga2/etc/icinga2/conf.d/satellite.conf: 29:1-29:41) for type 'Dependency' does not match anywhere!
    [2015-12-17 11:00:14 +0100] information/ConfigItem: Instantiated 1 Downtime.
    [2015-12-17 11:00:14 +0100] information/ConfigItem: Activated all objects.
    [2015-12-17 11:00:14 +0100] information/ConfigItem: Triggering Start signal for config items
    [2015-12-17 11:00:14 +0100] information/ConfigCompiler: Compiling config file: /usr/local/icinga2/var/lib/icinga2/modified-attributes.conf
    [2015-12-17 11:00:14 +0100] information/ConfigItem: Activated all objects.
    [2015-12-17 11:00:14 +0100] information/ConfigItem: Triggering Start signal for config items
    [2015-12-17 11:00:14 +0100] information/ConfigItem: Activated all objects.
    [2015-12-17 11:00:14 +0100] information/ConfigItem: Triggering Start signal for config items
    Assertion failed: (px != 0), function operator->, file /usr/local/include/boost/smart_ptr/intrusive_ptr.hpp, line 174.
    Process 40149 stopped

    • thread #4: tid = 0xd6d13, 0x00007fff98592002 libsystem_kernel.dylib__pthread_kill + 10, stop reason = signal SIGABRT frame #0: 0x00007fff98592002 libsystem_kernel.dylib__pthread_kill + 10
      libsystem_kernel.dylib`__pthread_kill:
      -> 0x7fff98592002 <+10>: jae 0x7fff9859200c ; <+20>
      0x7fff98592004 <+12>: movq %rax, %rdi
      0x7fff98592007 <+15>: jmp 0x7fff9858cbdd ; cerror_nocancel
      0x7fff9859200c <+20>: retq

    (lldb) bt

    • thread #4: tid = 0xd6d13, 0x00007fff98592002 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT
      • frame #0: 0x00007fff98592002 libsystem_kernel.dylib__pthread_kill + 10 frame #1: 0x00007fff9f1aa5c5 libsystem_pthread.dylibpthread_kill + 90
        frame #2: 0x00007fff99d3b6e7 libsystem_c.dylibabort + 129 frame #3: 0x00007fff99d02df8 libsystem_c.dylib__assert_rtn + 321
        frame #4: 0x00000001041ceecc libicinga.dylibboost::intrusive_ptr::operator->(this=0x0000700000185d40) const + 76 at intrusive_ptr.hpp:174 frame #5: 0x0000000104364775 libicinga.dylibicinga::Checkable::ExecuteCheck(this=0x0000000103867200) + 1365 at checkable-check.cpp:420
        frame #6: 0x0000000104f0923e libchecker.dylibicinga::CheckerComponent::ExecuteCheckHelper(this=0x0000000101f584f0, checkable=0x00000001087df878) + 62 at checkercomponent.cpp:200 frame #7: 0x0000000104f6db9c libchecker.dylibvoid boost::_mfi::mf1 const&>::call, boost::intrusive_ptr const>(this=0x00000001087df860, u=0x00000001087df870, (null)=0x0000000000000000, b1=0x00000001087df878) const + 140 at mem_fn_template.hpp:156
        frame #8: 0x0000000104f6dac1 libchecker.dylibvoid boost::_mfi::mf1 const&>::operator(this=0x00000001087df860, u=0x00000001087df870, a1=0x00000001087df878) >(boost::intrusive_ptr&, boost::intrusive_ptr const&) const + 49 at mem_fn_template.hpp:171 frame #9: 0x0000000104f6da7f libchecker.dylibvoid boost::_bi::list2 >, boost::_bi::value > >::operator(this=0x00000001087df870, (null)=type @ 0x0000700000186498, f=0x00000001087df860, a=0x00007000001864c0, (null)=0) const&>, boost::_bi::list0>(boost::_bi::type, boost::_mfi::mf1 const&>&, boost::_bi::list0&, int) + 111 at bind.hpp:313
        frame #10: 0x0000000104f6d9fc libchecker.dylibboost::_bi::bind_t const&>, boost::_bi::list2 >, boost::_bi::value > > >::operator(this=0x00000001087df860)() + 60 at bind.hpp:893 frame #11: 0x0000000104f6d750 libchecker.dylibboost::detail::function::void_function_obj_invoker0 const&>, boost::_bi::list2 >, boost::_bi::value > > >, void>::invoke(function_obj_ptr=0x0000700000186a90) + 32 at function_template.hpp:159
        frame #12: 0x0000000100f717cb libbase.dylibboost::function0::operator(this=0x0000700000186a88)() const + 123 at function_template.hpp:772 frame #13: 0x000000010112a7f7 libbase.dylibicinga::ThreadPool::WorkerThread::ThreadProc(this=0x00000001011d8608, queue=0x00000001011d84a0) + 2311 at threadpool.cpp:138
        frame #14: 0x0000000101133ffa libbase.dylibboost::_mfi::mf1::operator(this=0x0000000101b11460, t=0x00000001011d8608, a1=0x00000001011d84a0)(icinga::ThreadPool::WorkerThread&, icinga::ThreadPool::Queue&) const + 122 at mem_fn_template.hpp:186 frame #15: 0x0000000101133f4f libbase.dylibvoid boost::_bi::list2, boost::reference_wrapper >::operator(this=0x0000000101b11470, (null)=type @ 0x0000700000186e58, f=0x0000000101b11460, a=0x0000700000186e80, (null)=0), boost::_bi::list0>(boost::_bi::type, boost::_mfi::mf1&, boost::_bi::list0&, int) + 111 at bind.hpp:313
        frame #16: 0x0000000101133ecc libbase.dylibboost::_bi::bind_t, boost::_bi::list2, boost::reference_wrapper > >::operator(this=0x0000000101b11460)() + 60 at bind.hpp:893 frame #17: 0x0000000101133e5c libbase.dylibboost::detail::thread_data, boost::_bi::list2, boost::reference_wrapper > > >::run(this=0x0000000101b11260) + 28 at thread.hpp:116
        frame #18: 0x0000000100082715 libboost_thread-mt.dylibboost::(anonymous namespace)::thread_proxy(void*) + 53 frame #19: 0x00007fff9f1a8c13 libsystem_pthread.dylib_pthread_body + 131
        frame #20: 0x00007fff9f1a8b90 libsystem_pthread.dylib_pthread_start + 168 frame #21: 0x00007fff9f1a6375 libsystem_pthread.dylibthread_start + 13

    (lldb)
    frame #5: 0x0000000104364775 libicinga.dylib`icinga::Checkable::ExecuteCheck(this=0x0000000103867200) + 1365 at checkable-check.cpp:420
    417 bool local = !endpoint || endpoint == Endpoint::GetLocalEndpoint();
    418
    419 if (local) {
    -> 420 GetCheckCommand()->Execute(this, cr, NULL, false);
    421 } else {
    422 Dictionary::Ptr macros = new Dictionary();
    423 GetCheckCommand()->Execute(this, cr, macros, false);

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Dec 17, 2015

Updated by mfriedrich on 2015-12-17 10:03:01 +00:00

  • File added 10830.conf
@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Dec 17, 2015

Updated by mfriedrich on 2015-12-17 10:11:00 +00:00

(lldb) p *this
(icinga::Checkable) $1 = {
  icinga::ObjectImpl = {
    icinga::CustomVarObject = {
      icinga::ObjectImpl = {
        icinga::ConfigObject = {
          icinga::ObjectImpl = {
            icinga::ConfigObjectBase = {
              icinga::ObjectImpl = {
                icinga::Object = {
                  m_References = 10
                  m_Mutex = {
                    m = (__sig = 1297437784, __opaque = "")
                  }
                  m_LockOwner = 0x0000000000000000
                }
              }
              m_DebugInfo = {
                Path = (m_Data = "/usr/local/icinga2/etc/icinga2/tests/10830.conf")
                FirstLine = 7
                FirstColumn = 1
                LastLine = 7
                LastColumn = 27
              }
            }
            m_Package = (m_Data = "_etc")
            m_ZoneName = (m_Data = "")
            m_ShortName = (m_Data = "someservice")
            m_Name = (m_Data = "8183-host!someservice")
            m_Version = 0
            m_Templates = {
              px = 0x00000001080b92f0
            }
            m_Extensions = {
              px = 0x000000010bb99c50
            }
            m_OriginalAttributes = {
              px = 0x0000000000000000
            }
            m_HAMode = HARunOnce
            m_StopCalled = false
            m_PauseCalled = false
            m_ResumeCalled = true
            m_StartCalled = true
            m_Paused = false
            m_StateLoaded = true
            m_Active = true
          }
          m_Zone = {
            px = 0x0000000000000000
          }
        }
        m_Vars = {
          px = 0x0000000000000000
        }
      }
    }
    m_CheckCommandRaw = (m_Data = "somecommand")
    m_CommandEndpointRaw = (m_Data = "")
    m_CheckPeriodRaw = (m_Data = "")
    m_EventCommandRaw = (m_Data = "")
    m_IconImageAlt = (m_Data = "")
    m_IconImage = (m_Data = "")
    m_ActionUrl = (m_Data = "")
    m_NotesUrl = (m_Data = "")
    m_Notes = (m_Data = "")
    m_FlappingThreshold = 30
    m_LastStateChange = 1450346949.2655489
    m_LastHardStateChange = 1450346949.2655489
    m_LastStateUnreachable = 0
    m_RetryInterval = 30
    m_NextCheck = 1450346959.7793479
    m_AcknowledgementExpiry = 0
    m_CheckInterval = 1
    m_FlappingLastChange = 0
    m_LastCheckResult = {
      px = 0x0000000000000000
    }
    m_FlappingNegative = 0
    m_FlappingPositive = 0
    m_AcknowledgementRaw = 0
    m_MaxCheckAttempts = 5
    m_CheckAttempt = 1
    m_StateRaw = ServiceUnknown
    m_LastHardStateRaw = ServiceUnknown
    m_LastStateRaw = ServiceUnknown
    m_LastStateType = StateTypeSoft
    m_StateType = StateTypeSoft
    m_EnablePerfdata = true
    m_EnableFlapping = false
    m_EnableNotifications = true
    m_EnableEventHandler = true
    m_ForceNextNotification = false
    m_Volatile = false
    m_EnablePassiveChecks = true
    m_ForceNextCheck = false
    m_LastInDowntime = false
    m_EnableActiveChecks = true
    m_LastReachable = false
  }
  m_CheckableMutex = {
    m = (__sig = 1297437786, __opaque = "")
  }
  m_CheckRunning = true
  m_SchedulingOffset = 1371622092
  m_Downtimes = size=0 {}
  m_DowntimeMutex = {
    m = (__sig = 1297437786, __opaque = "")
  }
  m_Comments = size=0 {}
  m_CommentMutex = {
    m = (__sig = 1297437786, __opaque = "")
  }
  m_Notifications = size=0 {}
  m_NotificationMutex = {
    m = (__sig = 1297437786, __opaque = "")
  }
  m_DependencyMutex = {
    m = (__sig = 1297437786, __opaque = "")
  }
  m_Dependencies = size=1 {
    [0] = {
      px = 0x0000000109271a80
    }
  }
  m_ReverseDependencies = size=0 {}
}
@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Dec 17, 2015

Updated by mfriedrich on 2015-12-17 12:46:26 +00:00

  • Subject changed from Config parser accepts template for check_command, leading to segfault to Config validation doesn't fail when templates are used as object names
  • Target Version changed from Backlog to 2.4.2

Happens with any object name attribute.

template Host "foo1" {
        check_command = "dummy"
}

object Service "foofoo1" {
        check_command = "dummy"
        host_name = "foo1"
}
@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Dec 17, 2015

Updated by mfriedrich on 2015-12-17 12:50:03 +00:00

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

Applied in changeset 323b759.

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Feb 23, 2016

Updated by gbeutner on 2016-02-23 09:58:31 +00:00

  • Backport? changed from Not yet backported to Already backported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.