Commit 452f5081 authored by Nick Thomas's avatar Nick Thomas

Fix the last-ditch memory killer pgroup SIGKILL

parent 106888fb
---
title: Fix the last-ditch memory killer pgroup SIGKILL
merge_request: 25940
author:
type: fixed
...@@ -63,7 +63,7 @@ module Gitlab ...@@ -63,7 +63,7 @@ module Gitlab
sleep(time) sleep(time)
Sidekiq.logger.warn "sending Sidekiq worker PGRP-#{pid} #{signal} (#{explanation})" Sidekiq.logger.warn "sending Sidekiq worker PGRP-#{pid} #{signal} (#{explanation})"
Process.kill(signal, "-#{pid}") Process.kill(signal, 0)
end end
def wait_and_signal(time, signal, explanation) def wait_and_signal(time, signal, explanation)
......
...@@ -54,7 +54,7 @@ describe Gitlab::SidekiqMiddleware::MemoryKiller do ...@@ -54,7 +54,7 @@ describe Gitlab::SidekiqMiddleware::MemoryKiller do
expect(Process).to receive(:kill).with('SIGTSTP', pid).ordered expect(Process).to receive(:kill).with('SIGTSTP', pid).ordered
expect(Process).to receive(:kill).with('SIGTERM', 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 run
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment