Prevent recurrence of 2026-04-16 incident where a leaked asm HTTP server grew to 19.3 GB RSS and crashed the machine. examples/http-server.lsp: - Adds *max-requests* = 50000 hard ceiling. Server self-terminates before unbounded heap growth reaches dangerous levels. - Loop tracks request count, exits cleanly + closes server socket. tests/web-benchmark.sh: - SPAWNED_PIDS array tracks every background process. - EXIT/INT/TERM trap kills them all (SIGTERM then SIGKILL). - stop_server does SIGTERM with 500ms grace period then SIGKILL. - Final straggler check via pgrep narrows to actual HTTP server processes (not shell/tmux with "uncommonlisp" in the name). - pkill -9 fallback as belt-and-suspenders. CLAUDE.md: - New "Asm memory discipline" section documents the bump allocator leak behavior and the required operational discipline. - Test counts updated (571 py + 83 c + 132 asm + 189 shared = 975). |
||
|---|---|---|
| .. | ||
| fibonacci.lsp | ||
| generator.lsp | ||
| http-server.lsp | ||
| mergesort.lsp | ||
| objects.lsp | ||
| portal-prime.lsp | ||