-
Notifications
You must be signed in to change notification settings - Fork 126
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
dependency resolution fails on travis ci and within docker containers #55
Comments
I was getting hangs running locally. n.b. You have to consume both streams in different threads or combine them. This is a nice library if you want to do something with the output. e.g. collect and show to the user if it fails. |
Great to get some feedback on that problem! I tried already to narrow down its cause, and failed. Scary to hear that this also happens locally. For me so far just within docker (and via docker also in travisci). Why would both streams need to be processed in different threads? I always thought when using zt-exec looks cool, but I'm not sure if this would solve this ticket. Before rewriting kscript to use it, I'd love to understand what's causing the problem. |
n.b. I didn't debug this locally, but was getting consistent hangs (I could see a temporary spike in network activity) when maven was actually downloading results and therefore logging. I ran maven with the generated pom once and it completed the download, then I no longer got hangs when running kscript. n.b. the reason for needing threads or combining the output is that you have two piped streams to the forked command. pipes have a limited capacity and if the writer writes too much it blocks. Think about something like "cat 1gbfile.txt | nc". With two streams stderr and stdout used, you have to read both otherwise the command you exec could hang. |
Indeed, hitting the piped stream's capacity limit seems the most reasonable explanation. I'm working on a fix now. Luckily that fix will also solve #23 which is pretty related to this ticket and easy to fix once we have better control over the spawned process out/err streams. |
Thanks for input again. Fixed in today's v2.2 release. |
See https://travis-ci.org/holgerbrandl/kscript
It seems related to the stream-redirection settings used in
runProcess()
The text was updated successfully, but these errors were encountered: