From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [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 291D842EF5C for ; Thu, 11 Jun 2020 16:01:16 +0300 (MSK) References: <0ea3492d-f878-77f3-bdae-350265da8eab@tarantool.org> <2d9df0c3-cc59-9b84-93c0-838cc03e4271@tarantool.org> From: Vladislav Shpilevoy Message-ID: <447674b0-13d9-a25a-edcd-f9dc3f3bb1c0@tarantool.org> Date: Thu, 11 Jun 2020 15:01:14 +0200 MIME-Version: 1.0 In-Reply-To: <2d9df0c3-cc59-9b84-93c0-838cc03e4271@tarantool.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit 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: Serge Petrenko , sergos@tarantool.org, gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org >> 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. Yeah, my bad. I somewhy thought you added the self check, and the NULL check was there before.