The server consumes ~100% CPU on a single core even with zero players connected and not fully starting (the terminal isn't active although ports are opened) #2
Loading…
Reference in New Issue
user.block.title
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root Cause
In Docker, stdin is closed (EOF) by default when
stdin_open: trueis not set.Console.ReadLine()returnsnullimmediately and themain command loop does
continue— creating an infinite busy-loop.Affected file:
src/DiIiS-NA/Program.csProfiling
Diagnosed via /proc filesystem inside the container (no strace/perf needed):
┌─────────┬───────────────────┬──────────────────────────────────────┐
│ Metric │ Value │ Meaning │
├─────────┼───────────────────┼──────────────────────────────────────┤
│ wchan │ 0 │ thread never blocks — always running │
├─────────┼───────────────────┼──────────────────────────────────────┤
│ stime │ constantly rising │ kernel mode — syscalls │
├─────────┼───────────────────┼──────────────────────────────────────┤
│ syscr │ ~1.3M/sec │ read() calls per second │
├─────────┼───────────────────┼──────────────────────────────────────┤
│ rchar │ 33 bytes total │ all reads return EAGAIN/EOF │
└─────────┴───────────────────┴──────────────────────────────────────┘
Fix
Workaround (docker-compose): stdin_open: true keeps stdin open so ReadLine() blocks correctly.