Page MenuHomePhabricator

[seeder] Return an error when thread creation fails
ClosedPublic

Authored by roqqit on Fri, Dec 13, 19:37.

Details

Reviewers
PiRK
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC200513e58adb: [seeder] Return an error when thread creation fails
Summary

In some environments, thread creation can fail. The weakest link here is attempting to set the stack size for the crawler thread which will bail if the stack size doesn't meet various requirements. Debugging this without an error message requires far too much effort because the seeder will silently continue running even though no crawler thread is live.

Since the risk of running the seeder without any of the threads (except maybe stats) is too high, it is best to check all of them for errors.

Test Plan

Unfortunately I don't know what I did to make it blow up. But I suspect mucking around with ulimit can trigger the error. In a bad environment without the patch it will continue silently. With the patch, it will error and give you a useful error number to lookup.

./bitcoin-seeder

Diff Detail