jline / jline2

Jline 2.x
http://jline.github.com/jline2/
Other
711 stars 183 forks source link

Resource Unavailable exceptions under Ubuntu #298

Closed trptcolin closed 5 years ago

trptcolin commented 5 years ago

Some Leiningen/Clojure users are running into this exception:

IOException Resource temporarily unavailable
    java.io.FileInputStream.readBytes (FileInputStream.java:-2)
    java.io.FileInputStream.read (FileInputStream.java:279)
    java.io.BufferedInputStream.fill (BufferedInputStream.java:252)
    java.io.BufferedInputStream.read (BufferedInputStream.java:271)
    jline.internal.NonBlockingInputStream.run (NonBlockingInputStream.java:294)
    java.lang.Thread.run (Thread.java:834)

Tracked in https://github.com/technomancy/leiningen/issues/2533 and https://github.com/trptcolin/reply/issues/197

It appears to only affect Ubuntu users (mostly, but not all, on 18.04) and it seems to be triggered mostly (possibly always?) by the blink-matching-paren feature (which I implemented in #32).

Since there's a timeout and Thread.sleep there, I suspect a race condition of some kind. I haven't gotten a reproducible case together to investigate yet (I'm on MacOS), but wanted to track this here since it definitely looks like a jline2 issue.

bjaglin commented 5 years ago

Ran into that issue from sbt, and it turns out to be a bad kernel, see https://github.com/sbt/sbt/issues/4547

trptcolin commented 5 years ago

Official LKML/Ubuntu docs:

Ubuntu: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1813873 LKML: https://marc.info/?t=154883032500001&r=1&w=2

Not sure if it's worth trying to build / release a workaround - update your kernels if this affects you? e.g. apt install linux-image-4.15.0-46-generic.

I believe affected kernels (check uname -a if you're not sure) are:

I'll close for now, feel free to reopen if there's debate on whether we want do to a jline release w/ some patch (with maybe retries or something?) for those 2 kernels.