LightGBM: [r-package] fatal error - cygheap base mismatch detected - 0xF45410/0xF05410 during building R-package with CMake and MSVC
Just occurred in master.
Full logs:
Run $env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE
$env:BUILD_SOURCESDIRECTORY = $env:GITHUB_WORKSPACE
$env:TOOLCHAIN = "MSVC"
$env:R_VERSION = "3.6"
$env:R_BUILD_TYPE = "cmake"
$env:COMPILER = "MSVC"
$env:GITHUB_ACTIONS = "true"
$env:TASK = "r-package"
& "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1"
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". {0}"
env:
_R_CHECK_SYSTEM_CLOCK_: 0
_R_CHECK_CRAN_INCOMING_REMOTE_: 0
_R_CHECK_PKG_SIZES_THRESHOLD_: 100
Downloading R and Rtools
Downloading https://cran.r-project.org/bin/windows/base/old/3.6.3/R-3.6.3-win.exe
Downloading https://github.com/microsoft/LightGBM/releases/download/v2.0.12/rtools35-x86_64.exe
Installing R
Done installing R
Installing Rtools
Done installing Rtools
Installing dependencies
package 'utf8' successfully unpacked and MD5 sums checked
package 'pillar' successfully unpacked and MD5 sums checked
package 'pkgconfig' successfully unpacked and MD5 sums checked
package 'vctrs' successfully unpacked and MD5 sums checked
package 'glue' successfully unpacked and MD5 sums checked
package 'rprojroot' successfully unpacked and MD5 sums checked
package 'rstudioapi' successfully unpacked and MD5 sums checked
package 'diffobj' successfully unpacked and MD5 sums checked
package 'fansi' successfully unpacked and MD5 sums checked
package 'rematch2' successfully unpacked and MD5 sums checked
package 'tibble' successfully unpacked and MD5 sums checked
package 'ps' successfully unpacked and MD5 sums checked
package 'brio' successfully unpacked and MD5 sums checked
package 'callr' successfully unpacked and MD5 sums checked
package 'cli' successfully unpacked and MD5 sums checked
package 'crayon' successfully unpacked and MD5 sums checked
package 'desc' successfully unpacked and MD5 sums checked
package 'digest' successfully unpacked and MD5 sums checked
package 'ellipsis' successfully unpacked and MD5 sums checked
package 'evaluate' successfully unpacked and MD5 sums checked
package 'lifecycle' successfully unpacked and MD5 sums checked
package 'magrittr' successfully unpacked and MD5 sums checked
package 'pkgload' successfully unpacked and MD5 sums checked
package 'praise' successfully unpacked and MD5 sums checked
package 'rlang' successfully unpacked and MD5 sums checked
package 'waldo' successfully unpacked and MD5 sums checked
package 'withr' successfully unpacked and MD5 sums checked
package 'data.table' successfully unpacked and MD5 sums checked
package 'jsonlite' successfully unpacked and MD5 sums checked
package 'Matrix' successfully unpacked and MD5 sums checked
package 'processx' successfully unpacked and MD5 sums checked
package 'R6' successfully unpacked and MD5 sums checked
package 'testthat' successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\runneradmin\AppData\Local\Temp\Rtmpem8ta3\downloaded_packages
Building R package
----- build and install logs -----
* checking for file 'D:/a/LightGBM/LightGBM/lightgbm_r/DESCRIPTION' ... OK
* preparing 'lightgbm':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* looking to see if a 'data/datalist' file should be added
* building 'lightgbm_3.2.1.99.tar.gz'
* installing to library 'D:/a/LightGBM/LightGBM/RLibrary'
* installing *source* package 'lightgbm' ...
** using staged installation
** libs
0 [main] make (3600) C:\Rtools\bin\make.exe: *** fatal error - cygheap base mismatch detected - 0xF45410/0xF05410.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
1 [main] make 4052 fork: child -1 - forked process 3600 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
make: D:/a/LightGBM/LightGBM/RLibrary/R/share/make/winshlib.mk:13: fork: Resource temporarily unavailable
1 [main] make (4720) C:\Rtools\bin\make.exe: *** fatal error - cygheap base mismatch detected - 0xF45410/0xF05410.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
34819 [main] make 4052 fork: child -1 - forked process 4720 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
make: D:/a/LightGBM/LightGBM/RLibrary/R/share/make/winshlib.mk:13: fork: Resource temporarily unavailable
1 [main] make (5092) C:\Rtools\bin\make.exe: *** fatal error - cygheap base mismatch detected - 0xF45410/0xEB5410.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
69024 [main] make 4052 fork: child -1 - forked process 5092 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
make: D:/a/LightGBM/LightGBM/RLibrary/R/share/make/winshlib.mk:13: fork: Resource temporarily unavailable
0 [main] make (5116) C:\Rtools\bin\make.exe: *** fatal error - cygheap base mismatch detected - 0xF45410/0xDF5410.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
102621 [main] make 4052 fork: child -1 - forked process 5116 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
make: fork: Resource temporarily unavailable
ERROR: compilation failed for package 'lightgbm'
* removing 'D:/a/LightGBM/LightGBM/RLibrary/lightgbm'
----- end of build and install logs -----
ERRORs have been found installing lightgbm
Error: Process completed with exit code -1.
This is quite rare error at our CI, but I’ve already seen it multiple times at our GitHub Actions jobs with CMake and MSVC. Also, we have two recorded cases of this error in our repo:
- https://github.com/microsoft/LightGBM/pull/3168#issuecomment-647761537
- https://github.com/microsoft/LightGBM/issues/3469#issuecomment-735407648
I believe it’s time to create a separate issue for it and try to do something. At least to record each case and then measure their frequency and impact on our CI. The main problem here that this error is very rare and we don’t know how to reproduce it, hence we don’t know how to verify a fix.
My initial guess is that we have some conflicts in preinstalled software in GHA Windows image.
I hope that adding some items containing something like cygwin or make into this list
https://github.com/microsoft/LightGBM/blob/48257d45e577df69abbc86542d0515159e524eb2/.ci/test_r_package_windows.ps1#L39-L47
will help to get rid of this error.
cc @jameslamb
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15
02.13.2022
r-package (windows-2016, MSVC, R 3.6, cmake)
11.17.2021
r-package (windows-2016, MSVC, R 3.6, cmake)
10.22.2021
r-package (windows-2016, MSVC, R 3.6, cmake)
Another possible root cause of this error is Windows ASLR.