From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 1452E6E459; Wed, 17 Nov 2021 01:50:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1452E6E459 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1637103003; bh=CAQ/ke97+tcVuq5h6Ox3HSZ46YA2d9x3B+R/oY1CUEs=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=MnvAbV7i+w8qIU5I+geMfmu/PqeA1t6JCYD7oShcU3NXFaPTwFQbtBsyXTyfEzZFF zm5TkL1ZymxwCXQGJmMTpEZ1vVfEiT0CUYZnWp9Yw4OE4gAxTEN2ZTjlNw3kNzBhzo /0R1VNFgsuK6vn1BgRelybd8IRASHT6xwmwDIhxQ= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 D105F6E459 for ; Wed, 17 Nov 2021 01:50:01 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D105F6E459 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1mn7H6-0005Rm-05; Wed, 17 Nov 2021 01:50:00 +0300 Message-ID: <07bdcdec-8dbc-35f2-6b76-b5a432f97441@tarantool.org> Date: Tue, 16 Nov 2021 23:49:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Content-Language: en-US To: Serge Petrenko , vdavydov@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: <20211116101731.48597-1-sergepetrenko@tarantool.org> In-Reply-To: <20211116101731.48597-1-sergepetrenko@tarantool.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9731B3922EC06397990E8B89D97A64D716CAA5505BE500FF700894C459B0CD1B978230CCD70100ED2E1B6AABD0B07ACCB510C1FEE30913D106CDF01CFFFA87C39 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE742D9BD90C58D50E0EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006376F978168E59B07A5EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BBCA57AF85F7723F2E294592E10F1390CCA78B0C80F5C58EDCC7F00164DA146DAFE8445B8C89999728AA50765F79006372A3B24BF85B2E607389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC813BDA61BF53F5E1DF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BDAE3FA6833AEA0C275ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5AF9A16CF0C26B1FC9DEAB1DC6C05FCB10582D3DC529FAE9DD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7506FE1F977233B9BB410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A5BF8FA0BD61F9941D1980D2D7E973F5BF2AEA91B35C7D39F798F94080B9205D5045587D60D24AD81D7E09C32AA3244C3CBCD8B08709C458ADA32E7D8E730F3905AB220A9D022EBCFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj81eoY04PbolfjgE/d9P+jQ== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DC2E98327BB0BFE8725609BCE51A911AD3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] coio: handle spurious wakeup correctly X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Thanks for the patch! On 16.11.2021 11:17, Serge Petrenko via Tarantool-patches wrote: > coio_accept, coio_read, coio_write, coio_writev used to handle spurious > wakeups correctly: if the timeout hasn't passed yet, they would simply > retry reading (or writing) and fall asleep once again if no data is > ready. > > This behaviour changed in the following patches: > 577a640a7fdec986d19101ed04d2afa80e951c78 ("coio: pass fd to > coio_accept") and 4f84859dcdd6126b0bdcda810b7f5f58386bdac6 ("Introduce > iostream wrapper for socket I/O"). > > Now the functions timeout on the very first spurious wakeup. > > Fix this, add the appropriate unit tests and a test_iostream > implementation for the ease of testing. Don't we have the same problem with coio_connect_addr() (used in coio_connect_timeout())?