The update-core script for upgrading the MSYS2 core packages gets systematically stuck reporting fork errors when msys2-runtime-devel is installed and should get upgraded together with msys2-runtime:
$ update-core
==> Update package databases...
:: Synchronizing package databases...
mingw32 209.8 KiB 276K/s 00:01 [#####################] 100%
mingw32.sig 96.0 B 0.00B/s 00:00 [#####################] 100%
mingw64 208.0 KiB 228K/s 00:01 [#####################] 100%
mingw64.sig 96.0 B 0.00B/s 00:00 [#####################] 100%
msys 125.8 KiB 118K/s 00:01 [#####################] 100%
msys.sig 96.0 B 0.00B/s 00:00 [#####################] 100%
==> Checking if there are critical packages to upgrade.
bash 4.3.039-2 -> 4.3.042-1
msys2-runtime 2.2.0.16600.d9b8547-1 -> 2.2.1.16655.6ecd782-2
==> WARNING: You MUST restart MSYS2 to finish core packages update!!!
==> Update core packages...
warning: pacman-4.2.1.6198.439d376-1 is up to date -- skipping
resolving dependencies...
looking for conflicting packages...
Packages (3) bash-4.3.042-1 msys2-runtime-2.2.1.16655.6ecd782-2
msys2-runtime-devel-2.2.1.16655.6ecd782-2
Total Download Size: 7.56 MiB
Total Installed Size: 38.29 MiB
Net Upgrade Size: 20.53 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages ...
msys2-runtime-2.2.1... 2.3 MiB 562K/s 00:04 [#####################] 100%
bash-4.3.042-1-x86_64 1864.6 KiB 578K/s 00:03 [#####################] 100%
msys2-runtime-devel... 3.5 MiB 647K/s 00:05 [#####################] 100%
(3/3) checking keys in keyring [#####################] 100%
(3/3) checking package integrity [#####################] 100%
(3/3) loading package files [#####################] 100%
(3/3) checking for file conflicts [#####################] 100%
(3/3) checking available disk space [#####################] 100%
(1/3) upgrading msys2-runtime [#####################] 100%
(2/3) upgrading bash [#####################] 100%
(3/3) installing msys2-runtime-devel [#####################] 100%
3 [main] bash (5256) C:\msys64\usr\bin\bash.exe: *** fatal error - cygheap base mismatch detected - 0x18031A400/0x18031C400.
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.
0 [main] bash 6500 fork: child -1 - forked process 5256 died unexpectedly, retry 0, exit code 0xC0000005, errno 11
bash: fork: retry: No child processes
1 [main] bash (7128) C:\msys64\usr\bin\bash.exe: *** fatal error - cygheap base mismatch detected - 0x18031A400/0x18031C400.
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.
1018372 [main] bash 6500 fork: child -1 - forked process 7128 died unexpectedly, retry 0, exit code 0xC0000005, errno 11
bash: fork: retry: No child processes
1 [main] bash (4664) C:\msys64\usr\bin\bash.exe: *** fatal error - cygheap base mismatch detected - 0x18031A400/0x18031C400.
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.
3036616 [main] bash 6500 fork: child -1 - forked process 4664 died unexpectedly, retry 0, exit code 0xC0000005, errno 11
bash: fork: retry: No child processes
[...]
Once this error occured, the MSYS2 shell needs to be closed and the MSYS2 installation remains in an inconsistent state. Running update-core again won't finish the msys2-runtime-devel installation part of the core package update process.
I don't think this is related to
msys2-runtime-devel(but could be). The currentupdate-coreshould work fine. Can you confirm?Due there was no reaction to this initial ticket. I also opened the following Github ticket:
https://github.com/Alexpux/MSYS2-packages/issues/373
As it stands, msys-runtime-devel doesn't seem to be the cause of the issue. The fork error occurs when update-core is returning to the shell from which it was called. The recent changes in update-core prevent that to some extend through an endless loop asking to close the terminal window. However, closing the mintty window with Alt-F4 or the X-button does not work. The warning dialog about running processes appears and clicking "OK" will not close the window. A similar issue with mintty has been reported in this ticket: https://github.com/git-for-windows/git/issues/545
As a workaround, I currently run update-core from within a MSYS2 bash shell in ConEmu. The latter accepts closing the terminal window even though the script is still running.
Ah, thank you for the notice. I'll close this ticket then.