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 #13269] Sending a HUP signal to the child process for execution actually kills it #4801

Closed
icinga-migration opened this issue Nov 21, 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/13269

Created by mfriedrich on 2016-11-21 15:11:50 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2016-11-22 12:55:02 +00:00)
Target Version: 2.6.0
Last Update: 2016-11-22 12:55:22 +00:00 (in Redmine)

Icinga Version: v2.5.4-203-g930a3f1
Backport?: Not yet backported
Include in Changelog: 0

Only reproducible with current git master. Send a HUP signal to $(pidof icinga2) which implicitly sends HUP to the child process executing the checks. There are no signal handlers installed which is why the child process dies. The parent is then not able to decode any json message.

See discussion in https://dev.icinga.org/issues/8900#note-15 and #12940

Proposed solution - mask the signal handlers in child and unmask them before execvpe() for ALRM handlers in plugins.

Caught unhandled exception.
Current time: 2016-11-21 15:46:33 +0100

Application information:
  Application version: v2.5.4-203-g930a3f1
  Installation root: /usr/local/icinga2
  Sysconf directory: /usr/local/icinga2/etc
  Run directory: /usr/local/icinga2/var/run
  Local state directory: /usr/local/icinga2/var
  Package data directory: /usr/local/icinga2/share/icinga2
  State path: /usr/local/icinga2/var/lib/icinga2/icinga2.state
  Modified attributes path: /usr/local/icinga2/var/lib/icinga2/modified-attributes.conf
  Objects path: /usr/local/icinga2/var/cache/icinga2/icinga2.debug
  Vars path: /usr/local/icinga2/var/cache/icinga2/icinga2.vars
  PID path: /usr/local/icinga2/var/run/icinga2/icinga2.pid

System information:
  Platform: Mac OS X
  Platform version: 10.12.1
  Kernel: Darwin
  Kernel version: 16.1.0
  Architecture: x86_64

Build information:
  Compiler: Clang 8.0.0.8000042
  Build host: mbmif.int.netways.de

Error: parse error: premature EOF

                     (right here) ------^


        (0) 2   libbase.2.5.4.dylib                 0x0000000101cfec37 __cxa_throw + 263
        (1) 3   libbase.2.5.4.dylib                 0x0000000101c4bd1e _ZN5boost15throw_exceptionINS_16exception_detail19error_info_injectorISt16invalid_argumentEEEEvRKT_ + 110
        (2) 4   libbase.2.5.4.dylib                 0x0000000101c4bc89 _ZN5boost16exception_detail16throw_exception_ISt16invalid_argumentEEvRKT_PKcS7_i + 185
        (3) 5   libbase.2.5.4.dylib                 0x0000000101d413a7 _ZN6icinga10JsonDecodeERKNS_6StringE + 679
        (4) 6   libbase.2.5.4.dylib                 0x0000000101d869ce _ZL12ProcessSpawnRKNSt3__16vectorIN6icinga6StringENS_9allocatorIS2_EEEERKN5boost13intrusive_ptrINS1_10DictionaryEEEPi + 1502
        (5) 7   libbase.2.5.4.dylib                 0x0000000101d85f3e _ZN6icinga7Process3RunERKN5boost8functionIFvRKNS_13ProcessResultEEEE + 510
        (6) 8   libbase.2.5.4.dylib                 0x0000000101bfb32d _ZN6icinga11Application18StartReloadProcessEv + 1741
        (7) 9   libbase.2.5.4.dylib                 0x0000000101bfa9a8 _ZN6icinga11Application12RunEventLoopEv + 888
        (8) 10  libicinga.2.5.4.dylib               0x00000001029b42aa _ZN6icinga17IcingaApplication4MainEv + 1386
        (9) 11  libbase.2.5.4.dylib                 0x0000000101c00c82 _ZN6icinga11Application3RunEv + 674
        (10) 12  libcli.2.5.4.dylib                  0x000000010104f51a _ZNK6icinga13DaemonCommand3RunERKN5boost15program_options13variables_mapERKNSt3__16vectorINS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEENSB_ISD_EEEE + 9146
        (11) 13  icinga2                             0x0000000100cf98f2 _Z4Mainv + 28178
        (12) 14  icinga2                             0x0000000100cfb5cd main + 285
        (13) 15  libdyld.dylib                       0x00007fffbb41a255 start + 1


***
* 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.
***
Failed to launch GDB: No such file or directory

Changesets

2016-11-22 12:53:58 +00:00 by gbeutner 78fa197

Properly unmask signals for child processes

fixes #13269

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-11-21 15:12:01 +00:00

  • Relates set to 8900

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-11-21 15:12:07 +00:00

  • Relates set to 12940

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-11-22 12:55:02 +00:00

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

Applied in changeset 78fa197.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-11-22 12:55:22 +00:00

  • Assigned to set to gbeutner
  • Include in Changelog changed from 1 to 0

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-11-22 16:20:52 +00:00

  • Relates set to 13173

@icinga-migration icinga-migration added bug Something isn't working libbase 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