From owner-svn-src-all@FreeBSD.ORG Thu Jun 9 19:23:49 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F260A106566B; Thu, 9 Jun 2011 19:23:48 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 2BB018FC0A; Thu, 9 Jun 2011 19:23:47 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id ACD0A45F56; Thu, 9 Jun 2011 21:23:44 +0200 (CEST) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id C37B645F39; Thu, 9 Jun 2011 21:23:37 +0200 (CEST) Date: Thu, 9 Jun 2011 21:23:03 +0200 From: Pawel Jakub Dawidek To: Maxim Sobolev Message-ID: <20110609192303.GA2433@garage.freebsd.pl> References: <201106041601.p54G1Ut7016697@svn.freebsd.org> <4DEA653F.7070503@FreeBSD.org> <201106061057.p56Av3u7037614@kernblitz.nuclight.avtf.net> <4DED1CC5.1070001@FreeBSD.org> <86wrgvkv67.fsf@kopusha.home.net> <4DF11183.3060806@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline In-Reply-To: <4DF11183.3060806@FreeBSD.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: Mikolaj Golub , vadim_nuclight@mail.ru, svn-src-all@FreeBSD.org, Kostik Belousov Subject: Re: svn commit: r222688 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2011 19:23:49 -0000 --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 09, 2011 at 11:31:31AM -0700, Maxim Sobolev wrote: > >Sorry, but I think your patch is wrong. If even it fixes the issue for y= ou, > >actually I think it does not fix but hides a real problem we have to add= ress. > > > >Receiving the whole chunk at once should be more effectively because we = do one > >syscall instead of several. Also, if you receive in smaller chunks no ne= ed to > >set MSG_WAITALL at all. > > > >Besides, with your patch I am observing hangs on primary startup in > > > >init_remote->primary_connect->proto_connection_recv->proto_common_recv > > > >The primary worker process asks the parent to connect to the secondary. = After > >establishing the connection the parent sends connection protocol name and > >descriptor to the worker (proto_connection_send/proto_connection_recv). = The > >issue here is that in proto_connection_recv() the size of protoname is > >unknown, so it calls proto_common_recv() with size =3D 127, larger than > >protoname ("tcp"). > > > >It worked previously because after sending protoname proto_connection_se= nd() > >sends the descriptor calling sendmsg(). This is data of different type a= nd it > >makes recv() return although only 4 bytes of 127 requested were received. > > > >With your patch, after receiving these 4 bytes it returns back to recv() > >waiting for rest 123 bytes and gets stuck forever. Don't you observe thi= s? It > >is strange, because for me it hangs on every start up. I am seeing this = on > >yesterday current. >=20 > Yes, you are right. It appears that I did not test new code on > primary, only on secondary. Which explains why I did not see that > issue. Can you please try the following patch and let me know if it > solves the issue for you? >=20 > http://sobomax.sippysoft.com/hastd.diff I strongly disagree with this patch. The whole proto API is now clean and elegant. Hopefully this polution is not needed and I'd prefer to give time to Mikolaj to investigate it. I also plan to use it in other projects. HAST currently doesn't support 'async' mode, so working over WAN is not common use case for now, which makes your changes low priority. High priority for HAST is working over LAN. In the future it would be nice if you could send patches for review before you commit them with 3 days MFC time. HAST is actively maintained. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --gBBFr7Ir9EOA20Yy Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk3xHZcACgkQForvXbEpPzSWxgCfYxY1RDBIr5uI+nxw02wIMzoz eoUAoJaHUytquvhfrItJDxnusmCv54pX =aSgd -----END PGP SIGNATURE----- --gBBFr7Ir9EOA20Yy--