|Komponente||Checks & Agents|
|Titel||check_mk_agent.linux: fix situation where async plugin is not executed after crash|
|Checkmk Edition||Checkmk Raw Edition (CRE)|
|Kompatibilität||Kompatibel - benötigt kein manuelles Eingreifen|
When executing asynchronous sections or plugins the Check_MK Agent uses run_cached() for putting them in the background. This function creates a cachefile with the extension .new and removes that suffix when the actual plugin has finished. If due to a server crash the file keeps lying around the the plugin would not be executed anymore.
We now remove that file if it is older then twice the cache age and we kill any process that still has open that file. That way we avoid overlapping plugins in case of a real hanger.