-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Git update sometimes crashes after #585 #591
Comments
This may be related to HaxeFoundation/neko#281, since both started happening when the threads were added in #585. |
I've also been able to reproduce this with hashlink (and previously with hxcpp too). This makes sense as their code is quite similar. It seems that when attempting to create a new lock, It could be a race condition where |
This happens because of the following situation:
So, it turns out #642 would have actually dodged the issue... 😅 The bug can be reproduced more simply with this sample: function main() {
final p = new sys.io.Process("cmd", ["/c", "echo hello world"]);
p.stdin.close();
final streamsLock = new sys.thread.Lock(); // sandwiched between p.stdin.close() and p.close()
p.close();
streamsLock.release();
streamsLock.wait();
} The bug will be fixed by patching neko and hashlink, see: Hxcpp seems to handle this properly, but in my testing I found that some windows api errors are being ignored completely, so that will require further investigation. The other issue, HaxeFoundation/neko#281, remains however, it is not related to this problem and it seems to be an architectural problem with neko. |
Occasionally when running
haxelib update
for a git repository (on Windows), there is a crash.Crash logs
Other times everything is fine:
Seems to only happen during the
git rev-parse HEAD
command. Does not seem to happen on 4.0.3, only on the development branch, which makes sense since 4.0.3 does not usegit rev-parse HEAD
.The text was updated successfully, but these errors were encountered: