portal2
portal2 copied to clipboard
Portal 2 crashes with too many cores
When the game starts, it dumps this to the terminal:
Out of thread ids. Decrease the number of threads or increase MAX_THREAD_IDS
And then immediately quits, without ever displaying any window.
The problem seems to be a hardcoded limit on the number of threads of 128, which breaks when the game spawns one thread per hardware thread on a 64C/128T processor.
It runs fine if I disable seven cores first:
# echo 0 > /sys/devices/system/cpu/cpu{121..127}/online
Disabling just one core makes the game start, but then it segfaults when the menu opens. Disabling six cores makes the menu work. Disabling seven makes the rest of the game work too.
It seems entirely fitting with the story line of Portal that I need to remove some cores from the machine to appease GLaDOS, but it's also somewhat inconvenient. ;)
(I reported this first through the support button in Steam, but then I just got a reply with "instructions on how to make sure your version of Windows is fully updated", and found this repository instead. :) )