[Pkg-puppet-devel] Bug#977371: facter segfault inside libleatherman/libboost-filesystem
Radoslav Bodó
bodik at cesnet.cz
Mon Dec 14 13:58:05 GMT 2020
Package: facter
Version: 3.14.12-1+b1
Severity: important
Hello,
recently our CI starts to fail with new facter version 3.14.12-1+b1 with
segfault somewhere in some directory listing code, where 3.11.0-4.1 works
fine. The issue is reproducible in our custom VM (Xen based Bullseye VM)
and
also i debian/bullseye docker container.
Just running `facter` from the command line is sufficient to SEGFAULT.
Given the last few frames I'd suspect the mix of libboost in two versions
```
(gdb) bt
#0 0x00007fdc91790b08 in
boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&,
boost::system::error_code*) ()
from /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0
#1 0x00007fdc909b0299 in
boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&,
boost::filesystem::path const&, unsigned int, boost::system::error_code*) ()
from /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.74.0
#2 0x00007fdc915c5659 in leatherman::execution::exec_child(int, int,
int, unsigned long, char const*, char const**, char const**) () from
/usr/lib/x86_64-linux-gnu/libleatherman_execution.so.1.12.1
```
where the root cause might be version requirements difference between
facter and libleatherman1.12.1
```
Package: facter
Version: 3.14.12-1+b1
Depends: libfacter3.14.12 (= 3.14.12-1+b1),
libboost-program-options1.71.0, libc6 (>= 2.14), libgcc-s1 (>= 3.0),
libleatherman1.12.1 (>= 1.12.1+dfsg), libstdc++6 (>= 9), ruby (>= 1:2.7~0)
Package: libleatherman1.12.1
Version: 1.12.1+dfsg-1+b2
Depends: libboost-filesystem1.74.0 (>= 1.74.0), libboost-locale1.74.0
(>= 1.74.0), libboost-log1.74.0 (>= 1.74.0), libboost-regex1.74.0-icu67,
libc6 (>= 2.25), libcurl4 (>= 7.16.2), libgcc-s1 (>= 3.0), libstdc++6
(>= 5.2)
```
where the facter requires 1.71.0 and libleatherman requires 1.74.0. That
might be fine, but somehow call from libboost_filesystem.so.1.74.0 ends
up in libboost_filesystem.so.1.71.0 which is wierd, but I might be very
wrong here (broken linker/PTL/GOT ?).
Any advice, help or bug forward to correct place would be very appreciated.
Thank you
Radoslav Bodo
## packages installed
root at e6ce64eea94f:/btools# dpkg -l | grep -E '(facter|puppet|ruby|libboost)'
ii facter 3.14.12-1+b1
amd64 collect and display facts about the system
ii libboost-filesystem1.71.0:amd64 1.71.0-7+b1
amd64 filesystem operations (portable paths, iteration over
directories, etc) in C++
ii libboost-filesystem1.74.0:amd64 1.74.0-3+b1
amd64 filesystem operations (portable paths, iteration over
directories, etc) in C++
ii libboost-locale1.71.0:amd64 1.71.0-7+b1
amd64 C++ facilities for localization
ii libboost-locale1.74.0:amd64 1.74.0-3+b1
amd64 C++ facilities for localization
ii libboost-log1.74.0 1.74.0-3+b1
amd64 C++ logging library
ii libboost-program-options1.71.0:amd64 1.71.0-7+b1
amd64 program options library for C++
ii libboost-regex1.71.0:amd64 1.71.0-7+b1
amd64 regular expression library for C++
ii libboost-regex1.74.0:amd64 1.74.0-3+b1
amd64 regular expression library for C++
ii libboost-thread1.71.0:amd64 1.71.0-7+b1
amd64 portable C++ multi-threading
ii libboost-thread1.74.0:amd64 1.74.0-3+b1
amd64 portable C++ multi-threading
ii libfacter3.14.12:amd64 3.14.12-1+b1
amd64 collect and display facts about the system -- shared library
ii libruby2.7:amd64 2.7.2-3
amd64 Libraries necessary to run Ruby 2.7
ii rake 13.0.1-4
all ruby make-like utility
ii ruby 1:2.7+2
amd64 Interpreter of object-oriented scripting language Ruby
(default version)
ii ruby-augeas 1:0.5.0-3+b8
amd64 Augeas bindings for the Ruby language
ii ruby-deep-merge 1.1.1-1
all recursively merge Hash elements in Ruby
ii ruby-minitest 5.13.0-1
all Ruby test tools supporting TDD, BDD, mocking, and benchmarking
ii ruby-net-telnet 0.1.1-2
all telnet client library
ii ruby-power-assert 1.1.7-1
all library showing values of variables and method calls in an
expression
ii ruby-rubygems 3.2.0~rc.2-5
all Package management framework for Ruby
ii ruby-selinux:amd64 3.1-2+b2
amd64 Ruby bindings to SELinux shared libraries
ii ruby-shadow 2.5.0-1+b4
amd64 interface of shadow password for Ruby
ii ruby-test-unit 3.3.5-1
all unit testing framework for Ruby
ii ruby-xmlrpc 0.3.0-2
all XMLRPC library for Ruby
ii ruby2.7 2.7.2-3
amd64 Interpreter of object-oriented scripting language Ruby
ii rubygems-integration 1.17.3
all integration of Debian Ruby packages with Rubygems
## gdb backtrace
```
root at e6ce64eea94f:/# gdb /usr/bin/facter core
Reading symbols from /usr/bin/facter...
(No debugging symbols found in /usr/bin/facter)
[New LWP 4882]
[New LWP 4881]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `facter'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fdc91790b08 in
boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&,
boost::system::error_code*) ()
from /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0
[Current thread is 1 (LWP 4882)]
(gdb) bt
#0 0x00007fdc91790b08 in
boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&,
boost::system::error_code*) ()
from /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0
#1 0x00007fdc909b0299 in
boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&,
boost::filesystem::path const&, unsigned int, boost::system::error_code*) ()
from /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.74.0
#2 0x00007fdc915c5659 in leatherman::execution::exec_child(int, int,
int, unsigned long, char const*, char const**, char const**) () from
/usr/lib/x86_64-linux-gnu/libleatherman_execution.so.1.12.1
#3 0x00007fdc915cd51c in
leatherman::execution::create_child(leatherman::util::option_set<leatherman::execution::execution_options>
const&, int, int, int, unsigned long, char const*, char const**, char
const**) () from /usr/lib/x86_64-linux-gnu/libleatherman_execution.so.1.12.1
#4 0x00007fdc915c9617 in
leatherman::execution::execute(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > const*,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const*, std::map<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::less<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
std::allocator<std::pair<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > > > > const*, std::function<void (unsigned long)>
const&, std::function<bool (std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >&)> const&,
std::function<bool (std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >&)> const&,
leatherman::util::option_set<leatherman::execution::execution_options>
const&, unsigned int) () from
/usr/lib/x86_64-linux-gnu/libleatherman_execution.so.1.12.1
#5 0x00007fdc915ad071 in
leatherman::execution::execute(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > const&, unsigned int,
leatherman::util::option_set<leatherman::execution::execution_options>
const&) () from /usr/lib/x86_64-linux-gnu/libleatherman_execution.so.1.12.1
#6 0x00007fdc915fc2a6 in leatherman::ruby::api::find_library() () from
/usr/lib/x86_64-linux-gnu/libleatherman_ruby.so.1.12.1
#7 0x00007fdc915fc9fc in leatherman::ruby::api::create() () from
/usr/lib/x86_64-linux-gnu/libleatherman_ruby.so.1.12.1
#8 0x00007fdc915fcddb in leatherman::ruby::api::instance() () from
/usr/lib/x86_64-linux-gnu/libleatherman_ruby.so.1.12.1
#9 0x00007fdc91f880f1 in facter::ruby::initialize(bool) () from
/usr/lib/x86_64-linux-gnu/libfacter.so.3.14.12
#10 0x000055c3a72413c7 in main ()
(gdb)
```
More information about the Pkg-puppet-devel
mailing list