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 118126EC55; Thu, 22 Jul 2021 02:29:18 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 118126EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1626910158; bh=Ed6JRra0i56JpGqBgu633Q27gpHZnt2+E8Q+XNcv4LQ=; 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=nhcJLK3F0jwjANofIu18W+DR01FcVVhzWxyX5OBqjMgg3nU6VSbPFlCpjE1xbeN0f yRBR8Am2RvpGf5eQWKwd6I+Q1GSQVbFkCr+fDK5aU3OtKHDA83aQSAgmWqGsSwqkgw EC3xQ5gIomytJDpcY7ChMIoav4DRUQyATfYd+db0= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (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 6D9F96EC55 for ; Thu, 22 Jul 2021 02:29:16 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6D9F96EC55 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1m6LeN-0002L4-TP; Thu, 22 Jul 2021 02:29:16 +0300 To: Serge Petrenko , gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org References: Message-ID: Date: Thu, 22 Jul 2021 01:29:14 +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 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD941C43E597735A9C3FDAB68B812060C77E621B90589399EB5182A05F538085040FB91CE181D2004E9C81B142C7B82B25DC70076B5B9D1C69066CA9462E83BA680 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE72942E6CCEF3332DBEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006377A7A7D315BEE81B48638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8640A4B7298ED23043202E03BC1A8DDB7117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8B2EE5AD8F952D28FBA471835C12D1D977C4224003CC8364762BB6847A3DEAEFB0F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7C565C1E6824D8037B43847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5200836DE4EE4DC3FA03BD1724EA27BBC5AA50D2A012C618CD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34951738D4D62E58A48B429DF9A0DDC9A536E18C7D1E133006A31B21F1B4EAD7E5A8BE88E03F2F953F1D7E09C32AA3244C80C78C5774202F9E80B0AB4A76558E4651E887DA02A9F7BFFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojaAaPr+N/4d2rUDl+Z4jYfA== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DFE6FB5DA21A43D4F6528E1B5C57174C23841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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? > + | --- > + | ... > + > +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. > + | --- > + | ... > +f:wakeup() > + | --- > + | ... > +fiber.yield() > + | --- > + | ... > + > +-- Cleanup. > +f:cancel() > + | --- > + | ... > +box.cfg{election_mode='off'} > + | --- > + | ... > +test_run:cleanup_cluster() > + | --- > + | ...