Skip to content
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

trino-cli crashes with Error executing '/opt/homebrew/opt/coreutils/libexec/gnubin/stty icrnl ixon echo icanon iexten min 1 time 0': stty: 'standard input': unable to perform all requested operations #19549

Closed
findepi opened this issue Oct 27, 2023 · 8 comments · Fixed by #19606
Labels
bug Something isn't working

Comments

@findepi
Copy link
Member

findepi commented Oct 27, 2023

master$ client/trino-cli/target/trino-cli-431-SNAPSHOT-executable.jar
trino> s;
Exception in thread "main" java.io.IOError: java.io.IOException: Error executing '/opt/homebrew/opt/coreutils/libexec/gnubin/stty icrnl ixon echo icanon iexten min 1 time 0': stty: 'standard input': unable to perform all requested operations
	at org.jline.terminal.impl.AbstractPosixTerminal.setAttributes(AbstractPosixTerminal.java:57)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:774)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:553)
	at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:538)
	at io.trino.cli.InputReader.readLine(InputReader.java:71)
	at io.trino.cli.Console.runConsole(Console.java:244)
	at io.trino.cli.Console.run(Console.java:192)
	at io.trino.cli.Console.call(Console.java:109)
	at io.trino.cli.Console.call(Console.java:79)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
	at picocli.CommandLine.execute(CommandLine.java:2170)
	at io.trino.cli.Trino.main(Trino.java:47)
Caused by: java.io.IOException: Error executing '/opt/homebrew/opt/coreutils/libexec/gnubin/stty icrnl ixon echo icanon iexten min 1 time 0': stty: 'standard input': unable to perform all requested operations
	at org.jline.utils.ExecHelper.exec(ExecHelper.java:48)
	at org.jline.terminal.impl.exec.ExecPty.doSetAttr(ExecPty.java:104)
	at org.jline.terminal.impl.AbstractPty.setAttr(AbstractPty.java:46)
	at org.jline.terminal.impl.AbstractPosixTerminal.setAttributes(AbstractPosixTerminal.java:55)
	... 17 more
master$
@findepi findepi added the bug Something isn't working label Oct 27, 2023
@findepi
Copy link
Member Author

findepi commented Oct 27, 2023

reverting #19534 solves the problem for me
cc @wendigo

@wendigo
Copy link
Contributor

wendigo commented Oct 27, 2023

It works for me. Why do you have stty in your homebrew?

@wendigo
Copy link
Contributor

wendigo commented Oct 27, 2023

jline/jline3#97

@findepi
Copy link
Member Author

findepi commented Oct 30, 2023

Why do you have stty in your homebrew?

I have absolutely no idea.

@findepi
Copy link
Member Author

findepi commented Oct 30, 2023

jline/jline3#97

i thought this means the bug is fixed and we're just waiting for a release. But now i noticed it's a 6 year old issue.

@wendigo
Copy link
Contributor

wendigo commented Oct 30, 2023

@findepi nope, it's the old similiar bug report

@wendigo
Copy link
Contributor

wendigo commented Oct 31, 2023

I've reported it back to jline: jline/jline3#889

It works with the stty shipped with MacOS Sonoma. I can reproduce it with the homebrew coreutils:

❯ PATH=/opt/homebrew/opt/coreutils/libexec/gnubin/:$PATH ./client/trino-cli/target/trino-cli-431-SNAPSHOT-executable.jar

@findepi
Copy link
Member Author

findepi commented Nov 7, 2023

thank you @wendigo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants