From owner-freebsd-emulation@FreeBSD.ORG Fri Jun 13 04:41:50 2014 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D17DFA69 for ; Fri, 13 Jun 2014 04:41:50 +0000 (UTC) Received: from mail-ve0-x230.google.com (mail-ve0-x230.google.com [IPv6:2607:f8b0:400c:c01::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 803CB2E3E for ; Fri, 13 Jun 2014 04:41:50 +0000 (UTC) Received: by mail-ve0-f176.google.com with SMTP id db12so2761003veb.21 for ; Thu, 12 Jun 2014 21:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vopenhouse.ca; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=m9D6oon8lN7VVFQSuNgKfI571uhxw7nCO+sZ7AQikCY=; b=k334Wz//83+HUqe/LfGQGfqfJhOgbVV9602YDVm1VwGFGlV85onbsiIz4X7WVN4TSd QaCgPSfGeq3xFA1pm3gal3vzZdpY/nq8pvrUzc5kTimxYVGLr/MOzlVh1mUImDWInoWC vUZ+a+cgAaaLEJnGnUESd+a/fJc1IFvCTVAMk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=m9D6oon8lN7VVFQSuNgKfI571uhxw7nCO+sZ7AQikCY=; b=OUEWODbp2Mw9cl0AxvhUz+EMscJcLWcGCOygbOgpztClkUbWN9j+JKIx6MmQfhb5uU KWCtZ7fFzln71BK6wYCqRqadh4F7FLSAt+Uibyc3huwpINQG9iJR41rx4ra07RjMV9Fd /5ZRuJxlzlWHx7xlXdCUzcsk1hwrv4l4bTDW3gVRqNVayLpPNm15+S3e3x/qg/GJOgUJ hWdmTpEMQgjDptCVrMGY6V2PQ+E5Aiyu245CxSZg6bfJHBUKgDe8g7K21liLnO/CkmrX ZBt/Ptew/7ThiBza/aTSO8oJotyqg9POU7frt3i+0OrAQekR+NfkCO7a+i6ToyhTAzfe BKwQ== X-Gm-Message-State: ALoCoQlY2EgmvhOa0AKP6Zy9DAfzScW2OnRk8eumbgnnJSGwvI5d1tD/Nyyn75ALHH5/nyNL3P2p MIME-Version: 1.0 X-Received: by 10.220.205.3 with SMTP id fo3mr81050vcb.57.1402634509389; Thu, 12 Jun 2014 21:41:49 -0700 (PDT) Received: by 10.220.197.130 with HTTP; Thu, 12 Jun 2014 21:41:49 -0700 (PDT) X-Originating-IP: [23.16.233.58] In-Reply-To: References: Date: Thu, 12 Jun 2014 21:41:49 -0700 Message-ID: Subject: Re: FreeBSD Port: emulators/virtualbox-ose From: Ron Thomas To: =?UTF-8?Q?Bernhard_Fr=C3=B6hlich?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: "freebsd-emulation@freebsd.org" X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 04:41:51 -0000 On Thu, Jun 12, 2014 at 8:59 PM, Ron Thomas wrote: > > > > On Thu, Jun 12, 2014 at 8:32 PM, Ron Thomas wrote: > >> >> On Thu, Jun 12, 2014 at 7:29 AM, Bernhard Fr=C3=B6hlich >> wrote: >> >>> On Thu, Jun 12, 2014 at 3:17 AM, Ron Thomas wrote: >>> > Not sure if this is the right venue for this, if not, could you point >>> me in >>> > the right direction? >>> >>> You're absolutely at the right place. >>> >>> > VBoxHeadless crashes on VNC disconnect. Every time I close a VNC >>> session >>> > 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/Mai= n/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/Mai= n/src-client/ConsoleImpl.cpp:1411 >>> > #2 0x000000080596962c in ConsoleVRDPServer::VRDPCallbackIntercept >>> > (pvCallback=3D0x805013f00, u32ClientId=3D4294967295, fu32Intercept=3D= 0, >>> > ppvIntercept=3D0x80596962c) >>> > at >>> > >>> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.12/src/VBox/Mai= n/src-client/ConsoleVRDPServer.cpp:1016 >>> > #3 0x00000008084014c0 in VNCServerImpl::clientGoneHook >>> (cl=3D0x80a078000) at >>> > >>> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.12/src/VBox/Ext= Packs/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/VBo= xVNC.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/79e68d065004b24811d68e211c2= 7b918654aabed/libvncserver/main.c#L509 >>> >> >> When I use make config, There doesn't appear to be debug options in the >> net/libvncserver port >> > > Ok so I found out something new to me (still pretty new to all this), for > libvncserver I did: > #make WITH_DEBUG=3Dyes install > > I think that is right, I'm still pretty new to this. > > Also located the VirtualBox log file which says: > > 00:05:27.642965 !!Assertion Failed!! > 00:05:27.642966 Expression: mAuthLibrary && (mpfnAuthEntry || > mpfnAuthEntry2 || mpfnAuthEntry3) > 00:05:27.642967 Location : > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.12/src/VBox/Main/= src-client/ConsoleVRDPServer.cpp(3348) > void ConsoleVRDPServer::AuthDisconnect(const com::Guid&, uint32_t) > > Not sure if this helps. > Oh and of course, I forgot: (gdb) backtrace #0 0x0000000805963f28 in ConsoleVRDPServer::AuthDisconnect (this=3D0x805013f00, uuid=3D@0x7ffffefb5ca0, u32ClientId=3D4294967295) at /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.12/src/VBox/Main/sr= c-client/ConsoleVRDPServer.cpp:3348 #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/sr= c-client/ConsoleImpl.cpp:1411 #2 0x000000080596970c in ConsoleVRDPServer::VRDPCallbackClientDisconnect (pvCallback=3D0x805013f00, u32ClientId=3D4294967295, fu32Intercepted=3D0) a= t /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.12/src/VBox/Main/sr= c-client/ConsoleVRDPServer.cpp:942 #3 0x00000008084014c0 in VNCServerImpl::clientGoneHook (cl=3D0x8096d3000) = at /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.12/src/VBox/ExtPack= s/VNC/VBoxVNC.cpp:1294 #4 0x00000008086136c1 in rfbClientConnectionGone (cl=3D0x8096d3000) at rfbserver.c:559 #5 0x0000000808611547 in clientInput (data=3D0x8096d3000) at main.c:562 #6 0x0000000800829d34 in pthread_getprio () from /lib/libthr.so.3 #7 0x0000000000000000 in ?? () > > >> >> >>> >>> 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-libvn= cserver__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. >>> >>> >> I tried your patch then recompiled both libvncserver then virtualbox, no >> luck. Any other suggestions? >> >> >>> 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/ >>> >> >> >> >> Ron >> > > Ron > --=20 Ron Thomas The Video Openhouse Team www.vopenhouse.ca Ranked #1 in google.ca for 'Real Estate Video' (604)732-7070