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
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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

nakihito created this revision.Mar 4 2019, 20:52
Owners added a reviewer: Restricted Owners Package.Mar 4 2019, 20:52
Herald added a reviewer: Restricted Project. · View Herald TranscriptMar 4 2019, 20:52
Herald added a subscriber: schancel. · View Herald Transcript
nakihito edited the summary of this revision. (Show Details)Mar 4 2019, 20:53
nakihito edited the test plan for this revision. (Show Details)
nakihito edited the test plan for this revision. (Show Details)Mar 4 2019, 20:54
This revision now requires changes to proceed.Mar 4 2019, 21:22
jasonbcox accepted this revision.Mar 4 2019, 22:57
This revision is now accepted and ready to land.Mar 4 2019, 22:57
This revision was automatically updated to reflect the committed changes.