HomePhabricator

Fix potential deadlock
c581cc16bb5eUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix potential deadlock

Conflict:

  • cs_main in ProcessMessages() (before calling ProcessMessages)
  • cs_vSend in CNode::BeginMessage

versus:

  • cs_vSend in ThreadMessageHandler2 (before calling SendMessages)
  • cs_main in SendMessages

Even though cs_vSend is a try_lock, if it succeeds simultaneously with
the locking of cs_main in ProcessMessages(), it could cause a deadlock.

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Apr 17 2012, 16:50
schancelPushed on Jan 5 2018, 21:58
schancelPushed on Jan 5 2018, 21:39
schancelPushed on Jan 5 2018, 21:17
Parents
rSTAGING7a5452ffb307: Merge pull request #1092 from laanwj/2012_04_sendcoins_setlabelfix
Branches
Unknown
Tags
Unknown

Event Timeline

Pieter Wuille <pieter.wuille@gmail.com> committed rSTAGINGc581cc16bb5e: Fix potential deadlock (authored by Pieter Wuille <pieter.wuille@gmail.com>).Apr 17 2012, 16:50