Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jul 2014 19:46:39 -0700
From:      Ron Thomas <ron@vopenhouse.ca>
To:        =?UTF-8?Q?Bernhard_Fr=C3=B6hlich?= <decke@freebsd.org>
Cc:        "freebsd-emulation@freebsd.org" <freebsd-emulation@freebsd.org>
Subject:   Re: FreeBSD Port: emulators/virtualbox-ose
Message-ID:  <CAHf5H2n_x10h8WXXvcYvGb0%2BeTCsOjW%2BC32txrHuH2MMxST0iw@mail.gmail.com>
In-Reply-To: <CAE-m3X2Lo0o_Ka%2BsCGNPxVa2sCzsOfKfSJaHyQZDkhv04BvHLw@mail.gmail.com>
References:  <CAHf5H2n6NRcKNBtwCn_PU6bhPoMoyc_4uUMG0G=8XPCN6d2BsQ@mail.gmail.com> <CAHf5H2k3WEAuV=G5rUvdcwUBWK6KcPRcTcYhW-9-zTvoB0k=Lw@mail.gmail.com> <CAE-m3X2Lo0o_Ka%2BsCGNPxVa2sCzsOfKfSJaHyQZDkhv04BvHLw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Frustrated, I decided to comment out one line in Virtualbox's source.  Now
it doesn't crash, although I'm not sure that things are not going to be
messed up elsewhere by not performing that check.  Do you think I will run
into other trouble?

Ron


--- src/VBox/Main/src-client/ConsoleVRDPServer.cpp.orig  2014-07-18
19:29:52.000000000 -0700
+++ src/VBox/Main/src-client/ConsoleVRDPServer.cpp       2014-07-18
19:31:37.000000000 -0700
@@ -3345,7 +3345,7 @@
     LogFlow(("ConsoleVRDPServer::AuthDisconnect: uuid =3D %RTuuid,
u32ClientId =3D %d\n",
              rawuuid, u32ClientId));

-    Assert(mAuthLibrary && (mpfnAuthEntry || mpfnAuthEntry2 ||
mpfnAuthEntry3));
+    //    Assert(mAuthLibrary && (mpfnAuthEntry || mpfnAuthEntry2 ||
mpfnAuthEntry3));

     AuthCtx ctx;
     ctx.result         =3D AuthResultAccessDenied; /* Not used. */



On Thu, Jun 12, 2014 at 7:29 AM, Bernhard Fr=C3=B6hlich <decke@freebsd.org>
wrote:

> On Thu, Jun 12, 2014 at 3:17 AM, Ron Thomas <ron@vopenhouse.ca> wrote:
> > Not sure if this is the right venue for this, if not, could you point m=
e
> in
> > the right direction?
>
> You're absolutely at the right place.
>
> > VBoxHeadless crashes on VNC disconnect. Every time I close a VNC sessio=
n
> > VBoxHeadless crashes.  I am starting VirtualBox using "service
> vboxheadless
> > start"
> >
> > #uname -a
> > FreeBSD my.domain.com 9.2-RELEASE-p6 FreeBSD 9.2-RELEASE-p6 #0: Tue May
> 13
> > 08:21:53 UTC 2014
> > root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
> > amd64
> >
> > #pkg version | grep 'virtualbox'
> > virtualbox-ose-4.3.12_1            =3D
> > virtualbox-ose-kmod-4.3.12         =3D
> >
> > Installed with following options:
> > DBUS
> > DEBUG
> > GUESTADDITIONS
> > PYTHON
> > UDPTUNNEL
> > VNC
> >
> >
> > (gdb) backtrace
> > #0  0x0000000805963e48 in ConsoleVRDPServer::AuthDisconnect
> > (this=3D0x805013f00, uuid=3D@0x7ffffeeb3ce0, u32ClientId=3D4294967295) =
at
> >
> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.12/src/VBox/Main/=
src-client/ConsoleVRDPServer.cpp:3339
> > #1  0x0000000805919ddb in Console::VRDPClientDisconnect
> (this=3D0x805095800,
> > u32ClientId=3D4294967295, fu32Intercepted=3D0) at
> >
> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.12/src/VBox/Main/=
src-client/ConsoleImpl.cpp:1411
> > #2  0x000000080596962c in ConsoleVRDPServer::VRDPCallbackIntercept
> > (pvCallback=3D0x805013f00, u32ClientId=3D4294967295, fu32Intercept=3D0,
> > ppvIntercept=3D0x80596962c)
> >     at
> >
> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.12/src/VBox/Main/=
src-client/ConsoleVRDPServer.cpp:1016
> > #3  0x00000008084014c0 in VNCServerImpl::clientGoneHook (cl=3D0x80a0780=
00)
> at
> >
> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.12/src/VBox/ExtPa=
cks/VNC/VBoxVNC.cpp:1294
> > #4  0x00000008086178f8 in rfbClientConnectionGone () from
> > /usr/local/lib/libvncserver.so.0
> > #5  0x0000000808611dec in clientInput () from
> > /usr/local/lib/libvncserver.so.0
> > #6  0x0000000800829d34 in pthread_getprio () from /lib/libthr.so.3
> > #7  0x0000000000000000 in ?? ()
>
> The stacktrace looks very much like a bug in libvncserver. There is no
> information passed to
> libvncserver that makes me believe that the passed data is wrong so I
> guess it this is nothing
> that VBox can fix.
>
>
> https://www.virtualbox.org/browser/vbox/trunk/src/VBox/ExtPacks/VNC/VBoxV=
NC.cpp#L1297
>
> It might be worth trying to recompile libvncserver port with debug
> options to get a full stacktrace
> but it is somewhere here:
>
>
> https://github.com/LibVNC/libvncserver/blob/79e68d065004b24811d68e211c27b=
918654aabed/libvncserver/main.c#L509
>
> and the patch that we have in our libvncserver port looks quite like
> it fixes a similar issue in
> another place to me
>
>
> http://svnweb.freebsd.org/ports/head/net/libvncserver/files/patch-libvncs=
erver__sockets.c?revision=3D340725&view=3Dmarkup
>
> so my first idea would be to do something like that to libvncserver:
>
>
> --- main.c.orig    2014-06-12 16:20:35.163489814 +0200
> +++ main.c    2014-06-12 16:22:00.598491327 +0200
> @@ -546,10 +546,10 @@
>          }
>
>          /* We have some space on the transmit queue, send some data */
> -        if (FD_ISSET(cl->sock, &wfds))
> +        if (cl->sock >=3D 0 && FD_ISSET(cl->sock, &wfds))
>              rfbSendFileTransferChunk(cl);
>
> -        if (FD_ISSET(cl->sock, &rfds) || FD_ISSET(cl->sock, &efds))
> +        if (cl->sock >=3D 0 && (FD_ISSET(cl->sock, &rfds) ||
> FD_ISSET(cl->sock, &efds)))
>              rfbProcessClientMessage(cl);
>      }
>
>
> This patch is completely untested was produced within 2 minutes of
> looking at the code and
> I am not familiar with the VNC code at all so this might be completely
> nonsense - please take
> it for what it's worth.
>
> Since the libvncserver port is unmaintained right now but bapt@ was
> the former maintainer I
> will CC him just in case he knows something about it.
>
> --
> Bernhard Froehlich
> http://www.bluelife.at/
>



--=20
Ron Thomas
The Video Openhouse Team
www.vopenhouse.ca
Ranked #1 in google.ca for 'Real Estate Video'
(604)732-7070



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHf5H2n_x10h8WXXvcYvGb0%2BeTCsOjW%2BC32txrHuH2MMxST0iw>