1

So I was fiddling some code in jshell, but it started crashing when I pressed Tab.

int[] a = new int[]{1, 2, 5, 0, -1}

In my next statement, when I type A-r-r-a, then (Tab) to autocomplete to Array and get options, it crashes with

Error on input: java.io.IOException: Resource temporarily unavailable

Does anyone know how to fix this?

EDIT: I'm using Elementary OS Juno. It is a distro based on Ubuntu 18.04

youneverknow
  • 137
  • 2
  • 8
  • Just curious, what is *`Arra -> (Tab)`* here? Is there a important tag missing? – Naman Feb 25 '19 at 03:58
  • It's my typing sequence. A-r-r-a followed by Tab for autocomplete. It should autocomplete to Array and show me my options, and it does sometimes without crashing, but it always crashes eventually when I inevitably have to hit Tab for information. I edited my body, so hopefully it's clearer now – youneverknow Feb 25 '19 at 11:47
  • that's a full buffer – aran Feb 25 '19 at 11:53
  • I'm sorry, I don't know what that means @AsierAranbarri – youneverknow Feb 25 '19 at 16:20
  • Getting the same issue on openjdk 11 – Wes Feb 28 '19 at 14:58
  • I just started seeing this happening today on an openjdk9 install that I've had for quite some time. I can reproduce it just by typing `"x".length` and hitting tab - it will add the `()` for me, but also terminate with the above "Resource temporarily unavailable" message. The fact that this just started happening on an existing JDK install suggests something has changed outside of the jdk (I'm running Ubuntu 16.04.3 LTS). – Ian Robertson Mar 01 '19 at 00:30
  • I'm running Elementary OS, a distro based on Ubuntu 18.04 and jdk-10. – youneverknow Mar 01 '19 at 02:01
  • It seems this happens if I'm running linux kernel 4.15.0-45, but not if I'm running 4.15.0-43 – Ian Robertson Mar 01 '19 at 16:32
  • Oh good. At least I'm not the only one getting this issue >.< Very annoying problem as I have a habit of hitting the tab key for autocomplete suggestions fairly frequently. (UNAME: `Linux ...4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64... GNU/Linux`) – Spencer D Mar 02 '19 at 20:35

1 Answers1

2

I believe this may be a result of https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1813873, which says that is missing the second of two patches, and

This second patch is required to prevent a rather serious regression where userspace applications reading from stdin can receive EAGAIN when they should not.

(Note the EAGAIN is "Resource temporarily unavailable"). I can reproduce this jshell bug when running kernel 4.15.0-44 or 4.15.0-45, but not when running 4.15.0-43. If my skimming of the aforementioned bug ticket is accurate, it seems that a new kernel version with the patch applied should be released on March 4.

Ian Robertson
  • 1,312
  • 1
  • 13
  • 14