HomePhabricator

rpc: work-around an upstream libevent bug

Description

rpc: work-around an upstream libevent bug

Summary:
A rare race condition may trigger while awaiting the body of a message, see
upsteam commit 5ff8eb26371c4dc56f384b2de35bea2d87814779 for details.

This may fix some reported rpc hangs/crashes.

Backport of Bitcoin Core PR#11593.
Completes T466.

Test Plan:

make check
test_runner.py

Following the only documented attempt I could find for replicating the bug: https://github.com/bitcoin/bitcoin/pull/11593#issuecomment-341489496
Running bitcoind -regtest in with while true; do curl -XGET --data-binary . 127.0.0.1:18444; done while doing rpc commands
This should output curl: (52) Empty reply from server (bug would rarely cause a crash)

Reviewers: jasonbcox, deadalnix, Fabien, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Subscribers: teamcity, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2642

Details

Provenance
Cory Fields <cory-nospam-@coryfields.com>Authored on Nov 1 2017, 16:02
nakihitoCommitted on Mar 4 2019, 23:04
nakihitoPushed on Mar 4 2019, 23:04
Reviewer
Restricted Owners Package
Differential Revision
D2642: rpc: work-around an upstream libevent bug
Parents
rABC43d3860f4c0b: Removed unused confirmation target dropdown from the UI
Branches
Unknown
Tags
Unknown

Event Timeline

Nico Guiton <nico@bitframe.org> committed rABCc9de86eddb4a: rpc: work-around an upstream libevent bug (authored by Cory Fields <cory-nospam-@coryfields.com>).Mar 4 2019, 23:04