-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Crash on windows when calling out to juliaup #51461
Comments
Seems to be a problem other people have reported, but not gotten any response on such as microsoft/pylance-release#1118. The first object here is a Windows Store app, and it seems like that corrupts the Job object in the kernel in some way so that it fails on future uses. |
Good point. I've tried with a non-store install of juliaup and then it doesn't crash while it does crash if I replace juliaup with another store app ( Anyhow, even if this is a Windows bug, it seems likely that people will run into it again from time to time, so it would be good to work around the bug. Somehow Python avoids the crash but maybe |
Make sure this handle is functional. The Windows kernel seems to have a bug that if the first use of AssignProcessToJobObject is for a Windows Store program, subsequent attempts to use the handle with fail with INVALID_PARAMETER (87). This is possilby because all uses of the handle must be for the same Terminal Services session. We can ensure it is tied to our current session now by adding ourself to it. We could remove ourself afterwards, but there doesn't seem to be a reason to. Secondly, we start the process suspended so that we can make sure we added it to the job control object before it does anything itself (such as launch more jobs or exit). Fixes: JuliaLang/julia#51461
Most programs don't set up job control to match the unix behavior. The reason might be this restriction in the documentation:
But anyways, despite probably being a kernel bug of some sort, we can work around it: libuv/libuv#4152 |
Make sure this handle is functional. The Windows kernel seems to have a bug that if the first use of AssignProcessToJobObject is for a Windows Store program, subsequent attempts to use the handle with fail with INVALID_PARAMETER (87). This is possilby because all uses of the handle must be for the same Terminal Services session. We can ensure it is tied to our current session now by adding ourself to it. We could remove ourself afterwards, but there doesn't seem to be a reason to. Secondly, we start the process suspended so that we can make sure we added it to the job control object before it does anything itself (such as launch more jobs or exit). Fixes: JuliaLang/julia#51461
I'm not sure whether to blame this crash on julia or juliaup or a combination, but let's start here.This seems likely to be a Windows bug with programs installed from Windows store but it would be good if Julia can work around it.
Reproducer
This assumes juliaup, from Windows store, and git (not from Windows store) are installed. As discussed later neither juliaup nor git are critical.
Crash
Analysis
git
with e.g.cmd /c dir
orping
also crashes.winget
, also crashes.The text was updated successfully, but these errors were encountered: