-
-
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
Precompilation breaks when run as a node.js subprocess #12941
Comments
This may be related to the issues that were being hit in #12519 |
This is preventing Juno 0.4 release, so would be nice to fix it on priority. |
Bump. |
@vtjnash Would be great to have your help here. We are now at 0.4.1 and don't have new Juno binaries yet - which many people are asking for. |
So I managed to narrow this down as far as this line. Changing the redirection to, say, a file, or turning it off, fixes the issue. Obviously there's a deeper issue with the subprocess stuff here, but perhaps we can work around this for now – is there a way to grab the STDERR stream of the subprocess directly? Then we can set up a task to redirect the output. |
I can't reproduce this test case on my mac on 0.4.1 or master. |
Assuming the test case corresponds directly to the Juno issue, this does indeed appear to be resolved on the node.js side in the latest release. Unfortunately, while Electron is at node 4.1.1 (where the issue is also resolved), LT is at 1.6.3 and Atom at 2.3.1. Looking at dropping the newest electron into our LT build now. |
That is fantastic. Looking forward to having Juno for Julia 0.4. People keep asking for it quite frequently! |
Unfortunately, it looks like the original test case was exposing a different issue – I'm still seeing problems and this reproduces them. // test.js
var child_process = require("child_process");
var proc = child_process.spawn('julia4', ['-e', 'using DataFrames; println("success")'])
proc.stdout.on('data', function(data) {
process.stdout.write(data);
});
proc.stderr.on('data', function(data) {
process.stderr.write(data);
});
proc.on('exit', function(data) {
console.log('Exit: ' + data)
})
|
Yes, I can reproduce this one now. |
Definitely seems like some issue with precompiling. See how it only precompiles one dependency at a time for some reason. However, once all have been precompiled, it seems to work fine.
|
the compare: i think we may need to fix this in libuv such that uv_shutdown can distinguish cases where uv_shutdown should be independent of shutdown. @Keno thoughts? |
What is the condition where uv_shutdown is independent of shutdown? |
For now, we can try and have Juno for 0.4 with precompilation turned off (with julia --compile=no). Given the benefits one gets from precompilation, this would definitely be a bit disappointing for users, but perhaps would at least let us get a build of Juno out. If the shutdown issue can be fixed quickly though, we can just wait for that to happen. |
@Keno i think it is only when the stream was the inherited stdio fd |
For backporting to 0.4, note that I've made a separate julia0.4 branch of libuv, I'm concerned some of the libuv changes on master could possibly be responsible for the appveyor hangs we've been seeing. I'll probably just cherry-pick JuliaLang/libuv@030481e to that branch. |
The test that @one-more-minute provided is working as expected now with this fix. Maybe the simplest thing for Juno is to make it available for download once Julia 0.4.2 is released. |
for upstreaming, we will probably need to do something better, but this'll work for our usage for now, so I wanted to just go with the minimal changes so we could get this fixed quickly |
we will also still need to do something for TCP sockets inherited as stdio, shared via IPC, or passed to a child, but that should be rare enough for now (affects all platforms) |
using slightly different libuv branch for release-0.4
Any chance of this being responsible for https://travis-ci.org/JuliaLang/julia/jobs/94244531 (backed up as https://gist.github.com/a964717bd773af7b1ca3 for archival)? |
Precompilation runs successfully (at least for one or two packages at a time) but leaves STDOUT and co broken:
If stdio is not inherited, and Julia has its own pipes, then this error doesn't kill Julia but does cause STDOUT to silently break; printing operations then fail with
write: broken pipe (EPIPE)
.The text was updated successfully, but these errors were encountered: