Closed fabricemarie closed 3 years ago
Something in the depths of the C++ runtime is throwing an exception in the log ostream.
We've seen this from time to time. Usually it happens after upgrading some part of libc or libc++, and all binaries have to be rebuilt to make it stop. Haven't been able to figure out what this is, but it may be related to incomplete or buggy pthread_cancel
support. It might be some obscure ABI incompatibility, based on _gcc_personality_v0
in the stack trace, and the fact the problem goes away after updating all the -devel
packages on the build system and rebuilding.
On the other hand, we only use pthread_cancel
in a few cases, and none of them are needed. It was certainly convenient to write some of the code assuming pthread_cancel
works, but we literally only call it while the process is exiting, and there are one or two cases like these where it does not work.
Also note that running on '/' doesn't work if '/' is not the root of a btrfs volume (it can't be a named subvol, it must be subvol=/). The code might be trying to print an exception like this one:
# ~./bin/bees /
bees version v0.6-152-gbfc4a9b5
2021-04-28 16:46:12.826 23138.23138<7> bees: Masking signals
2021-04-28 16:46:12.826 23138.23138<7> bees: BeesThread exec progress_report
2021-04-28 16:46:12.826 23138.23138<7> bees: BeesThread exec status_report
2021-04-28 16:46:12.826 23138.23139<7> progress_report: Starting thread progress_report
2021-04-28 16:46:12.826 23138.23138<6> bees: setting rlimit NOFILE to 10340
2021-04-28 16:46:12.826 23138.23140<7> status_report: Starting thread status_report
2021-04-28 16:46:12.826 23138.23138<5> bees: setting worker thread pool maximum size to 16
2021-04-28 16:46:12.826 23138.23140<7> status_report: Exiting thread status_report, 0.001 sec
2021-04-28 16:46:12.826 23138.23138<5> bees: setting root path to '/'
2021-04-28 16:46:12.826 23138.23138<6> bees: set_root_path /
2021-04-28 16:46:12.826 23138.23138<6> bees: set_root_fd /
2021-04-28 16:46:12.826 23138.23138<7> bees: BeesThread destructor status_report
2021-04-28 16:46:12.826 23138.23138<7> bees: Cancelling thread status_report
2021-04-28 16:46:12.826 23138.23138<7> bees: pthread_cancel returned Unknown error -3
2021-04-28 16:46:12.826 23138.23138<7> bees: Waiting for thread status_report
2021-04-28 16:46:12.826 23138.23138<7> bees: Waited for status_report, 0.001 sec
2021-04-28 16:46:12.826 23138.23138<7> bees: BeesThread destructor progress_report
2021-04-28 16:46:12.826 23138.23138<7> bees: Cancelling thread progress_report
2021-04-28 16:46:12.826 23138.23138<7> bees: Waiting for thread progress_report
2021-04-28 16:46:12.826 23138.23138<7> bees: Waited for progress_report, 0.001 sec
2021-04-28 16:46:12.826 23138.23138<5> bees:
2021-04-28 16:46:12.826 23138.23138<5> bees:
2021-04-28 16:46:12.826 23138.23138<5> bees: *** EXCEPTION ***
2021-04-28 16:46:12.826 23138.23138<5> bees: exception type std::invalid_argument: root_fd_treeid = 258 failed constraint check (root_fd_treeid == BTRFS_FS_TREE_OBJECTID) at bees-context.cc:940
2021-04-28 16:46:12.826 23138.23138<5> bees: ***
terminate called after throwing an instance of 'std::invalid_argument'
what(): root_fd_treeid = 258 failed constraint check (root_fd_treeid == BTRFS_FS_TREE_OBJECTID) at bees-context.cc:940
Aborted
If '/' is not the root of a btrfs then you will need to mount the btrfs root somewhere else so bees can access it. This is the purpose of the /var/lib/bees
mounts in https://zygo.github.io/bees/running.html
Changed the root volume to be subvol=/ (and indeed upgraded a few packages since the original submission date). It works beautifully now. Thanks!
Hi, When trying to run bees I get a coredump. I recompiled it with debug symbols and I get this:
I tried with
--help
first:Then directly on / (which is the root path volID 5) and get a different signal/coredump:
The packages I use are are x86_64: kernel-5.10.16-200 gcc-c++-10.2.1-9 libuuid-devel-2.36.1-1 btrfs-progs-5.10-1