From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 38DDA445320 for ; Fri, 17 Jul 2020 23:33:39 +0300 (MSK) Received: by mail-lj1-f193.google.com with SMTP id h22so14098010lji.9 for ; Fri, 17 Jul 2020 13:33:39 -0700 (PDT) Date: Fri, 17 Jul 2020 23:33:36 +0300 From: Cyrill Gorcunov Message-ID: <20200717203336.GB2613@grain> References: <20200714144440.551127-1-gorcunov@gmail.com> <20200714144440.551127-5-gorcunov@gmail.com> <20200714145358.GG296695@grain> <20200717072550.GA2613@grain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH v2 4/4] qsync: don't send negative timeouts into fiber_cond_wait_timeout List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tml On Fri, Jul 17, 2020 at 10:03:49PM +0200, Vladislav Shpilevoy wrote: > > > > Am I missing something obvious here? > > I still don't see how to trigger this assert. Please, show a code sample with > error injection, if you think that will help. I explicitly added line > 'timeout = -1;' and all worked fine. > --- [cyrill@grain tarantool.git] git diff diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c index 0924952b7..50e6326b3 100644 --- a/src/box/txn_limbo.c +++ b/src/box/txn_limbo.c @@ -175,8 +175,9 @@ txn_limbo_wait_complete(struct txn_limbo *limbo, struct txn_limbo_entry *entry) while (true) { double deadline = start_time + replication_synchro_timeout; double timeout = deadline - fiber_clock(); - if (timeout < 0) - goto do_rollback; + timeout = -1; + //if (timeout < 0) + // goto do_rollback; bool cancellable = fiber_set_cancellable(false); int rc = fiber_cond_wait_timeout(&limbo->wait_cond, timeout); fiber_set_cancellable(cancellable); @@ -512,8 +513,9 @@ txn_limbo_wait_confirm(struct txn_limbo *limbo) while (true) { double deadline = start_time + replication_synchro_timeout; double timeout = deadline - fiber_clock(); - if (timeout < 0) - goto timed_out; + timeout = -1; + //if (timeout < 0) + // goto timed_out; bool cancellable = fiber_set_cancellable(false); int rc = fiber_cond_wait_timeout(&limbo->wait_cond, timeout); fiber_set_cancellable(cancellable); --- [cyrill@grain test] ./test-run.py replication/qsync_basic.test.lua ... [001] [Instance "master" killed by signal: 6 (SIGABRT)] [001] Found assertion fail in the results file [/home/cyrill/d1/projects/tarantool/tarantool.git/test/var/001_replication/master.log]: You did the same thing? Note that it requires debug build.