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 #7324] config parser crashes on unknown attribute in assign #2026

Closed
icinga-migration opened this issue Sep 30, 2014 · 4 comments
Labels
area/configuration DSL, parser, compiler, error handling bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Created by mfrosch on 2014-09-30 14:46:44 +00:00

Assignee: gbeutner
Status: Closed (closed on 2014-10-13 08:32:17 +00:00)
Target Version: 2.2.0
Last Update: 2014-10-29 10:03:33 +00:00 (in Redmine)

Icinga Version: 2.1.1

I noticed the config parser crashing on matching a non-existing attribute in a assign comparsion.

object Host "xxx-host" {
  import "test-generic-host"
  address = "12.3.4"
  vars.agent = "nrpe"
}

apply Service "xxx-service" {
  import "test-generic-service"
  check_command = "ping4"
  assign where host.agent == "nrpe" // wrong definition here
}

The stack trace:

[2014-09-30 16:38:22 +0200] information/ConfigItem: Validating config items (step 1)...
[New Thread 0x7ffff7fb2700 (LWP 8935)]
[New Thread 0x7ffff7f71700 (LWP 8936)]
[New Thread 0x7ffff7f30700 (LWP 8937)]
[New Thread 0x7ffff7eef700 (LWP 8938)]
Caught unhandled exception.
Current time: 2014-09-30 16:38:22 +0200

Application information:
  Application version: v2.1.1-7-g954debf
  Installation root: /tmp/icinga2
  Sysconf directory: /tmp/icinga2/etc
  Run directory: /tmp/icinga2/var/run
  Local state directory: /tmp/icinga2/var
  Package data directory: /tmp/icinga2/share/icinga2
  State path: /tmp/icinga2/var/lib/icinga2/icinga2.state
  Objects path: /tmp/icinga2/var/cache/icinga2/icinga2.debug
  PID path: /tmp/icinga2/var/run/icinga2/icinga2.pid
  Application type: icinga/IcingaApplication


***
* 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://dev.icinga.org/ and include this stack trace as well as any other
* information that might be useful in order to reproduce this problem.
***

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff7f71700 (LWP 8936)]
0x00007ffff520c077 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt

#0  0x00007ffff520c077 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff520d458 in __GI_abort () at abort.c:89
#2  0x00007ffff6f8b567 in icinga::Application::ExceptionHandler () at /home/markus/devel/icinga/icinga2/lib/base/application.cpp:611
#3  0x00007ffff5af4ba6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff5af4bf1 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff5af4e59 in __cxa_rethrow () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff6f5d1c9 in icinga::WorkQueue::DefaultExceptionCallback () at /home/markus/devel/icinga/icinga2/lib/base/workqueue.cpp:120
#7  0x00007ffff6f9700a in boost::detail::function::void_function_invoker1::invoke (function_ptr=..., a0=...) at /usr/include/boost/function/function_template.hpp:112
#8  0x00007ffff6f7406d in operator() (a0=..., this=0x7ffff7f70cc0) at /usr/include/boost/function/function_template.hpp:767
#9  icinga::WorkQueue::WorkerThreadProc (this=0x66b928) at /home/markus/devel/icinga/icinga2/lib/base/workqueue.cpp:166
#10 0x00007ffff7bceaea in ?? () from /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.55.0
#11 0x00007ffff721c0a4 in start_thread (arg=0x7ffff7f71700) at pthread_create.c:309
#12 0x00007ffff52bcc2d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-10-13 08:32:17 +00:00

  • Status changed from New to Closed

  • Target Version set to 2.2.0

    commit 5962330
    Author: Gunnar Beutner
    Date: Fri Oct 10 11:39:03 2014 +0200

      Improve error messages for apply rules
    
      refs #6070
    

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-10-27 15:36:12 +00:00

  • Duplicated set to 7459

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-10-29 10:02:31 +00:00

  • Duplicated set to 7339

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-10-29 10:03:33 +00:00

  • Assigned to set to gbeutner

@icinga-migration icinga-migration added bug Something isn't working area/configuration DSL, parser, compiler, error handling labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.2.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration DSL, parser, compiler, error handling bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant