mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 18:25:35 -04:00
aa536b899c
The two pre-fix attract-idle 'degradations' (2026-06-10 dumps ...393 and ...707) were observer interference, not guest bugs: - both wedge dumps show 8/8 main-thread stack samples inside WS2_32!send (same call site) — the main-thread-pumped server blocked sending to a trickle-draining client, throttling the loop to ~6 fps; - the 'frame counter reset to 0' was a second process instance (no reset path exists for s_frame_count or psx_cycle_count; dump ...707 has lower cycles than ...393); - the 'kernel-only dispatch loop' signature (0xB0/0x650, restore target 0x80068024, EPC 0x80000048, dispatch_count 0) is the normal Tomba title-attract idle pattern — identical in a healthy 60-min post-fix soak. Fix the loophole and make recurrence self-evident: - send_all_blocking gains a 15 s TOTAL budget per response (the 2 s SO_SNDTIMEO only bounded zero-progress chunks; a slow-but-alive client could throttle the emulator indefinitely while heartbeating the starvation watchdog). Over budget -> client dropped, runtime unharmed. - cumulative tcp_send_stall_ms + tcp_clients_dropped exported in the freeze heartbeat (top level + per-tick ring 'tcp_ms') and in every wedge/fatal dump header, so a TCP-throttled window is attributable at a glance. Documented in TCP_COMMANDS.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>