actions / runner-images

GitHub Actions runner images
MIT License
10.09k stars 3.04k forks source link

Out of memory allocating 65536 bytes #5140

Closed GilesBathgate closed 2 years ago

GilesBathgate commented 2 years ago

Description

I am getting random out of memory errors after switching to windows 2022 #4856 .

If I rebuild with the same workflow the errors sometimes disappear and the build completes, although it can take multiple attempts.

The issue never occurred on windows-2019

g++ -c -fno-keep-inline-dllexport -frounding-math -fprofile-arcs -ftest-coverage -O2 -std=gnu++1y -Wall -Wextra -Wextra -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DUSE_CGAL -DUSE_QGLWIDGET -DUSE_INTEGTEST -DRAPCAD_VERSION=1.0.git.56d6e69 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"D:/a/RapCAD/RapCAD"' -I. -Isrc -IC:/CGAL-5.2/include -IC:/CGAL-5.2/auxiliary/gmp/include -IC:/boost_1_72_0 -I../Qt/5.15.2/mingw81_64/include -I../Qt/5.15.2/mingw81_64/include/QtOpenGL -I../Qt/5.15.2/mingw81_64/include/QtWidgets -I../Qt/5.15.2/mingw81_64/include/QtGui -I../Qt/5.15.2/mingw81_64/include/QtANGLE -I../Qt/5.15.2/mingw81_64/include/QtConcurrent -I../Qt/5.15.2/mingw81_64/include/QtTest -I../Qt/5.15.2/mingw81_64/include/QtCore -Irelease -I. -I/include -I../Qt/5.15.2/mingw81_64/mkspecs/win32-g++  -o release/preferencesdialog.o src/ui/preferencesdialog.cpp

cc1plus.exe: out of memory allocating 65536 bytes

cc1plus.exe: out of memory allocating 65536 bytes
mingw32-make: *** [Makefile.Release:267070: release/beziersurfacemodule.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....
mingw32-make: *** [Makefile.Release:269955: release/preferencesdialog.o] Error 1
Error: Process completed with exit code 1.

Virtual environments affected

Image version and build link

Version: 20220220.1

Is it regression?

No response

Expected behavior

No response

Actual behavior

No response

Repro steps

Compile a project.

al-cheb commented 2 years ago

@GilesBathgate, Try to increase pagefile size - https://github.com/actions/virtual-environments/issues/2642#issuecomment-774988591

GilesBathgate commented 2 years ago

@al-cheb I will try that, but 65536 seems specifically related to this:

Description This error may be seen when compiling large software projects on Windows platforms. cc1plus.exe is a 32bit Windows application and has access to 2GB of memory on Windows.

Resolution To work around this problem, Windows can be configured to allow 32bit applications access to a 3GB address space.

  1. Enable 3GB address space for 32bit applications on Windows: From Windows command prompt run: bcdedit /set IncreaseUserVa 3072
  2. Allow cc1plus.exe to use the larger address space From Windows command prompt run: editbin /LARGEADDRESSAWARE "/cc1plus.exe“ This problem is scheduled to be fixed in a future release of the SoC EDS Software.

https://www.intel.com/content/www/us/en/support/programmable/articles/000086946.html

GilesBathgate commented 2 years ago

@GilesBathgate, Try to increase pagefile size

@al-cheb That seems to have done the trick. My previous comment was in relation to 32bit cc1plus.exe which is not being used.