ValveSoftware / portal2

Issues for the Linux port of Portal 2
145 stars 11 forks source link

Game crashes while loading any level running on CPU with more than 28 logic cores (Windows and Linux) #287

Closed b-desconocido closed 7 years ago

b-desconocido commented 7 years ago

(sorry for my bad English) Sup! There is some nasty TLS-related bug in Portal 2 game which leads to crash while loading any game level. It occurs If your hardware provides more than 28 hardware threads (logical cores). Tested on Windows 10 and Ubuntu 16.04, both operating systems are affected. Setting up affinity mask didnt't help me on Windows, so I used x64dbg: 1) started portal2' debugging 2) set up breakpoint on kernelbase.GetSystemInfo (return from a function) 3) add breakpoint: break condition "0", command text "[[esp+0x4]+0x14]=0x1C", command condition "1" (to tamper SYSTEM_INFO.dwNumberOfProcessors field) 0x1C (28 in decimal) is the highest amount of threads I able to reach without a crash. The default value for my system is 0x20 (32).

This issue might be very annoying - I mean the release of the new HEDT CPUs.

Windows Event Log entry:

Faulting application name: portal2.exe, version: 0.0.0.0, time stamp: 0x5432e000 Faulting module name: datacache.dll, version: 0.0.0.0, time stamp: 0x595442bc Exception code: 0xc0000005 Fault offset: 0x000020e3 Faulting process id: 0x1fec Faulting application start time: 0x01d309390b9bb127 Faulting application path: D:\GAMES\SteamLibrary\steamapps\common\Portal 2\portal2.exe Faulting module path: d:\games\steamlibrary\steamapps\common\portal 2\bin\datacache.dll Report Id: 822f3f6f-cf12-4a78-b7f6-8055c76633bf Faulting package full name: Faulting package-relative application ID:

Hardware:

Cpu: Xeon E5-2683v4 16C/32T RAM: DDR4 96GB ECC, RDIMM GPU: RX470

h1z1 commented 7 years ago

Old bug going back at least to 2015. See #252.

b-desconocido commented 7 years ago

I made simple loader app for windows, maybe its a bit overkill, although affinity wasn't working for me. https://github.com/b-desconocido/portal2start

kisak-valve commented 7 years ago

Hello @b-desconocido, let's track this issue on the existing issue report. Closing as a duplicate.