* [Qemu-devel] [Bug 1407808] [NEW] virtual console gives strange response to ANSI DSR
@ 2015-01-05 21:54 Nadav Har'El
2020-08-07 17:52 ` [Bug 1407808] " Thomas Huth
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Nadav Har'El @ 2015-01-05 21:54 UTC (permalink / raw)
To: qemu-devel
Public bug reported:
With "-serial vc" (which is the default), qemu make strange responses to
the ANSI DSR escape sequence (\033[6n) which can confuse guests.
Terminal emulators supporting the ANSI escape sequences usually support
the "Device Status Report" escape sequence, \033[6n, to which as a
response the terminal injects as input the response \033[n;mR,
containing the current cursor position. An application running in the
guest can use this escape sequence to, for example, figure out the size
of the terminal it is running under, which can be useful as the guest
has no other standard way to figure out a "size" for the serial port.
Unfortunately, it seems that qemu when run with "-serial vc" (which
appears to be the default), when qemu gets the \033[6n escape sequence
on the serial port, it just responds with a single \033, and that's it!
This can confuse an application, could concievably assume that a
terminal either supports this escape sequence and injects the correct
response (\033[n;mR), or doesn't support it and injects absolutely
nothing as input - but not something in between.
This caused a problem on one shell implementation on OSv that tried to
figure out the terminal's size, and had to work around this unexpected
behavior (see https://github.com/cloudius-
systems/osv/commit/b79223584be40459861d1c12e1cb67e3e49e2a12).
** Affects: qemu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1407808
Title:
virtual console gives strange response to ANSI DSR
Status in QEMU:
New
Bug description:
With "-serial vc" (which is the default), qemu make strange responses
to the ANSI DSR escape sequence (\033[6n) which can confuse guests.
Terminal emulators supporting the ANSI escape sequences usually
support the "Device Status Report" escape sequence, \033[6n, to which
as a response the terminal injects as input the response \033[n;mR,
containing the current cursor position. An application running in the
guest can use this escape sequence to, for example, figure out the
size of the terminal it is running under, which can be useful as the
guest has no other standard way to figure out a "size" for the serial
port.
Unfortunately, it seems that qemu when run with "-serial vc" (which
appears to be the default), when qemu gets the \033[6n escape sequence
on the serial port, it just responds with a single \033, and that's
it! This can confuse an application, could concievably assume that a
terminal either supports this escape sequence and injects the correct
response (\033[n;mR), or doesn't support it and injects absolutely
nothing as input - but not something in between.
This caused a problem on one shell implementation on OSv that tried to
figure out the terminal's size, and had to work around this unexpected
behavior (see https://github.com/cloudius-
systems/osv/commit/b79223584be40459861d1c12e1cb67e3e49e2a12).
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1407808/+subscriptions
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 1407808] Re: virtual console gives strange response to ANSI DSR
2015-01-05 21:54 [Qemu-devel] [Bug 1407808] [NEW] virtual console gives strange response to ANSI DSR Nadav Har'El
@ 2020-08-07 17:52 ` Thomas Huth
2020-08-10 8:56 ` Nadav Har'El
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2020-08-07 17:52 UTC (permalink / raw)
To: qemu-devel
Looking through old bug tickets... is this still an issue with the
latest version of QEMU? Or could we close this ticket nowadays?
** Changed in: qemu
Status: New => Incomplete
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1407808
Title:
virtual console gives strange response to ANSI DSR
Status in QEMU:
Incomplete
Bug description:
With "-serial vc" (which is the default), qemu make strange responses
to the ANSI DSR escape sequence (\033[6n) which can confuse guests.
Terminal emulators supporting the ANSI escape sequences usually
support the "Device Status Report" escape sequence, \033[6n, to which
as a response the terminal injects as input the response \033[n;mR,
containing the current cursor position. An application running in the
guest can use this escape sequence to, for example, figure out the
size of the terminal it is running under, which can be useful as the
guest has no other standard way to figure out a "size" for the serial
port.
Unfortunately, it seems that qemu when run with "-serial vc" (which
appears to be the default), when qemu gets the \033[6n escape sequence
on the serial port, it just responds with a single \033, and that's
it! This can confuse an application, could concievably assume that a
terminal either supports this escape sequence and injects the correct
response (\033[n;mR), or doesn't support it and injects absolutely
nothing as input - but not something in between.
This caused a problem on one shell implementation on OSv that tried to
figure out the terminal's size, and had to work around this unexpected
behavior (see https://github.com/cloudius-
systems/osv/commit/b79223584be40459861d1c12e1cb67e3e49e2a12).
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1407808/+subscriptions
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 1407808] Re: virtual console gives strange response to ANSI DSR
2015-01-05 21:54 [Qemu-devel] [Bug 1407808] [NEW] virtual console gives strange response to ANSI DSR Nadav Har'El
2020-08-07 17:52 ` [Bug 1407808] " Thomas Huth
@ 2020-08-10 8:56 ` Nadav Har'El
2020-08-12 6:29 ` Thomas Huth
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Nadav Har'El @ 2020-08-10 8:56 UTC (permalink / raw)
To: qemu-devel
The bug still very much exists (I tested qemu 4.2.1):
If you don't use "-serial stdio" (or its newer variants), by default Qemu opens a new black "console" to run the application. It is not clear to me exactly which terminal this console is supposed to emulate, but it does seem to support most ANSI escape sequences I tried. However, it supports the ANSI "DSR" (Device Status Report) escape sequence, ESC [ 6 n (see https://en.wikipedia.org/wiki/ANSI_escape_code), incorrectly, just as I reported in the original issue. This is still true today.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1407808
Title:
virtual console gives strange response to ANSI DSR
Status in QEMU:
Incomplete
Bug description:
With "-serial vc" (which is the default), qemu make strange responses
to the ANSI DSR escape sequence (\033[6n) which can confuse guests.
Terminal emulators supporting the ANSI escape sequences usually
support the "Device Status Report" escape sequence, \033[6n, to which
as a response the terminal injects as input the response \033[n;mR,
containing the current cursor position. An application running in the
guest can use this escape sequence to, for example, figure out the
size of the terminal it is running under, which can be useful as the
guest has no other standard way to figure out a "size" for the serial
port.
Unfortunately, it seems that qemu when run with "-serial vc" (which
appears to be the default), when qemu gets the \033[6n escape sequence
on the serial port, it just responds with a single \033, and that's
it! This can confuse an application, could concievably assume that a
terminal either supports this escape sequence and injects the correct
response (\033[n;mR), or doesn't support it and injects absolutely
nothing as input - but not something in between.
This caused a problem on one shell implementation on OSv that tried to
figure out the terminal's size, and had to work around this unexpected
behavior (see https://github.com/cloudius-
systems/osv/commit/b79223584be40459861d1c12e1cb67e3e49e2a12).
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1407808/+subscriptions
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 1407808] Re: virtual console gives strange response to ANSI DSR
2015-01-05 21:54 [Qemu-devel] [Bug 1407808] [NEW] virtual console gives strange response to ANSI DSR Nadav Har'El
2020-08-07 17:52 ` [Bug 1407808] " Thomas Huth
2020-08-10 8:56 ` Nadav Har'El
@ 2020-08-12 6:29 ` Thomas Huth
2021-03-22 19:22 ` Peter Maydell
2021-04-30 8:21 ` Thomas Huth
4 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2020-08-12 6:29 UTC (permalink / raw)
To: qemu-devel
** Changed in: qemu
Status: Incomplete => Triaged
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1407808
Title:
virtual console gives strange response to ANSI DSR
Status in QEMU:
Triaged
Bug description:
With "-serial vc" (which is the default), qemu make strange responses
to the ANSI DSR escape sequence (\033[6n) which can confuse guests.
Terminal emulators supporting the ANSI escape sequences usually
support the "Device Status Report" escape sequence, \033[6n, to which
as a response the terminal injects as input the response \033[n;mR,
containing the current cursor position. An application running in the
guest can use this escape sequence to, for example, figure out the
size of the terminal it is running under, which can be useful as the
guest has no other standard way to figure out a "size" for the serial
port.
Unfortunately, it seems that qemu when run with "-serial vc" (which
appears to be the default), when qemu gets the \033[6n escape sequence
on the serial port, it just responds with a single \033, and that's
it! This can confuse an application, could concievably assume that a
terminal either supports this escape sequence and injects the correct
response (\033[n;mR), or doesn't support it and injects absolutely
nothing as input - but not something in between.
This caused a problem on one shell implementation on OSv that tried to
figure out the terminal's size, and had to work around this unexpected
behavior (see https://github.com/cloudius-
systems/osv/commit/b79223584be40459861d1c12e1cb67e3e49e2a12).
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1407808/+subscriptions
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 1407808] Re: virtual console gives strange response to ANSI DSR
2015-01-05 21:54 [Qemu-devel] [Bug 1407808] [NEW] virtual console gives strange response to ANSI DSR Nadav Har'El
` (2 preceding siblings ...)
2020-08-12 6:29 ` Thomas Huth
@ 2021-03-22 19:22 ` Peter Maydell
2021-04-30 8:21 ` Thomas Huth
4 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2021-03-22 19:22 UTC (permalink / raw)
To: qemu-devel
This should be fixed in head-of-git by commit 8eb13bbbac08a, which will
be in QEMU 6.0. (The underlying bug is that when the GTK front-end tries
to send sequences of more than one byte to a UART, it didn't account for
UARTs which don't have a FIFO capable of holding the whole sequence at
once.)
** Changed in: qemu
Status: Triaged => Fix Committed
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1407808
Title:
virtual console gives strange response to ANSI DSR
Status in QEMU:
Fix Committed
Bug description:
With "-serial vc" (which is the default), qemu make strange responses
to the ANSI DSR escape sequence (\033[6n) which can confuse guests.
Terminal emulators supporting the ANSI escape sequences usually
support the "Device Status Report" escape sequence, \033[6n, to which
as a response the terminal injects as input the response \033[n;mR,
containing the current cursor position. An application running in the
guest can use this escape sequence to, for example, figure out the
size of the terminal it is running under, which can be useful as the
guest has no other standard way to figure out a "size" for the serial
port.
Unfortunately, it seems that qemu when run with "-serial vc" (which
appears to be the default), when qemu gets the \033[6n escape sequence
on the serial port, it just responds with a single \033, and that's
it! This can confuse an application, could concievably assume that a
terminal either supports this escape sequence and injects the correct
response (\033[n;mR), or doesn't support it and injects absolutely
nothing as input - but not something in between.
This caused a problem on one shell implementation on OSv that tried to
figure out the terminal's size, and had to work around this unexpected
behavior (see https://github.com/cloudius-
systems/osv/commit/b79223584be40459861d1c12e1cb67e3e49e2a12).
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1407808/+subscriptions
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 1407808] Re: virtual console gives strange response to ANSI DSR
2015-01-05 21:54 [Qemu-devel] [Bug 1407808] [NEW] virtual console gives strange response to ANSI DSR Nadav Har'El
` (3 preceding siblings ...)
2021-03-22 19:22 ` Peter Maydell
@ 2021-04-30 8:21 ` Thomas Huth
4 siblings, 0 replies; 6+ messages in thread
From: Thomas Huth @ 2021-04-30 8:21 UTC (permalink / raw)
To: qemu-devel
** Changed in: qemu
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1407808
Title:
virtual console gives strange response to ANSI DSR
Status in QEMU:
Fix Released
Bug description:
With "-serial vc" (which is the default), qemu make strange responses
to the ANSI DSR escape sequence (\033[6n) which can confuse guests.
Terminal emulators supporting the ANSI escape sequences usually
support the "Device Status Report" escape sequence, \033[6n, to which
as a response the terminal injects as input the response \033[n;mR,
containing the current cursor position. An application running in the
guest can use this escape sequence to, for example, figure out the
size of the terminal it is running under, which can be useful as the
guest has no other standard way to figure out a "size" for the serial
port.
Unfortunately, it seems that qemu when run with "-serial vc" (which
appears to be the default), when qemu gets the \033[6n escape sequence
on the serial port, it just responds with a single \033, and that's
it! This can confuse an application, could concievably assume that a
terminal either supports this escape sequence and injects the correct
response (\033[n;mR), or doesn't support it and injects absolutely
nothing as input - but not something in between.
This caused a problem on one shell implementation on OSv that tried to
figure out the terminal's size, and had to work around this unexpected
behavior (see https://github.com/cloudius-
systems/osv/commit/b79223584be40459861d1c12e1cb67e3e49e2a12).
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1407808/+subscriptions
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-04-30 8:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-05 21:54 [Qemu-devel] [Bug 1407808] [NEW] virtual console gives strange response to ANSI DSR Nadav Har'El
2020-08-07 17:52 ` [Bug 1407808] " Thomas Huth
2020-08-10 8:56 ` Nadav Har'El
2020-08-12 6:29 ` Thomas Huth
2021-03-22 19:22 ` Peter Maydell
2021-04-30 8:21 ` Thomas Huth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).