Issues / #3654

#3654 [Other] A failed test start keeps only the tail of the engine log and destroys the host, server and PID records that show why it failed

open · @njcray2 · 0 comentários · No GitHub

NVIDIA / CUDAWindows

Descrição

### Area

[Other]

### Desktop app, Terminal or source?

Terminal (the `strata` command)

### What happened

While debugging #3605 the deletion of the evidence made the process much harder.

After a failed test start, the only surviving evidence is `.updates\logs\test-start-<version>.log` — the last 64 KiB of the engine's own log ([updater.py:679](#L679)). Everything that would have shown the PID mismatch is in the sandbox profile directory, and [updater.py:758](#L758) removes the sandbox with `shutil.rmtree(longpath.long_path(sandbox))`. I had to run an external watcher that copied those files every 3 s to get them at all; in the successful run they were:

```
run.json                                   1617 B
runtime\updtest.json (host state)           173 B
runtime\updtest-<host_token>.child.json     233 B   (pid the host recorded)
runtime\updtest-<ready_token>.ready.json    294 B   (pid the server published)
runtime\updtest.server.log                 1217 B
runtime\updtest.host.log                      0 B
engine.log                                 6808 B
```

The kept 64 KiB is precisely the part that looks innocent ("the engine loaded, then silence"). Related, in the same failure path: when the host cannot identify its own server child, the shutdown degrades — `runtime.stop` returned `server_stop_deadline_expired`, and the host log recorded `PermissionError: [WinError 32] … smoketest2-<host_token>.child.json` (the marker could not be removed while it was held). Those two lines only exist in the file that was deleted.

### Smallest steps or command that reproduce it

Fail a test start for any reason, then list the components store: `.updates\logs\test-start-*.log` exists, the sandbox directory does not.

### Reproduction status

Reproduced locally (the deletion, and the two stop-path errors).

### Strata version

Strata 0.2.2 · engine 0.1.47

### Graphics card, memory and system

RTX 4070 Ti SUPER 16 GB · 63 GB RAM · Windows 11 x64

### Analysis (optional)

Copy the whole runtime directory (or at least `run.json`, the child marker, the ready record and both logs) into `.updates\logs\test-start-<version>-<n>\` when the test fails, and keep the sandbox until the next successful update. Cheap, and it converts an "engine doesn't respond" report into a diagnosed one.

No site

Links install, modelos, releases.