-
Notifications
You must be signed in to change notification settings - Fork 92
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
forkProcess fails with +RTS -N #62
Comments
I confirm that this indeed happens. Running programs that contain
This is not deterministic; sometimes it happens, sometimes it doesn't. As mentioned in 9f0c96e, shared resources also stumble. I try to create pipes with
I'd be very grateful if anyone can look into this. |
since it was @simonmar who removed that comment, he may know more about... |
It looks like this error will be produced if
Could either of those be the case? |
@simonmar I think it's not because we're reaching any kind of system-imposed limit, because the program has no problem with Doing the work of forking and pipe duping in the FFI actually solves this problem. This is how the I'll try to come up with a smaller example to reproduce this when I have the time. |
I believe I've hit the same issue except I don't see any exceptions, |
I don't know enough about RTS to look into this. However, a proper reproducer would be a start. Until then, maybe we should just restore the warning from 05eea1e (or some variation of it) @hs-viktor ? |
A reproducer would indeed be helpful. The immediate observations are:
I guess we could warn users to avoid this function in multi-threaded programs, beyond that, it is not clear what |
haskell/unix#62 Signed-off-by: Miezhiko <[email protected]>
I have a program in which I use
forkProcess
. When it is run with-threaded +RTS -N1
, it works fine, but when I use-threaded +RTS -N2
I get this error:I haven't been able to reproduce this issue in a small test case, only within the larger program. To provide some context though, it' called only from the following function:
GHC Version: 7.10.3
unix version: 2.7.1.0
OS: Ubuntu 16.04
The text was updated successfully, but these errors were encountered: