-
Notifications
You must be signed in to change notification settings - Fork 140
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
Using Data.Text.IO.readFile throws intermitent java.nio.channels.ClosedByInterruptException #915
Comments
I've observed similar spurious exceptions when running a load test against any Eta web framework. This is most likely due to the Eta RTS's usage of |
When reproducing on my system, I got the following:
and
and
|
I have verified that the above test results are reproducible. I'll look into them one by one. |
Yeah, i've got those result too:
|
Ok to be clear, which tests are a problem with Eta itself? |
For now errors caused by |
Tracked down the exception and pushed a fix to master. Couldn't reproduce the resource busy exception - probably has to do with file handles not being closed properly. Will need to try it out on a windows system. |
Great! I am afraid that the test suite now hangs, only in circleci https://circleci.com/gh/eta-lang/dhall-eta/29 😟 |
Can you re-run it with SSH and share the output of |
It seems jstack doesnt work: root@612f58a556a0:~# jps -l
16929 sun.tools.jps.Jps
13618 eta.main
root@612f58a556a0:~# jstack 13618
13618: Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding
root@612f58a556a0:~# jstack 13618 -F
Attaching to core -F from executable 13618, please wait...
Error attaching to core file: cannot open binary file
sun.jvm.hotspot.debugger.DebuggerException: cannot open binary file
at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.attach0(Native Method)
at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.attach(LinuxDebuggerLocal.java:286)
at sun.jvm.hotspot.HotSpotAgent.attachDebugger(HotSpotAgent.java:673)
at sun.jvm.hotspot.HotSpotAgent.setupDebuggerLinux(HotSpotAgent.java:611)
at sun.jvm.hotspot.HotSpotAgent.setupDebugger(HotSpotAgent.java:337)
at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:304)
at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:156)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:191)
at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.tools.jstack.JStack.runJStackTool(JStack.java:140)
at sun.tools.jstack.JStack.main(JStack.java:106) Same error after |
Strangely i can see dhall cache files produced by tests i cant see in the log 🤔 root@612f58a556a0:~# ls .cache/dhall
47a62403bcd28107cb0a99b05fc4d8bc73f06277c422d059ba9efdd50307abbc
cf1692707b5330f532768bcbaa7795ee56bf8b74431d063abb8435df77825015
d36b3384c6e0dc1837f5740b14eb20b1c51de1cb16a8008ee577d7d8f7ea115e |
@rahulmutt in the bright side, with master version of eta, both error about files ( |
Awesome to hear that the fix worked. So we just need to figure out how to debug the hanging on CircleCI. |
While I can't say why it would take 10 mins to execute w/o output, perhaps adding a longer timeout will give some clue? |
Mmm, it doesn't should take so many time but i'll try to increase the timeout to test it |
|
Ok, i've resolved the hang:
Now maybe we should investigate why the java process is using that excessive amount of memory... |
Great sleuthing @jneira! :) Facing something similar with Thunk clearing is a GC optimization that clears out the free variables of a thunk once it's been evaluated since the thunk doesn't need to be evaluated anymore. The long-term fix for this so that we can enable it by default again is to change the code generation for thunks a little bit that passes in free variables as an argument. This code generation change should make switching over to invokedynamic much easier as well. Since the original issue at hand is resolved, can we continue the discussion in a new thread about memory usage? |
Yeah, only left the intermitent |
Yes, please file that in a new issue as well. As a tip for debugging exceptions like that:
It'll dump ALL exceptions including those that have been caught in between and re-thrown. Extremely useful when you want to know what's really going on, and can potentially generate huge files. |
Filed specifics issues about windows error and excessive memory allocation |
Description
dhall-eta
tests reads lot of dhall files usingData.Text.IO.readFile
and some of the calls throwsjava.nio.channels.ClosedByInterruptException
Expected Behavior
All files should be readed correctly
Actual Behavior
Some of the calls throws:
In windows i get occasionally
Possible Fix
Not sure where the bug can be fixed.. to investigate
Steps to Reproduce
dhall-eta
like https://circleci.com/gh/eta-lang/dhall-eta/13dhall-eta
and runetlas test
in localContext
Setup test suite for
dhall-eta
Your Environment
The text was updated successfully, but these errors were encountered: