Skip to content

config: Don't treat EPERM as error when signalling

Will Chandler requested to merge wc-prune-reused-pid into master

When pruning Gitaly's runtime directory we send the equivalent of kill -0 <PID> to validate the process has ended. However, if the pid has been reused by the kernel for a process owned by another user we will receive EPERM, causing Gitaly to exit with an error.

On systems where dozens or hundreds of old runtime directories have accumulated over months, the odds of our hitting a reused pid are quite high.

Let's treat EPERM as acceptable in this scenario, as we know that the process we tried to signal can't be Gitaly if it's owned by another user.

Closes #4355 (closed)

Related to gitlab-com/gl-infra/production#7451 (closed)

Edited by Will Chandler

Merge request reports