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

41
scripts_probe/deltest.py Normal file
View File

@@ -0,0 +1,41 @@
"""Delete an object through ADT while a write on it is running (what happened on 2026-10-05 19:25)."""
import json, sys, threading, time
sys.path.insert(0, "/Users/erhankeseli/projects/abap-llm/harness/scripts_probe")
from lockprobe import *
from killtest import MAIN, tc
def attempt(delay, n, extra=40):
name = "ZPROBE0DL_%03d" % n
with McpClient() as m:
m.call("sap_create_object", {"objectType": "CLAS", "objectName": name, "packageName": "$TMP", "description": "delete race"})
m.call("sap_push_source", {"objectType": "CLAS", "objectName": name, "source": MAIN.format(n=name.lower())})
res = {}
def writer():
with McpClient() as m:
res["t_write_start"] = time.time()
e, t = m.call("sap_push_source", {"objectType": "CLAS", "objectName": name, "includeType": "testclasses", "source": tc(extra)})
res["write"] = t[:260]
res["t_write_end"] = time.time()
th = threading.Thread(target=writer); th.start()
time.sleep(delay)
res["delete_during_write"] = delete_uris(["/sap/bc/adt/oo/classes/" + name.lower()])
th.join()
time.sleep(2)
with McpClient() as m:
res["enqueue"] = read_locks(m)
e, t = m.call("sap_push_element", {"objectType": "CLAS", "objectName": name, "element": "RUN", "source": " METHOD run.\n rv = 2.\n ENDMETHOD.\n"})
res["follow_up"] = t[:200]
e, t = m.call("sap_search_object", {"query": name})
res["still_exists"] = name in t
res["delete_after"] = delete_uris(["/sap/bc/adt/oo/classes/" + name.lower()]) if res["still_exists"] else "n/a"
res["name"], res["delay"] = name, delay
return res
if __name__ == "__main__":
for i, d in enumerate(float(x) for x in sys.argv[1].split(",")):
r = attempt(d, int(sys.argv[2]) + i)
short = {k: v for k, v in r.items() if k not in ("t_write_start", "t_write_end")}
short["enqueue"] = short["enqueue"][:600]
print(json.dumps(short, indent=1))
if "[LOCK]" in r["follow_up"] or "enqueue entries matching the probe prefixes: 0" not in r["enqueue"]:
print("POSSIBLE LEAK at delay", d, r["name"]); break