-
Notifications
You must be signed in to change notification settings - Fork 586
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
Process.fromRawCommand combined with redirectOutput hangs without success. #2401
Comments
Apparently something doesn't work as it should. Best case would be to have a standalone way to reproduce in order to debug this. As you already noticed that it works on another machine I wouldn't be surprised if it works on my machine as well.
The relevant code path is this: https://github.com/fsharp/FAKE/blob/921f1973c9f1f1b3d7ce14ef4cc4282b4e0b83ef/src/app/Fake.Core.Process/RawProc.fs#L184 |
@matthid yeah, i'll return to this issue a little bit later, when i'll have time. Thanks for insights, i'll try to debug it. |
I tried to reproduce but was unable to do so. I added some environment variables so in the next release you can set the environment variable |
@matthid Thank you, will do it |
@serjebulavsky You can use 5.16.2-alpha.1304 |
Any updates on this? |
Tried with
|
Sorry, i didn't specified additional output in the first message in the issue, full output looks like this, if it can help somehow:
So basically kill on timeout doesn't work because it cannot find this process. And i don't have a possibility to debug it currently, sorry. |
Thanks, is this the full output with latest including the environment variables I suggested above? |
@matthid Yes, this is all
|
Ok, as you have no more time to debug, can you at least attach the debugger and somehow send me a full dump of the process (as I might be able to debug with it (if you can send me along the lockfile for the exact nuget versions you used)? |
okay thanks, i will do it a little bit later :) |
@matthid Hello, i've tried to reproduce it today to create a dump for you, but for some reason it stopped hanging. I haven't updated anything from yesterday (yesterdays evening it was reproducable), altough i have a small minidump from yesterday, i will send it to you. |
@serjebulavsky Thanks for sending the dump, sadly I couldn't see any more information in the dump besides something obvious - that there is some other thread still hanging in "ReadFile" (to read the pipe of stdout of the process):
Not sure why it would hang there when the process is already closed. Not sure what to do when you yourself cannot even reproduce it anymore. Being able to reproduce it somehow is still preferred, it is not that unlikely that there is an edge case somewhere and I'm not seeing it. Starting processes in .net is surprisingly difficult to do correctly (which is the main reason for our own API). |
@matthid Today it is reproducable again. I've tried to change number of vulnerable libraries in package.json (which leads to drastically decreased size of output), but no success, still hanging. Maybe you have other ideas or requests that i can try to do on my pc. Unfortunately right now (for a week at least) i just don't have enough time to deeply dive into it and debug it myself, sorry. |
So your current workaround is to just "try again" I assume? |
@matthid no, i decided to work with built-in Npm helper audit command, without reading output, just the error code. For some reason npm helper doesn't provide output. It would be great if you will provide info on how to do it, thanks :) |
I still have not been able to reproduce this in any scenario. To track this down further I need the following:
Let me know if you encounter difficulties. Probably not useful and takes a long timeAdditionally the following might help:
|
There has not been any activity in this issue for the last 3 months so it will be closed in 14 days if there is no activity. |
Description
Goal, that i'm trying to achieve is to parse
npm audit
output and do some stuff with it. UnfortunatelyNpm.exec "audit"
just fails with exception without output, so i've switched toCreateProcess.fromRawCommand
approach.Repro steps
I have this code:
Expected behavior
On pc's of some of my colleagues it works fine and everything is finished without any problems.
Actual behavior
On my same windows pc it hangs because of redirectOutput (tried to remove it - after that code works fine.)
In case of redirectOutput presented, execution log looks like this:
Related information
fake --version FAKE 5 - F# Make (5.16.1) (this line is written to standard error, see https://github.com/fsharp/FAKE/issues/2066) FakePath: C:\Users\someUser\.dotnet\tools\.store\fake-cli\5.16.1\fake-cli\5.16.1\tools\netcoreapp2.1\any\Fake.Runtime.dll Paket.Core: 5.216.0
The text was updated successfully, but these errors were encountered: