re: the frozen wait-object capture, and screen_id was never a freeze test

Caught the freeze by waiting for the event (frozen.py + in_flight) instead of
sleeping a guessed interval; freeze_waitobj.sh splits into boot/watch so the
wait is not capped by one Bash call. Verified hard: a frame minutes later is
byte-identical to the capture.

Healthy vs frozen, same run: 20 -> 24 wait frames, XEvent 19 -> 23,
XSemaphore 8 -> 7. The signature is per-thread -- 17 of 24 threads sit on the
exact object they were on, four previously-running threads park, and T74/T75
move off a semaphore onto an event. So the freeze is not a whole-emulator stall.

Also corrects the previous entry's test: screen_id reads 'flight' during a
freeze by design, which is why frozen.py exists. Re-testing the saved frames
says that run was genuinely healthy, but it was right by luck.

heavy_read.py added to test whether the instrument provokes the freeze: I/O is
free (371 MB in 0.1s, page cache), the cost is Python-level CPU. One data point
-- 670s clean, then frozen 54s after the inducer started -- recorded as n=1, not
as causation.
This commit is contained in:
Sylpheed RE agent
2026-08-25 09:02:48 +00:00
parent 93ccff50bb
commit 6900ebe5ca
5 changed files with 285 additions and 43 deletions

View File

@@ -70,6 +70,27 @@ def report(tag):
print(' %-45s %d' % (k, c))
return tally
def per_thread(tag):
d = {}
for r in parse(tag):
live = []
for s_ in r['slots']:
if s_ is None: break
live.append(s_.replace('xe::kernel::', ''))
d[int(r['th'])] = '%s(%s)' % (r['kind'], ','.join(live))
return d
def diff_threads(a, b):
"""The tally alone hides the signature -- WHICH thread moved is the result."""
x, y = per_thread(a), per_thread(b)
print('=== per-thread %s -> %s ===' % (a, b))
print(' %-6s %-32s %-32s' % ('thread', a, b))
for t in sorted(set(x) | set(y), reverse=True):
fa, fb = x.get(t, '--'), y.get(t, '--')
print(' T%-5d %-32s %-32s %s' % (t, fa, fb, '' if fa == fb else ' <-- CHANGED'))
if __name__ == '__main__':
tallies = {t: report(t) for t in (sys.argv[1:] or ['healthy'])}
if len(tallies) > 1:
@@ -79,3 +100,4 @@ if __name__ == '__main__':
for k in sorted(keys):
x, y = tallies[a][k], tallies[b][k]
print(' %-45s %3d -> %-3d %s' % (k, x, y, '' if x == y else ' CHANGED'))
diff_threads(a, b)