[build2] std::system_error: Resource temporarily unavailable

Dane Springmeyer dane at mapbox.com
Mon Feb 5 18:12:00 UTC 2018


I'm running into an odd behavior whereby `b` aborts with:

terminating with uncaught exception of type std::__1::system_error: Resource temporarily unavailable

It happens on Linux when `b` is called from a `Makefile`. When the exact same  `b` command is called directly things work normally.

There are a variety of things on my end that are custom and may be causing this, so please don't spend too much time trying to replicate if it is not easy. Happy to try to reduce things on my end.

My details are:

 - Using build2 toolchain compiled against libc++ from llvm 5.0.0 via this build script: https://github.com/mapbox/mason/blob/master/scripts/build2/0.7.0-a.0.1517662481.a542a12b9195bb49/script.sh
 - Running on ubuntu precise, within docker
 - Unable to replicate on OS X, but am able to replace Linux (both running inside docker locally on OS X and in docker on travis) 

I've not had a chance to test build2 in debug mode, but this is the backtrace from build2 in release mode:

# logbt -- make
[logbt] using corefile location: /tmp/logbt-coredumps
[logbt] using core_pattern: core.%p.%E
mason_packages/.link/bin/b -v config.cxx=/home/travis/build/mapbox/mason/hpp-skel/.toolchain/bin/clang++ config.cxx.coptions="-O3 -DNDEBUG -D_GLIBCXX_USE_CXX11_ABI=0"
cxx hello at ./
  cxx        /home/travis/build/mapbox/mason/hpp-skel/.toolchain/bin/clang++
  id         clang
  version    5.0.0 (https://github.com/mapbox/mason) (based on LLVM 5.0.0git-30c4647)
  major      5
  minor      0
  patch      0
  build      (https://github.com/mapbox/mason) (based on LLVM 5.0.0git-30c4647)
  signature  mapbox/mason clang version 5.0.0 (https://github.com/mapbox/mason) (based on LLVM 5.0.0git-30c4647)
  checksum   5dd104b8f430968c6303b9f2ff93295217686ec824151eabd38329a4143704fb
  target     x86_64-linux-gnu (x86_64-unknown-linux-gnu)
  runtime    libgcc
  stdlib     libstdc++
  c stdlib   glibc
  std        -std=c++11
  pattern    /home/travis/build/mapbox/mason/hpp-skel/.toolchain/bin/*
terminating with uncaught exception of type std::__1::system_error: Resource temporarily unavailable
Aborted (core dumped)
make: *** [release] Error 134
[logbt] saw 'make' exit with code:2 (INT)
[logbt] Found corefile (non-tracked) at /tmp/logbt-coredumps/core.668.!home!travis!build!mapbox!mason!hpp-skel!mason_packages!linux-x86_64!build2!0.7.0-a.0.1517662481.a542a12b9195bb49!bin!b
[logbt] Processing cores...
[New LWP 668]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `mason_packages/.link/bin/b -v config.cxx=/home/travis/build/mapbox/mason/hpp-sk'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00002b412a457035 in raise () from /lib/x86_64-linux-gnu/libc.so.6

Thread 1 (Thread 0x2b41298ee440 (LWP 668)):
#0  0x00002b412a457035 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00002b412a45a79b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x000000000046e23c in abort_message ()
#3  0x0000000000470df1 in demangling_terminate_handler() ()
#4  0x000000000046dc43 in std::__terminate(void (*)()) ()
#5  0x000000000046f936 in __cxa_throw ()
#6  0x0000000000690616 in butl::throw_system_error(int, int) ()
#7  0x00000000005549c6 in build2::scheduler::create_helper(std::__1::unique_lock<std::__1::mutex>&) ()
#8  0x00000000005af5df in build2::match(build2::action, build2::target const&, unsigned long, std::__1::atomic<unsigned long>*, bool) ()
#9  0x0000000000556084 in build2::match(butl::small_vector<build2::value, 1ul> const&, build2::action, build2::action_targets&, bool) ()
#10 0x000000000040bcbc in build2::main(int, char**) ()
#11 0x00002b412a4427ed in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#12 0x0000000000407d39 in _start ()


Happy to provide more details about how to replicate if you need. Or try harder to reduce on my end, if you have ideas.

Thanks,

Dane




More information about the users mailing list