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 #8140] Add Check Result List Mutex for NEB modules #1536

Closed
icinga-migration opened this Issue Dec 24, 2014 · 6 comments

Comments

Projects
None yet
1 participant
@icinga-migration
Member

icinga-migration commented Dec 24, 2014

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

Created by jrhunt on 2014-12-24 21:31:47 +00:00

Assignee: jrhunt
Status: Resolved (closed on 2015-01-24 14:50:02 +00:00)
Target Version: 1.13
Last Update: 2015-02-15 01:11:58 +00:00 (in Redmine)


I have attached a patch that provides a new set of functions for registering file descriptors to be closed on fork().

First, a little history:

My team and I have developed a custom event broker module that understands NSCA wire protocol. Unlike the standalone NSCA daemon, this broker bypasses the command pipe and directly injects received results into the check results list. To deal with the inevitable corruption wherein the main thread performs a non-atomic update to the linked-list structure at the same time as our event broker, we had to patch Icinga to protect list access (in both add_check_result_to_list() and read_check_result()) with a mutex.

This is that patch.

Attachments

Changesets

2015-01-24 14:41:20 +00:00 by (unknown) 13c0e2b

Protect Check Results List with a mutex

This will allow other threads (i.e. event brokers) to inject
messages directly into the result queue, without memory corruption problems.

fixes #8140

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>

2015-01-24 14:47:57 +00:00 by (unknown) 99f7339

Update AUTHORS

refs #8139
refs #8140
@icinga-migration

This comment has been minimized.

Member

icinga-migration commented Jan 24, 2015

Updated by mfriedrich on 2015-01-24 14:22:46 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 1.13

Thanks, looks resonable. Applying it for 1.13.

@icinga-migration

This comment has been minimized.

Member

icinga-migration commented Jan 24, 2015

Updated by mfriedrich on 2015-01-24 14:26:06 +00:00

https://github.com/filefrog/icinga-iris

@icinga-migration

This comment has been minimized.

Member

icinga-migration commented Jan 24, 2015

Updated by mfriedrich on 2015-01-24 14:40:54 +00:00

Next time, please send a git formatted patch - yours is malformatted.

git format-patch -1
@icinga-migration

This comment has been minimized.

Member

icinga-migration commented Jan 24, 2015

Updated by mfriedrich on 2015-01-24 14:46:51 +00:00

  • Assigned to changed from mfriedrich to jrhunt
@icinga-migration

This comment has been minimized.

Member

icinga-migration commented Jan 24, 2015

Updated by Anonymous on 2015-01-24 14:50:02 +00:00

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

Applied in changeset 13c0e2b.

@icinga-migration

This comment has been minimized.

Member

icinga-migration commented Feb 15, 2015

Updated by mfriedrich on 2015-02-15 01:11:58 +00:00

  • Subject changed from Check Result List Mutex Patch to Add Check Result List Mutex for NEB modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment