connection limit calculation for select() is overly ambitious with -txindex #6411

issue TheBlueMatt opened this issue on July 9, 2015
  1. TheBlueMatt commented at 9:40 PM on July 9, 2015: member

    Running an unmodified 0.10.2 node I got this fail, seeming to indicate that it was trying to add an fd which was higher than the max for select. Node has -txindex and usually has a ton of connections (it has the max fd count set higher than default st. its maxconnections is limited by its select limits, not by max fd count limits).

    Core was generated by `/home/matt/bitcoind'. Program terminated with signal SIGABRT, Aborted. #0 0x00007f327f0c0528 in raise () from /usr/lib/libc.so.6

    (gdb) bt #0 0x00007f327f0c0528 in raise () from /usr/lib/libc.so.6 #1 0x00007f327f0c193a in abort () from /usr/lib/libc.so.6 #2 0x00007f327f0febb2 in __libc_message () from /usr/lib/libc.so.6 #3 0x00007f327f184ff7 in __fortify_fail () from /usr/lib/libc.so.6 #4 0x00007f327f1831c0 in __chk_fail () from /usr/lib/libc.so.6 #5 0x00007f327f184f67 in __fdelt_warn () from /usr/lib/libc.so.6 #6 0x00007f328199fa5e in ThreadSocketHandler () at net.cpp:820 #7 0x00007f32819a7c11 in TraceThread<void (*)()> (name=0x7f3281b857a1 "net", func=0x7f328199eff0 <ThreadSocketHandler()>) at util.h:214 #8 0x00007f3280ddfa85 in ?? () from /usr/lib/libboost_thread.so.1.58.0 #9 0x00007f327f436354 in start_thread () from /usr/lib/libpthread.so.0 #10 0x00007f327f174bfd in clone () from /usr/lib/libc.so.6

    (gdb)

  2. TheBlueMatt commented at 9:41 PM on July 9, 2015: member

    Solution is probably to switch to libevent or something else which means we dont have to call select directly.

  3. theuni commented at 5:51 PM on July 10, 2015: member

    @TheBlueMatt That's something I'm working on at the moment.

  4. sipa commented at 5:52 PM on July 10, 2015: member

    See #6412 for a rough fix.

  5. laanwj closed this on Jul 20, 2015

  6. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me