Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 2019 14:34:02 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>
To:        Mark Raynsford <list+org.freebsd.virtualization@io7m.com>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: Severely broken bhyve console
Message-ID:  <201908202134.x7KLY2JZ051160@gndrsh.dnsmgr.net>
In-Reply-To: <20190820212636.63f08db2@almond.int.arc7.info>

next in thread | previous in thread | raw e-mail | index | archive | help
> Hello!
> 
> For reasons I'm unable to explain, my ability to access the nmdm
> consoles of bhyve guests has suddenly broken. It may have been caused
> by a recent 11.2 update - I keep this machine on 11.2-RELEASE plus
> freebsd-update patches but, as it's not a publically accessible machine,
> I rarely reboot for updates unless absolutely necessary.
> 
> I can use "sudo cu -l /dev/nmdm*B" to connect to a particular bhyve
> guest's console, but as this video shows, the console is effectively
> unusable:
> 
> https://ataxia.io7m.com/2019/08/20/broken_terminal.ogv
> 
> In that video, I connect to /dev/nmdm57B when the guest is shut down. I
> start the guest in a separate terminal (not pictured) and wait for it
> to boot into the Debian installer. I don't touch the keys until the
> title bar becomes visible. At that point, touching the arrow keys or
> the return key results in chaos.
> 
> It doesn't seem to be terminal-specific; I'm ssh'd into the host
> machine, and have tried various different terminals and $TERM settings
> to no effect. It doesn't seem to be guest-specific; I'm running
> FreeBSD, Debian, and OpenBSD guests and they now all show this
> behaviour. The guests themselves don't appear to be in any distress, I
> can ssh into the guests and everything is working correctly.
> 
> The host:
> 
> # uname -a
> FreeBSD cranberry.int.arc7.info 11.2-RELEASE-p13 FreeBSD
> 11.2-RELEASE-p13 #0: Tue Aug  6 06:41:33 UTC 2019
> root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
> 
> I'd appreciate any help on this.

I see this often, but normally I have a shell prompt and can clear
the problem with a
resizewin
command
or a
stty sane

Other things to try are clear, reset, tset.  But none of that is
going to work inside a grub> prompt.

What it looks as if is happened is you have disconnected from
a session while it was in grub and had sent specific control
sequences, possibly even expecting scroll regions and such
set up in the terminal.  Now when you reconnect from a newly
initialzed terminal that has none of this setup things go
very wrong.

This can happen on real hardware if you power down your vt320,
and then power it back up while something has done a lot of
"special" stuff to setup the screen.

One solution is to use the graphics console, that does not suffer
from these tty type issues, its a bit sluggish if you do not have
a good high speed network path to the bhyve host though.

-- 
Rod Grimes                                                 rgrimes@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908202134.x7KLY2JZ051160>