Fix the last-ditch memory killer pgroup SIGKILL

This commit is contained in:
Nick Thomas 2019-03-09 12:30:19 +00:00
parent 106888fb51
commit 452f508143
No known key found for this signature in database
GPG Key ID: 2A313A47AFADACE9
3 changed files with 7 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
title: Fix the last-ditch memory killer pgroup SIGKILL
merge_request: 25940
author:
type: fixed

View File

@ -63,7 +63,7 @@ module Gitlab
sleep(time)
Sidekiq.logger.warn "sending Sidekiq worker PGRP-#{pid} #{signal} (#{explanation})"
Process.kill(signal, "-#{pid}")
Process.kill(signal, 0)
end
def wait_and_signal(time, signal, explanation)

View File

@ -54,7 +54,7 @@ describe Gitlab::SidekiqMiddleware::MemoryKiller do
expect(Process).to receive(:kill).with('SIGTSTP', pid).ordered
expect(Process).to receive(:kill).with('SIGTERM', pid).ordered
expect(Process).to receive(:kill).with('SIGKILL', "-#{pid}").ordered
expect(Process).to receive(:kill).with('SIGKILL', 0).ordered
run
end