From: Gavin Andresen <gavinandresen@gmail.com>
To: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] 0.4rc1 known bugs
Date: Tue, 6 Sep 2011 13:59:29 -0400 [thread overview]
Message-ID: <CABsx9T3kV884bc-f9SVBGPixMOi6fEwo4do8gixTBTK-szFS1A@mail.gmail.com> (raw)
In-Reply-To: <CAPg+sBjy1FANzv5N7P4kx0Djqz-P2XbqQAFTxnK-MVu8erja+g@mail.gmail.com>
Nice work, Detective Wuille!
Patch for the deadlock issue:
https://github.com/bitcoin/bitcoin/pull/500
I took a different approach to fix from the one Pieter suggested,
performing the database operation after the cs_mapaddresses deadlock
is released. Please review to check my logic, it did survive my
start/stop/restart... stress test.
And I did review every place in the code that starts a database
transaction, to look for similar issues, and they are all OK.
RE: improving DEBUG_LOCKORDER: requires some thought. Deadlocks are
still possible with TRY_CRITICAL_SECTION, if some codepaths TRY and
some don't.
On Tue, Sep 6, 2011 at 7:55 AM, Pieter Wuille
<pieter.wuille@cs.kuleuven.be> wrote:
> My mistake: these are not actual potential deadlocks, as all locking
> of cs_vRecv/cs_vSend
> happens inside TRY_CRITICAL_SECTION blocks. Gavin, maybe you can add the rule to
> your debug code that ignores critical sections which are only locked
> through TRY_...?
>
>>> + sipa found what looks like a deadlock between the addr-handling and
>>> IRC-join-handling code.
>
> Regarding the actual deadlock between IRC seeding and AddAddress:
>
> Internally, DB also uses pthreads to implement the txn_begin()/commit() scheme,
> though I'm not sure with which granularity. These need to be taken into account
> when searching for deadlocks, but are obviously not detected by
> DEBUG_LOCKORDER.
--
--
Gavin Andresen
next prev parent reply other threads:[~2011-09-06 17:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-04 0:13 [Bitcoin-development] 0.4rc1 known bugs Gavin Andresen
2011-09-04 2:43 ` Matt Corallo
2011-09-05 7:25 ` Michael Grønager
2011-09-05 12:42 ` Luke-Jr
2011-09-05 12:47 ` Michael Grønager
[not found] ` <20110904115926.GA16476@ulyssis.org>
2011-09-06 11:55 ` Pieter Wuille
2011-09-06 17:59 ` Gavin Andresen [this message]
2011-09-06 20:55 ` Luke-Jr
2011-09-07 15:07 ` Gavin Andresen
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=CABsx9T3kV884bc-f9SVBGPixMOi6fEwo4do8gixTBTK-szFS1A@mail.gmail.com \
--to=gavinandresen@gmail.com \
--cc=bitcoin-development@lists.sourceforge.net \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox