Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja.osipov@gmail.com>
To: Leonid Vasiliev <lvasiliev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2] Add some cancellation guard
Date: Wed, 18 Mar 2020 11:26:10 +0300	[thread overview]
Message-ID: <20200318082610.GA26019@atlas> (raw)
In-Reply-To: <0e7fddec984120e36c098cd546ecae4fddc726cd.1577346185.git.lvasiliev@tarantool.org>

* Leonid Vasiliev <lvasiliev@tarantool.org> [19/12/26 10:51]:
> We need to set a thread cancellation guard, because
> another thread may cancel the current thread at a
> really bad time (messages flush, mutex lock)
> 
> Fixes: #4127

I think we have to do this patch, as long as we use
pthread_cancel().

An alternative is to ignore the bug. There is no harm in Tarantool
in crashing at exit, as long as we close the wal first.

And we should close the wal first!

AFAIU pthread_setcancellable is a thread-local and cheap
operation. Could you please confirm this? (I haven't studied the
pthread implementation code since 2001, when Linux only had Xavier
Leroy's threads).


-- 
Konstantin Osipov, Moscow, Russia

  parent reply	other threads:[~2020-03-18  8:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-26  7:46 Leonid Vasiliev
2020-03-16 11:23 ` Cyrill Gorcunov
2020-03-17 18:49   ` Georgy Kirichenko
2020-03-17 19:16     ` Cyrill Gorcunov
2020-03-18  9:00   ` lvasiliev
2020-03-18  9:34     ` Cyrill Gorcunov
2020-03-18  8:26 ` Konstantin Osipov [this message]
2020-03-23  6:43   ` lvasiliev
2020-03-20 11:17 ` Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200318082610.GA26019@atlas \
    --to=kostja.osipov@gmail.com \
    --cc=lvasiliev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2] Add some cancellation guard' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox