Lock leak: controlled reproduction attempts and method (not reproduced), enqueue reader; restart plan for 12 October

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Kral
2026-10-05 19:47:16 +02:00
parent 4432ac896c
commit 59496cb08b
9 changed files with 510 additions and 17 deletions

View File

@@ -0,0 +1,52 @@
"""Two clients both CREATE and WRITE the same table at the same time (two controllers installing the seed of run 200273)."""
import json, os, signal, subprocess, sys, time
sys.path.insert(0, "/Users/erhankeseli/projects/abap-llm/harness/scripts_probe")
from lockprobe import *
from killtabl import DDL
VICTIM2 = r'''
import sys, json
sys.path.insert(0, "/Users/erhankeseli/projects/abap-llm/harness")
from harness.adt_client import load_env; load_env("/Users/erhankeseli/projects/abap-llm/harness/.env")
from harness.mcp_client import McpClient
a = json.loads(sys.argv[1])
m = McpClient().open()
print("SENT", flush=True)
m.call("sap_create_object", {"objectType": "TABL", "objectName": a["objectName"], "packageName": "$TMP", "description": "seed"})
print("CREATED", flush=True)
m.call("sap_push_source", a)
print("DONE", flush=True)
'''
def attempt(delay, n):
name = "ZPROBE0K3_%03d" % n
args = {"objectType": "TABL", "objectName": name, "source": DDL.format(n=name.lower(), w=20 + n)}
ps = [subprocess.Popen([sys.executable, "-c", VICTIM2, json.dumps(args)], stdout=subprocess.PIPE, text=True) for _ in range(2)]
for p in ps:
assert p.stdout.readline().strip() == "SENT"
time.sleep(delay)
states = []
for p in ps:
states.append("finished" if p.poll() is not None else "killed")
try: os.kill(p.pid, signal.SIGKILL)
except ProcessLookupError: pass
p.wait()
time.sleep(3)
out = {"name": name, "delay": delay, "victims": states}
with McpClient() as m:
out["enqueue"] = read_locks(m)
e, t = m.call("sap_push_source", {"objectType": "TABL", "objectName": name, "source": DDL.format(n=name.lower(), w=40 + n)})
out["follow_up"] = t[:300]
e, t = m.call("sap_search_object", {"query": name}); out["exists"] = name in t
out["leak"] = "[LOCK]" in out["follow_up"] or "ZPROBE0K3" in out["enqueue"]
if out["exists"]:
out["delete"] = {k.split("/")[-1]: (v["deleted"], v["msg"]) for k, v in delete_uris(["/sap/bc/adt/ddic/tables/" + name.lower()]).items()}
return out
if __name__ == "__main__":
n = int(sys.argv[2])
for d in (float(x) for x in sys.argv[1].split(",")):
o = attempt(d, n); n += 1
o["enqueue"] = o["enqueue"][:1200]
print(json.dumps(o, indent=1))
if o["leak"]:
print("LEAK at delay", d, "object", o["name"]); break