From c19bf8f02bcb8827f85c61f73d742ea878e31b68 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 14 Nov 2026 11:43:32 -0800 Subject: [PATCH] fix(verify): keep TLC's Java temp dir inside its metadir Co-Authored-By: Claude Opus 5.5 --- sh/tlc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sh/tlc.py b/sh/tlc.py index 813b40897b2..f3bf03bb094 100755 --- a/sh/tlc.py +++ b/sh/tlc.py @@ -13,7 +13,9 @@ TLC never removes a metadir it was killed in, and a model's can reach tens of GB, so each run's lives under the checkout's `.tmp/tlc/`, is removed when the run exits, and holds a lock the kernel drops when the run dies, however it -dies. A run first removes every metadir whose lock nobody holds. +dies. A run first removes every metadir whose lock nobody holds. Java's temp +dir points into the metadir too, since the JVM ignores TMPDIR and TLC leaves a +`tlc-` directory there on every run. """ import fcntl @@ -95,7 +97,8 @@ def main(argv): signal.signal(signal.SIGTERM, lambda *_: sys.exit(143)) start, before = time.monotonic(), resource.getrusage(resource.RUSAGE_CHILDREN) try: - command = ["nice", "-n", "19", java, "-Xmx4g", "-XX:+UseParallelGC", "-cp", cp, "tlc2.TLC"] + command = ["nice", "-n", "19", java, "-Xmx4g", "-XX:+UseParallelGC", f"-Djava.io.tmpdir={meta}"] + command += ["-cp", cp, "tlc2.TLC"] command += ["-workers", "4", "-checkpoint", "0", "-cleanup", "-noGenerateSpecTE", "-metadir", str(meta)] status = subprocess.run([*command, *args, spec], cwd=ROOT, pass_fds=(fd,)).returncode except KeyboardInterrupt: