Hang on Windows PowerRegisterSuspendResumeNotification call
I have a Windows Jenkins slave that runs cmake. Most of the time, everything works correctly but sometimes cmake hangs for hours before I have to manually kill the process.
The basic stats of the environment are:
- Windows 10 (64-bit) virtual machine
- Jenkins running as a system service (and so cmake is spawned under this)
- cmake 3.12.0
Using process explorer, I can see that the callstack looks like this:
I did some reverse engineering and found that this is the last instruction to run inside the cmake executable:
This seems to correspond to the uv__register_system_resume_callback
function here:
https://github.com/Kitware/CMake/blob/master/Utilities/cmlibuv/src/win/detect-wakeup.c
Specifically, this line:
(*pPowerRegisterSuspendResumeNotification)(DEVICE_NOTIFY_CALLBACK,
&recipient,
®istration_handle);
The MSDN documentation doesn't mention that this function blocks, however:
Edited by Chris