boost::thread_resource_error: Resource temporarily unavailable on Rasbpian Jessie #6593

issue unsystemizer opened this issue on August 27, 2015
  1. unsystemizer commented at 5:07 PM on August 27, 2015: contributor
    $ sudo bitcoind --conf=/home/user/.bitcoin/bitcoin.testnet.conf
    ************************
    EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEEE
    boost::thread_resource_error: Resource temporarily unavailable
    bitcoin in AppInit()
    

    Bitcoin debug.log:

    2015-08-27 16:57:12 Bitcoin version v0.11.0.0-g4a1bc9f (Fri, 10 Jul 2015 19:05:23 +0100)
    2015-08-27 16:57:12 Using OpenSSL version OpenSSL 1.0.1k 8 Jan 2015
    2015-08-27 16:57:12 Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    2015-08-27 16:57:12 Default data directory /home/user/.bitcoin
    2015-08-27 16:57:12 Using data directory /home/user/.bitcoin/testnet3
    2015-08-27 16:57:12 Using config file /home/user/.bitcoin/bitcoin.testnet.conf
    2015-08-27 16:57:12 Using at most 125 connections (1024 file descriptors available)
    2015-08-27 16:57:12 Using 4 threads for script verification
    2015-08-27 16:57:12 scheduler thread start
    2015-08-27 16:57:12 Binding RPC on address ::1 port 18332 (IPv4+IPv6 bind any: 0)
    2015-08-27 16:57:12 ERROR: Binding RPC on address ::1 port 18332 failed: open: Address family not supported by protocol
    2015-08-27 16:57:12 Binding RPC on address 127.0.0.1 port 18332 (IPv4+IPv6 bind any: 0)
    2015-08-27 16:57:12
    ************************
    EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_21thread_resource_errorEEEEE
    

    Libraries linked by bitcoind:

     linux-vdso.so.1 (0x7efcb000)
            /usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0x7697f000)
            libboost_system.so.1.55.0 => /usr/lib/arm-linux-gnueabihf/libboost_system.so.1.55.0 (0x7695a000)
            libboost_filesystem.so.1.55.0 => /usr/lib/arm-linux-gnueabihf/libboost_filesystem.so.1.55.0 (0x76935000)
            libboost_program_options.so.1.55.0 => /usr/lib/arm-linux-gnueabihf/libboost_program_options.so.1.55.0 (0x768c0000)
            libboost_thread.so.1.55.0 => /usr/lib/arm-linux-gnueabihf/libboost_thread.so.1.55.0 (0x7689c000)
            libboost_chrono.so.1.55.0 => /usr/lib/arm-linux-gnueabihf/libboost_chrono.so.1.55.0 (0x76885000)
            libssl.so.1.0.0 => /usr/lib/arm-linux-gnueabihf/libssl.so.1.0.0 (0x7682b000)
            libminiupnpc.so.5 => /usr/lib/libminiupnpc.so.5 (0x7681c000)
            libcrypto.so.1.0.0 => /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0 (0x766af000)
            libanl.so.1 => /lib/arm-linux-gnueabihf/libanl.so.1 (0x7669c000)
            libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x765c0000)
            libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76544000)
            libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76517000)
            libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x764ef000)
            libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x763b2000)
            /lib/ld-linux-armhf.so.3 (0x54b75000)
            librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x7639b000)
            libboost_atomic.so.1.55.0 => /usr/lib/arm-linux-gnueabihf/libboost_atomic.so.1.55.0 (0x76388000)
            libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76375000)
    

    Other info:

    $ uname -a
    Linux raspberrypi 4.1.6-v7+ [#810](/bitcoin-bitcoin/810/) SMP PREEMPT Tue Aug 18 15:32:12 BST 2015 armv7l GNU/Linux
    $ gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper
    Target: arm-linux-gnueabihf
    Configured with: ../src/configure -v --with-pkgversion='Raspbian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
    Thread model: posix
    gcc version 4.9.2 (Raspbian 4.9.2-10)
    
    

    This error is similar to #639, but it appears at the very beginning.

  2. paveljanik commented at 1:20 PM on August 30, 2015: contributor

    Can you show us the config file? Do you have any *notify set?

  3. unsystemizer commented at 1:59 PM on August 30, 2015: contributor

    No notify's, but now that you mention the config file, I went through each option and I think I overdid it with rpcthreads. I had looked at recent Raspbian kernel and RPi2 info and I thought saw the kernel limit is high now so thought rpcthreads=1000 should be fine. I also looked at this so I thought I'd be okay.

    $ cat /proc/sys/kernel/threads-max
    15441
    

    Apparently not. I just removed that line (rpcthreads) and it starts okay. Could bitcoind check for this resource and throw a better error?

  4. paveljanik commented at 2:04 PM on August 30, 2015: contributor

    Do you have any reason to change the default value at all?

    But great we have the source of the problem now.

  5. paveljanik commented at 8:07 PM on August 30, 2015: contributor

    Well, maybe the problem in your case is memory and not threads...

  6. unsystemizer commented at 5:05 AM on August 31, 2015: contributor

    I used to run (0.10, though) on the older Pi (512MB), this is on Pi2 (1GB) and swap file size is the same (besides, it fails instantly). You can close this as far as I'm concerned.

    Do you have any reason to change the default value at all?

    Yes, I run a Counterparty server against this and the default number of RPC threads causes timeouts on RPC client side.

  7. laanwj commented at 3:53 PM on September 4, 2015: member

    I understand increasing it above 4, but 1000 RPC threads is completely absurd. Even on a desktop, but certainly on a small device.

  8. laanwj closed this on Sep 4, 2015

  9. 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-17 06:15 UTC

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