graalvm / setup-graalvm

GitHub Action for setting up GraalVM distributions.
https://www.graalvm.org
Universal Permissive License v1.0
195 stars 28 forks source link

Increase size of pagefile on Windows to avoid linker errors #66

Closed fniephaus closed 9 months ago

fniephaus commented 1 year ago

Native Image builds can sometimes fail on Windows runners with an obscure error:

LNK1171: unable to load mspdbcore.dll (error code: 1455)

Error code 1455 means:

The paging file is too small for this operation to complete.

According to https://github.com/actions/runner-images/issues/785, GitHub action runners use a fixed-size paging file and it appears to be limited to 1.8GB. 7GB of memory plus a 1.8GB paging file may not be enough for some applications to build, especially when there are other processes running, such as Maven, Gradle, and the Windows C linker.

Maybe this action could increase the paging file, for example double the size to 4GB. While this would reduce the available disk size, it would also reduce the likelihood of such errors. There are dedicated actions for adjusting the paging file, such as this one, which illustrates that it's possible to increase the size at run-time.

fniephaus commented 9 months ago

It seems the problem has been fixed in a different way:

For those teams with larger workloads, the new machines offer twice the memory and over 10x the amount of storage than before.

https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/