From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id DA7AA42EF5C for ; Fri, 26 Jun 2020 12:52:11 +0300 (MSK) Date: Fri, 26 Jun 2020 12:52:10 +0300 From: Kirill Yukhin Message-ID: <20200626095210.f4oz3smb5knohw25@tarantool.org> References: <4351b421b56115e2d8c35f60fdb5e8ba43a7b9fe.1592628521.git.avtikhon@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4351b421b56115e2d8c35f60fdb5e8ba43a7b9fe.1592628521.git.avtikhon@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v2] test: flaky box/net.box_wait_connected_gh-3856 List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Alexander V. Tikhonov" Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy , Alexander Turenko Hello, On 20 июн 07:50, Alexander V. Tikhonov wrote: > From: Alexander Turenko > > Found issue running test on FreeBSD VBox host: > > [011] --- box/net.box_wait_connected_gh-3856.result Mon Jun 15 09:39:49 2020 > [011] +++ box/net.box_wait_connected_gh-3856.reject Fri May 8 08:23:30 2020 > [011] @@ -12,7 +12,8 @@ > [011] - opts: > [011] wait_connected: false > [011] host: 8.8.8.8 > [011] - state: initial > [011] + state: error > [011] + error: Invalid argument > [011] port: '123456' > [011] ... > [011] c:close() > > The reason of the fail was that getaddrinfo() returned EIA_SERVICE for an > incorrect TCP/IP port on FreeBSD, but crops it as modulo of 65536 on > Linux/glibc. Checked with local script './getaddrinfo': > > (Linux/glibc) $ ./getaddrinfo 8.8.8.8 123456 > ---- > family: AF_INET > socktype: SOCK_STREAM > protocol: IPPROTO_TCP > host: 8.8.8.8 > serv: 57920 > > (FreeBSD) $ ./getaddrinfo 8.8.8.8 123456 > getaddrinfo: Service was not recognized for socket type > > So obvious fix is to change 123456 to something less or equal to > 65535. Say, 1234. > > The test depended on an order in which fibers were scheduled > (net_box.connect() creates a separate fiber for connecting in background > using fiber.create(), which yields). Unlikely our fiber were not get > execution time during the connection attempt, so it was more like a > formal thing. > > But we can decrease probability of this situation even more if we'll > grab all connection fields just when net_box.connect() returns, not > after yield in console (which is due to waiting a next command from > test-run). > > Closes #5083 > > Reviewed-by: Alexander V. Tikhonov I've checked your patch into 1.10, 2.3, 2.4 and master. -- Regards, Kirill Yukhin