-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
msys2-runtime-devel: Automatic upgrade through update-core fails #373
Comments
Try running the "autorebase.bat" file in your msys2 directory install after a core system update. I personnaly run it after each . |
Thank you for your feedback! However, I don't see how this will resolve the issue with |
Maybe you have running some MSYS2 applications during update? |
Thanks for the hint! My
|
The FWIW, I don't have any daemons running, but I do get the same error with |
This morning
As you can see, the issue remains even if no daemon is running in the background: Upgrading of |
I can't reproduce this:
|
To advance on this issue, is there any easy way to rollback an MSYS2 installation to older versions of the core packages so that it could be more easily tested what other background processes could influence the execution of |
@maehne: What is the value of $PS1 and $PROMPT_COMMAND in your shell? |
Here are the requested values for
|
I think the fact that PS1 runs a subcommand (scm_ps1) is causng problems. I have a similar setup and I always run this before allowing update-core to update things:
In my experience, that is necessary to avoid errors. |
Thank you for this valuable hint! Next time |
If you want to test it sooner, you could always make a fresh, temporary installation of MSYS2 in a new directory and run update-core to reproduce the problem, and then retry it and see if anything changes when you change PS1. That's basically how I narrowed down on the problem. I wanted to figure out how to install MSYS2 properly and I did that experiment until it worked. |
PROMPT_COMMAND to harmless values to avoid this problem: msys2/MSYS2-packages#373 Note that this patch alone is not sufficient to fix the problem; we also have to make sure that update-core gets sourced so that it can modify the environment variables of the user's shell.
This prevents control from returning to the parent shell, which might in turn try to execute commands found inside PS1 and PROMPT_COMMAND. This commit should fix issues like this: msys2/MSYS2-packages#373
Cool. That may be the reason -- I, too, have a git-enhanced prompt. |
With the recent pull requests I made to MSYS2-pacman (see above), this issue should be fixed. |
Dear David, thank you very much for looking into this issue! I can confirm that the endless loop in update-core prevents fork error triggered by my git-enhanced shell prompt. While testing on my side your fix, I just had problems to close the mintty window via the X-button or ALT-F4. The dialog warning of the running process appeared, but clicking OK wouldn't close the window. I needed to force the ending of the I tested this with a new installation from |
Hmm, that's too bad. I was able to close the Window with no issues besides having to click "OK" in the message box that pops up. |
Today, I was first able to test the updated update-core script. with the endless loop to prevent the fork error in an installation, where I didn't have to patch in your modifications myself. The fork error is prevented by the loop. However, closing the mintty window with Alt-F4 or the X-button does not. The warning dialog about running processes appears and clicking "OK" would not close the window. The issue is not resolved by killing ssh-pageant.exe through the task manager. Killing bash.exe yields the fork error and then the window can be immediately closed through either Alt-F4 or the X-button. Maybe, there's a bug in the mintty.exe warning dialog? |
That's too bad. If you could make some minimal steps (that don't involve running pacman) to reproduce the problem then maybe someone will be able to see what is going on and fix it. |
Could be the same underlying issue: git-for-windows/git#545 |
@elieux did you mean git-for-windows/git#537? EDIT: Oops, sorry, I did not realize that a separate bug was reported as a comment to this otherwise unrelated ticket. Sorry for the noise. |
I was able to work around the issue today by running |
The
update-core
script for upgrading the MSYS2 core packages gets systematically stuck reporting fork errors whenmsys2-runtime-devel
is installed and should get upgraded together withmsys2-runtime
: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 already reported this issue a month ago to the MSYS2 bug tracker on SourceForge, but there hasn't been any reaction. It has struck me several times since I started using MSYS in February. It also happened with the old manual upgrade instructions for the core packages from the MSYS2 wiki.
How could this problem be worked around to make
update-core
more robust?The text was updated successfully, but these errors were encountered: