From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (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 272314429E1 for ; Thu, 11 Jun 2020 11:46:40 +0300 (MSK) References: <0ea3492d-f878-77f3-bdae-350265da8eab@tarantool.org> From: Serge Petrenko Message-ID: <2d9df0c3-cc59-9b84-93c0-838cc03e4271@tarantool.org> Date: Thu, 11 Jun 2020 11:46:38 +0300 MIME-Version: 1.0 In-Reply-To: <0ea3492d-f878-77f3-bdae-350265da8eab@tarantool.org> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [Tarantool-patches] [PATCH 5/8] txn_limbo: follow-up fixes List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy , sergos@tarantool.org, gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org 11.06.2020 02:51, Vladislav Shpilevoy пишет: > Thanks for the fixes! Thanks for  the answer! > > On 09/06/2020 14:20, Serge Petrenko wrote: >> Part-of #4847 >> Follow-up #4844 >> Follow-up #4845 >> --- >> src/box/txn.c | 5 +++-- >> src/box/txn_limbo.c | 2 +- >> 2 files changed, 4 insertions(+), 3 deletions(-) >> >> diff --git a/src/box/txn.c b/src/box/txn.c >> index 1d6518e29..f30e20944 100644 >> --- a/src/box/txn.c >> +++ b/src/box/txn.c >> @@ -459,7 +459,7 @@ txn_complete(struct txn *txn) >> * back to the fiber, owning the transaction so as >> * it could decide what to do next. >> */ >> - if (txn->fiber != fiber()) >> + if (txn->fiber != NULL && txn->fiber != fiber()) >> fiber_wakeup(txn->fiber); > Does it crash if you wakeup self? I thought it was fine, since > the self fiber already contains FIBER_IS_READY (doesn't it?). No. But you're waking up txn->fiber,  which  may be NULL. Hence I added the check. -- Serge Petrenko