-
Bug
-
Resolution: Fixed
-
P3
-
11.0.10, 15, 16, 17
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8262754 | 11.0.11 | Ichiroh Takiguchi | P3 | Resolved | Fixed | b05 |
Following exception was displayed when I executed jshell command by using standard user on AIX with Japanese locale.
(Japanese characters were changed to \uXXXX style on this report)
================================
$ ./jshell
| JShell\u3078\u3088\u3046\u3053\u305d -- \u30d0\u30fc\u30b8\u30e7\u30f315.0.2
| \u6982\u8981\u306b\u3064\u3044\u3066\u306f\u3001\u6b21\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: /help intro
Exception in thread "main" java.io.IOError: java.io.IOException: Unable to parse columns
at jdk.internal.le/jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal.getSize(AbstractPosixTerminal.java:62)
at jdk.internal.le/jdk.internal.org.jline.terminal.Terminal.getBufferSize(Terminal.java:216)
at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.doDisplay(LineReaderImpl.java:741)
at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.<init>(LineReaderImpl.java:298)
at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext$2.<init>(ConsoleIOContext.java:133)
at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.<init>(ConsoleIOContext.java:133)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:978)
at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.start(JShellToolBuilder.java:254)
at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:120)
Caused by: java.io.IOException: Unable to parse columns
at jdk.internal.le/jdk.internal.org.jline.terminal.impl.ExecPty.doGetInt(ExecPty.java:278)
at jdk.internal.le/jdk.internal.org.jline.terminal.impl.ExecPty.doGetSize(ExecPty.java:263)
at jdk.internal.le/jdk.internal.org.jline.terminal.impl.ExecPty.getSize(ExecPty.java:170)
at jdk.internal.le/jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal.getSize(AbstractPosixTerminal.java:60)
... 8 more
$
================================
According to my investigation, JLine library checks word "columns" in "stty -a" command output.
The word "columns" was translated on AIX's Japanese locale (other locales also), so above error was happened.
OpenJDK for AIX developer could not find this issue because he/she requires AIX Toolbox's coreutils rpm package as build tools.
Another stty command is in /opt/freeware/bin/stty, it's in coreutils rpm package.
Standard users' system may not have coreutils rpm package or they may not set /opt/freeware/bin in PATH environment variable.
stty command should be executed with C locale to get English message.
Additionally, JLine library requires -F option. AIX's stty command does not support -F option,
but stty command which is in coreutils rpm package supports -F option.
On standard jshell usage, -F option may not be used. But when the system has coreutils rpm package, jshell should use this one.
(Japanese characters were changed to \uXXXX style on this report)
================================
$ ./jshell
| JShell\u3078\u3088\u3046\u3053\u305d -- \u30d0\u30fc\u30b8\u30e7\u30f315.0.2
| \u6982\u8981\u306b\u3064\u3044\u3066\u306f\u3001\u6b21\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: /help intro
Exception in thread "main" java.io.IOError: java.io.IOException: Unable to parse columns
at jdk.internal.le/jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal.getSize(AbstractPosixTerminal.java:62)
at jdk.internal.le/jdk.internal.org.jline.terminal.Terminal.getBufferSize(Terminal.java:216)
at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.doDisplay(LineReaderImpl.java:741)
at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.<init>(LineReaderImpl.java:298)
at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext$2.<init>(ConsoleIOContext.java:133)
at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.<init>(ConsoleIOContext.java:133)
at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:978)
at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.start(JShellToolBuilder.java:254)
at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:120)
Caused by: java.io.IOException: Unable to parse columns
at jdk.internal.le/jdk.internal.org.jline.terminal.impl.ExecPty.doGetInt(ExecPty.java:278)
at jdk.internal.le/jdk.internal.org.jline.terminal.impl.ExecPty.doGetSize(ExecPty.java:263)
at jdk.internal.le/jdk.internal.org.jline.terminal.impl.ExecPty.getSize(ExecPty.java:170)
at jdk.internal.le/jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal.getSize(AbstractPosixTerminal.java:60)
... 8 more
$
================================
According to my investigation, JLine library checks word "columns" in "stty -a" command output.
The word "columns" was translated on AIX's Japanese locale (other locales also), so above error was happened.
OpenJDK for AIX developer could not find this issue because he/she requires AIX Toolbox's coreutils rpm package as build tools.
Another stty command is in /opt/freeware/bin/stty, it's in coreutils rpm package.
Standard users' system may not have coreutils rpm package or they may not set /opt/freeware/bin in PATH environment variable.
stty command should be executed with C locale to get English message.
Additionally, JLine library requires -F option. AIX's stty command does not support -F option,
but stty command which is in coreutils rpm package supports -F option.
On standard jshell usage, -F option may not be used. But when the system has coreutils rpm package, jshell should use this one.
- backported by
-
JDK-8262754 [AIX] jshell command throws java.io.IOError on non English locales
- Resolved