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 B82426EC55; Fri, 23 Jul 2021 10:47:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B82426EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627026432; bh=mbKL5KJA5HjM4EP4PH+LXyuzXBDbmSqcwCSMkj0nuhQ=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=vN3dKFI06IG69eXW5pv/z9HXQtd4z7iQpy5Qzlgg5YG7Qv7MdYys9ZuwNYJSp9Y8c p3VYLr0uiuzw4gFcqvNYacLrSARBPtvn1/737w6/BZRg7Hr0TPFpsCeYt5k10bbl0s GNVFnD1Ws/WOmIT3H9i9yfXGlLxYCw2XCgxFk48c= Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (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 92CCE6EC5A for ; Fri, 23 Jul 2021 10:45:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 92CCE6EC5A Received: by smtp58.i.mail.ru with esmtpa (envelope-from ) id 1m6ps3-0003br-Ta; Fri, 23 Jul 2021 10:45:24 +0300 To: Vladislav Shpilevoy , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: Message-ID: <4f192cbf-5bad-4eb7-9ed0-2789d5d4c7d8@tarantool.org> Date: Fri, 23 Jul 2021 09:45:22 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD941C43E597735A9C30288BCF456A452EC92BAB6D044D5CCDE182A05F538085040CA58529358DB499A0B35C662563DE18C4039D8C27330A55A3375383B3B31947F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE77B382B3D3EF460BFEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006379108F895B68B2FFD8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8F6014AD3929192AF832668D6CF24AF65117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BF1175FABE1C0F9B6A471835C12D1D977C4224003CC836476EB9C4185024447017B076A6E789B0E975F5C1EE8F4F765FCAFE244150B8AD6873AA81AA40904B5D9CF19DD082D7633A078D18283394535A93AA81AA40904B5D98AA50765F7900637F6FE7C89BE6A8FE1D81D268191BDAD3D698AB9A7B718F8C4D1B931868CE1C5781A620F70A64A45A98AA50765F79006372E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89FB26E97DCB74E6252C6EABA9B74D0DA47B5C8C57E37DE458BEDA766A37F9254B7 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505242D48C77D4EE1AB5E6B4959828DF931 X-C1DE0DAB: 0D63561A33F958A5AACAF97043C3467D39F05A03894EEBB8060D181B7AA81539D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D347324AA9FA07FF01E1AF99C274BBAEFD4EC600CB9111FD7D3E81A9225071D92846D989CF69991ECD91D7E09C32AA3244C92ABA4391662292FBF8BB3A41FEC5898E3D93501275E802FFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojtKXY6NTIXk3OOKlaS+F/AA== X-Mailru-Sender: 9482C2B233321BD2827D960CA7C4D2E2B61F55E42965A5311A29D3CF98411D8F6CC3F1F9239AE09A6BB2E709EA627F343C7DDD459B58856F0E45BC603594F5A135B915D4279FF0579437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v4 12/16] box: fix an assertion failure after a spurious wakeup in promote 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: Sergey Petrenko via Tarantool-patches Reply-To: Sergey Petrenko Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 22.07.2021 01:29, Vladislav Shpilevoy пишет: > I appreciate the work you did here! > > See 2 comments below. > >> diff --git a/test/replication/gh-3055-promote-wakeup-crash.result b/test/replication/gh-3055-promote-wakeup-crash.result >> new file mode 100644 >> index 000000000..e508611e5 >> --- /dev/null >> +++ b/test/replication/gh-3055-promote-wakeup-crash.result >> @@ -0,0 +1,43 @@ >> +-- test-run result file version 2 >> +test_run = require('test_run').new() >> + | --- >> + | ... >> +-- >> +-- gh-3055 follow-up: box.ctl.promote() could crash on an assertion after a >> +-- spurious wakeup. >> +-- >> +_ = box.space._cluster:insert{2, require('uuid').str()} >> + | --- >> + | ... >> +box.cfg{election_mode='manual',\ >> + replication_synchro_quorum=2,\ >> + election_timeout=1000} > 1. Shouldn't you save and restore the old option values in the end > of the test? Not anymore. As far as I know the default instance is restarted between each test run now. So we only need to reset persistent things now, like grants, roles, promotes/demotes, spaces and so on. >> + | --- >> + | ... >> + >> +fiber = require('fiber') >> + | --- >> + | ... >> +f = fiber.create(function() box.ctl.promote() end) >> + | --- >> + | ... >> +f:set_joinable(true) > 2. But you never use :join(). Perhaps you might want to call it > after :cancel(). To ensure the fiber really ended. Yep, my bad. Thanks for noticing! ===================================== diff --git a/test/replication/gh-3055-promote-wakeup-crash.result b/test/replication/gh-3055-promote-wakeup-crash.result index e508611e5..f915bf359 100644 --- a/test/replication/gh-3055-promote-wakeup-crash.result +++ b/test/replication/gh-3055-promote-wakeup-crash.result @@ -35,6 +35,11 @@ fiber.yield()  f:cancel()   | ---   | ... +f:join() + | --- + | - false + | - fiber is cancelled + | ...  box.cfg{election_mode='off'}   | ---   | ... diff --git a/test/replication/gh-3055-promote-wakeup-crash.test.lua b/test/replication/gh-3055-promote-wakeup-crash.test.lua index 2ac901b08..acf0c05b0 100644 --- a/test/replication/gh-3055-promote-wakeup-crash.test.lua +++ b/test/replication/gh-3055-promote-wakeup-crash.test.lua @@ -16,5 +16,6 @@ fiber.yield()  -- Cleanup.  f:cancel() +f:join()  box.cfg{election_mode='off'}  test_run:cleanup_cluster() ===================================== >> + | --- >> + | ... >> +f:wakeup() >> + | --- >> + | ... >> +fiber.yield() >> + | --- >> + | ... >> + >> +-- Cleanup. >> +f:cancel() >> + | --- >> + | ... >> +box.cfg{election_mode='off'} >> + | --- >> + | ... >> +test_run:cleanup_cluster() >> + | --- >> + | ...