[Bug 238333] bhyve random crash in rfb.c on FreeBSD current (after r346011)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jun 6 20:50:22 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238333

--- Comment #12 from Mark Johnston <markj at FreeBSD.org> ---
I think the rfb and rfbout threads are insufficiently synchronized.  As a quick
hack, see if this fixes the problem:

diff --git a/usr.sbin/bhyve/rfb.c b/usr.sbin/bhyve/rfb.c
index d572037b25fe..8992995204be 100644
--- a/usr.sbin/bhyve/rfb.c
+++ b/usr.sbin/bhyve/rfb.c
@@ -273,8 +273,8 @@ rfb_recv_set_encodings_msg(struct rfb_softc *rc, int cfd)
                        rc->enc_raw_ok = true;
                        break;
                case RFB_ENCODING_ZLIB:
-                       rc->enc_zlib_ok = true;
                        deflateInit(&rc->zstream, Z_BEST_SPEED);
+                       rc->enc_zlib_ok = true;
                        break;
                case RFB_ENCODING_RESIZE:
                        rc->enc_resize_ok = true;

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-virtualization mailing list