Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8224184

jshell got IOException at exiting with AIX

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 12, 13
    • Fix Version/s: 13
    • Component/s: tools
    • Labels:
      None
    • Environment:

      AIX7.1

    • Subcomponent:
    • Introduced In Version:
      12
    • Resolved In Build:
      b25
    • CPU:
      ppc
    • OS:
      aix

      Backports

        Description

        $ jshell
        | Welcome to JShell -- Version 13-internal
        | For an introduction type: /help intro

        jshell> /exit
        | Goodbye
        Exception in thread "main" java.io.IOError: java.io.IOException: Error executing 'stty icrnl echo icanon iexten eof ^D eol ^A intr ^C min 11111111111111111111111111111111 time 11111111111111111111111111111111': stty_64: invalid integer argument: '11111111111111111111111111111111': Value too large to be stored in data type
                at jdk.internal.le/jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal.setAttributes(AbstractPosixTerminal.java:54)
                at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.close(ConsoleIOContext.java:245)
                at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:977)
                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: Error executing 'stty icrnl echo icanon iexten eof ^D eol ^A intr ^C min 11111111111111111111111111111111 time 11111111111111111111111111111111': stty_64: invalid integer argument: '11111111111111111111111111111111': Value too large to be stored in data type
                at jdk.internal.le/jdk.internal.org.jline.utils.ExecHelper.exec(ExecHelper.java:42)
                at jdk.internal.le/jdk.internal.org.jline.terminal.impl.ExecPty.doSetAttr(ExecPty.java:101)
                at jdk.internal.le/jdk.internal.org.jline.terminal.impl.AbstractPty.setAttr(AbstractPty.java:21)
                at jdk.internal.le/jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal.setAttributes(AbstractPosixTerminal.java:52)
                ... 4 more
        $
        (terminal session was disconnected.)

        Recreate steps:
        1. Open a terminal on AIX or remote login to AIX
        2. Launch jshell
        3. Type "/exit"
        Then, IOException was thrown. If you are using a local terminal, it was closed.
        If you are using remote login, the session was closed.

        Evaluation:
        The default value of AIX console is below.
        AIX doesn't show min/time by "stty -a", if icanon is defined.

        $ stty -a
        speed 9600 baud; rows 24; columns 80;
        intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ^@; eol2 = ^@;
        start = ^Q; stop = ^S; susp = ^Z; dsusp = ^Y; rprnt = ^R; werase = ^W;
        lnext = ^V;
        -parenb -parodd cs8 hupcl -cstopb cread -clocal
        -ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff
        -iuclc -ixany imaxbel
        opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab3 bs0 vt0 ff0
        isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
        echoctl echoke -flusho

        Then stored values of 'min' and 'time' are undefined (-1).
        After that, the -1 was to binary as '11111111111111111111111111111111'b.
        Finally, the terminal session was disconnected.

        The problem didn't occur with Java11.0.3.
        I confirmed it occurred with Java 12, 12.0.1 and 13.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tnakamura Toshio Nakamura
                  Reporter:
                  tnakamura Toshio Nakamura
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: