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 #11484] Overwriting global type variables causes crash in ConfigItem::Commit() #4078

Closed
icinga-migration opened this issue Mar 31, 2016 · 3 comments

Comments

Projects
None yet
1 participant
@icinga-migration
Copy link
Member

commented Mar 31, 2016

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

Created by kowalskimn on 2016-03-31 07:58:46 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2016-03-31 09:45:03 +00:00)
Target Version: 2.4.5
Last Update: 2016-04-20 08:16:05 +00:00 (in Redmine)

Icinga Version: 2.4.4-1
Backport?: Already backported
Include in Changelog: 1

Reloading icinga or running icinga2 daemon -C -X does this :

information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.d/global/usergroup/icingaadmins.conf
information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.d/offsite/hosty/host2.conf
information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.d/offsite/hosty/host1.conf
information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.d/offsite/hosty/offsite.conf
information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.d/offsite/klaster/offsite-cluster.conf
information/ConfigCompiler: Compiling config file: /var/lib/icinga2/api/packages/_api/include.conf
information/ConfigCompiler: Compiling config file: /var/lib/icinga2/api/packages/_api/icinga2-1448621392-1/include.conf
information/ConfigCompiler: Compiling config file: /var/lib/icinga2/api/packages/_api/icinga2-1448621392-1/../active.conf
information/ConfigCompiler: Compiling config file: /var/lib/icinga2/api/packages/_api/icinga2-1448621392-1/conf.d/downtimes/icinga2!load!icinga2-1459382405-1.conf
information/ConfigItem: Committing config items
information/ApiListener: My API identity: icinga2
icinga2: /usr/include/boost/smart_ptr/intrusive_ptr.hpp:162: T* boost::intrusive_ptr::operator->() const [with T = icinga::Type]: Assertion `px != 0' failed.
Caught SIGABRT.
Current time: 2016-03-31 09:52:53 +0200

critical/Application: Icinga 2 has terminated unexpectedly. Additional information can be found in '/var/log/icinga2/crash/report.1459410773.2014771'

icinga2: /usr/include/boost/smart_ptr/intrusive_ptr.hpp:162: T* boost::intrusive_ptr::operator->() const [with T = icinga::Type]: Assertion `px != 0' failed.
Aborted

The related crash log is empty.

The problem cause is as follows in zones.conf :

(...)
object Endpoint "fw.softlayer.instance" {
  Host = "fw.softlayer.instance"
}

object Zone "softlayer" {
  endpoints = [ "fw.softlayer.instance" ]
  parent = "Company"
}

Note the "Host" line. Changing it to "host" fixes the problem. Afaik this kind of error should be caught by the validator, not making it crash.

Changesets

2016-03-31 09:43:16 +00:00 by mfriedrich 027a23f

Fix: Overwriting global type variables causes crash in ConfigItem::Commit()

fixes #11484

2016-04-20 08:07:25 +00:00 by mfriedrich 309ea89

Fix: Overwriting global type variables causes crash in ConfigItem::Commit()

fixes #11484
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Mar 31, 2016

Updated by mfriedrich on 2016-03-31 09:42:43 +00:00

  • Subject changed from syntax error in zones.conf crashes icinga2 at configuration parsing stage to Overwriting global type variables causes crash in ConfigItem::Commit()
  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 2.4.5

You have overwritten the Host object type. In case you create a host object afterwards, this will fail.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Mar 31, 2016

Updated by mfriedrich on 2016-03-31 09:45:03 +00:00

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

Applied in changeset 027a23f.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Apr 20, 2016

Updated by gbeutner on 2016-04-20 08:16:05 +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
You can’t perform that action at this time.