Project

General

Profile

Actions

Bug #21100

closed

When cf-serverd starts it can kill an unrelated process

Added by Benoît PECCATTE 9 months ago. Updated 4 months ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Regression:
No

Description

This is due to a race condition in the lock handling:
- cfengine interprocess locks are stored in lmdb
- when cf-serverd starts, it holds a lock and releases it on stop
- when it restarts, it checks this lock and if it expired, it tries to kill the owning process
- sometime with pid turnover, it can be possible that this pid has been reused by another process in the meantime

We should add a check to make sure we only ever kill cfengine processes

Actions

Also available in: Atom PDF