Page MenuHomePhabricator

rpc: work-around an upstream libevent bug
ClosedPublic

Authored by nakihito on Mar 4 2019, 20:52.

Details

Reviewers
jasonbcox
deadalnix
Fabien
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rSTAGINGc9de86eddb4a: rpc: work-around an upstream libevent bug
rABCc9de86eddb4a: 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)

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Mar 4 2019, 20:52
nakihito edited the test plan for this revision. (Show Details)
This revision now requires changes to proceed.Mar 4 2019, 21:22
This revision is now accepted and ready to land.Mar 4 2019, 22:57
This revision was automatically updated to reflect the committed changes.