You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2026/09/29 07:02:40 UTC
(couchdb) branch main updated: Escalate to SIGKILL in dev/run teardown
This is an automated email from the ASF dual-hosted git repository.
big-r81 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/main by this push:
new 0c6a10cfb Escalate to SIGKILL in dev/run teardown
0c6a10cfb is described below
commit 0c6a10cfba917efcaaa39e80300789f10f8f6266
Author: readyprompt <sh...@protonmail.com>
AuthorDate: Mon Sep 28 22:11:44 2026 -0500
Escalate to SIGKILL in dev/run teardown
A deadlocked Clouseau node can ignore SIGTERM (its JVM shutdown hook
wedges), leaving it holding its epmd node name and poisoning the next
make retry. After SIGTERM, wait a short time for each process to exit,
then SIGKILL any survivor so the node name is released.
---
dev/run | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/dev/run b/dev/run
index 3b13bb628..e5114c928 100755
--- a/dev/run
+++ b/dev/run
@@ -1031,7 +1031,8 @@ def startup(ctx):
def kill_processes(ctx):
- for proc in ctx["procs"]:
+ procs = ctx["procs"]
+ for proc in procs:
if proc and proc.returncode is None:
if os.name == "nt":
sp.call(
@@ -1039,6 +1040,23 @@ def kill_processes(ctx):
)
else:
proc.terminate()
+ # A deadlocked Clouseau can ignore SIGTERM (its JVM shutdown hook wedges), which
+ # leaves it holding its epmd node name and poisons the next `make` retry. Give
+ # each process a short grace period to exit on SIGTERM, then SIGKILL any survivor.
+ if os.name != "nt":
+ deadline = time.time() + 5
+ for proc in procs:
+ if proc and proc.returncode is None:
+ try:
+ proc.wait(timeout=max(0.0, deadline - time.time()))
+ except sp.TimeoutExpired:
+ pass
+ for proc in procs:
+ if proc and proc.poll() is None:
+ try:
+ proc.kill()
+ except OSError:
+ pass
ctx["procs"] = []