Overview: When FreeBSD as a guest under qvm-kemu, and guest setup to use serial console, simultaneous I/O on serial console will lock up the serial console. That is, on console, you could "ls -lR /" and press any key during the scrolling, and console freezes instantly. Ditto for Copy-Pasting a long string on the serial console. Reproduce: Host OS: CentOS 6.5 + kernel-2.6.32-431.el6.x86_64 + qemu-kvm-0.12.1.2-2.415.el6_5.10.x86_64 Guest OS: FreeBSD 10.1 release (amd64) * Boot FreeBSD media on host as Linux qemu-kvm guest. Example: host# virt-install -n fbtest -r 128 --vcpus=1 \ --nodisks \ --cdrom /home/libvirt/images/FreeBSD-10.0-RELEASE-amd64-dvd1.iso \ --network=network=default,model=virtio \ --video=vga --graphics none * Loader prompt will appear on serial; press [Esc] to get OK prompt and type OK set console=comconsole OK boot -s to get single user prompt. * # ls -lR / During scrolling, press any key. Actual Results: Console stops responding. Expected results: At least it should respond for buffer overflow or something. Additional Information: Console freeze will still occur on HDD(-image) installed, multiuser FreeBSD guest with serial console configured as in Hnadbook. When ps-ed from other tty (such as ssh), "ls -lR / >/dev/console" is stuck on "ttyout". 0 632 1 0 20 0 14488 1932 ttyin Ss+ u0 0:00.02 /usr/libexec/getty 3wire.9600 ttyu0 0 595 1 0 52 0 14488 1932 ttyin Is+ v0 0:00.01 /usr/libexec/getty Pc ttyv0 0 621 620 0 21 0 47716 2672 wait Is 0 0:00.06 su 0 624 621 0 20 0 23572 3292 pause S 0 0:00.03 _su (csh) 0 636 624 0 52 0 16852 2932 ttyout S 0 0:00.39 ls -lR / 0 643 624 0 20 0 18736 2100 - R+ 0 0:00.00 ps axlww SIGHUP or SIGKILL-ing process holding /dev/ttyu0 doesn't help. The only way to unlock the console is to reboot. (single user is not enough)
kill -HUP ing the getty doesn't change anything. kill -KILL ing the getty results in unkillable getty going CPU 100% and not exitting. 0 598 1 0 102 0 14488 1980 - REs+ u0- 0:43.47 /usr/libexec/getty 3wire.9600 ttyu0 spinlock or something?
Workaround: set hw.broken_txfifo=1 in /boot/loader.conf, /boot/device.hints, wherever suites. hw.broken_txfifo was added in FreeBSD 8.4 for workaround of QEMU UART emulation bug.