Bug#962692: [Pkg-puppet-devel] Bug#962692: puppet: Crashes due to "missing" facts.d directories
Control: reassign -1 facter Control: merge -1 962784 Hi and thanks for the report! Wilmer van der Gaast writes: > Package: puppet > Version: 5.5.19-1 > Severity: grave > Justification: renders package unusable > > > Since the recent Ruby upgrade, Puppet invocations have been very noisy for a > while already. > > But by now it's not even starting. Even after a dpkg -P including most > dependencies (including apt-get remove ruby.*) then reinstalling, all I > get is: > > wilmer@veer:~/adsb$ sudo puppet agent --waitforcert 60 -t > /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is > obsolete > /usr/lib/ruby/vendor_ruby/puppet/file_system/file_impl.rb:80: warning: Using > the last argument as keyword parameters is deprecated > free(): invalid pointer > Aborted > This is a facter issue, as outlined in #962784. I'm reassigning this bug to facter and merging with #962784. Regards, Apollon
Bug#962692: puppet: Crashes due to "missing" facts.d directories
>From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=962320 I guess swapping libboost library versions may be a more proper fix. Though I haven't tried this myself yet.
Bug#962692: puppet: Crashes due to "missing" facts.d directories
Hi, >> A quick workaround to get facter to run is to create the three >> directories: > >> /etc/facter/facts.d >> /etc/puppetlabs/facter/facts.d >> /opt/puppetlabs/facter/facts.d > > Yup, confirmed that works. Thank you! thanks for the workaround. while it seems to work when running facter as root, I'm still getting the same crash (back trace seems to be the same) when running facter as an unprivileged user even though the three directories are world-readable. I'm reporting this added detail since using puppet/facter as an unprivileged user can be important for validating syntax, running spec tests, etc. during development. $ ls -ld /etc/facter/facts.d/ /etc/puppetlabs/facter/facts.d /opt/puppetlabs/facter/facts.d drwxr-xr-x 2 root root 4096 Jun 15 17:10 /etc/facter/facts.d/ drwxr-xr-x 2 root root 4096 Jun 15 17:10 /etc/puppetlabs/facter/facts.d drwxr-xr-x 2 root root 4096 Jun 15 17:10 /opt/puppetlabs/facter/facts.d $ facter free(): invalid size Aborted $ gdb facter [...] Reading symbols from facter... (No debugging symbols found in facter) (gdb) r Starting program: /usr/bin/facter [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Detaching after vfork from child process 1565235] free(): invalid pointer Program received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x779bf55b in __GI_abort () at abort.c:79 #2 0x77a18038 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x77b24f3e "%s\n") at ../sysdeps/posix/libc_fatal.c:181 #3 0x77a1f3da in malloc_printerr (str=str@entry=0x77b230e0 "free(): invalid pointer") at malloc.c:5339 #4 0x77a20dcc in _int_free (av=, p=, have_lock=0) at malloc.c:4173 #5 0x77e775d4 in ?? () from /usr/lib/x86_64-linux-gnu/libfacter.so.3.11.0 #6 0x77e77bd8 in facter::facts::collection::add_external_facts(std::vector, std::allocator >, std::allocator, std::allocator > > > const&) () from /usr/lib/x86_64-linux-gnu/libfacter.so.3.11.0 #7 0x5557154c in main () signature.asc Description: OpenPGP digital signature
Bug#962692: puppet: Crashes due to "missing" facts.d directories
Huh https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=962320 may in fact be a duplicate.
Bug#962692: puppet: Crashes due to "missing" facts.d directories
On Fri, 12 Jun 2020, at 09:38, intrigeri wrote: > > Some stracing uncovered that it was trying to read the following > > directories: > > > > /opt/puppetlabs/facter/facts.d > > /etc/facter/facts.d > > /etc/puppetlabs/facter/facts.d > > > > through trial and Aborted errors I've created those and now it works again. > > I confirm this workaround fixes the problem for me as well. > Thanks for figuring it out and sharing this workaround :) > Ha, no worries, glad you discovered this so quickly then! For others who run into this, let's reduce the above into a oneliner: mkdir -p /opt/puppetlabs/facter/facts.d /etc/facter/facts.d /etc/puppetlabs/facter/facts.d I just realised that indeed my other testing box had this problem and again it was resolved by creating these directories. Logs show that puppet on this box disappeared on the 7th. (I separately have a cronjob that restarts puppet daily due to memory leaks (maybe long gone, the cronjob is years old), helping early discovery of this issue) dpkg.log doesn't show any ruby or puppet packages being touched then but I do see some libboost libraries, I believe at least some of these are (indirect) puppet dependencies? `//
Bug#962692: puppet: Crashes due to "missing" facts.d directories
Hi, Wilmer van der Gaast (2020-06-12): > wilmer@veer:~/adsb$ sudo puppet agent --waitforcert 60 -t > /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is > obsolete > /usr/lib/ruby/vendor_ruby/puppet/file_system/file_impl.rb:80: warning: Using > the last argument as keyword parameters is deprecated > free(): invalid pointer > Aborted On a sid system, I see puppet-master.service failing to start with the same "free(): invalid pointer" error. > Some stracing uncovered that it was trying to read the following > directories: > > /opt/puppetlabs/facter/facts.d > /etc/facter/facts.d > /etc/puppetlabs/facter/facts.d > > through trial and Aborted errors I've created those and now it works again. I confirm this workaround fixes the problem for me as well. Thanks for figuring it out and sharing this workaround :) Cheers!
Bug#962692: puppet: Crashes due to "missing" facts.d directories
Package: puppet Version: 5.5.19-1 Severity: grave Justification: renders package unusable Since the recent Ruby upgrade, Puppet invocations have been very noisy for a while already. But by now it's not even starting. Even after a dpkg -P including most dependencies (including apt-get remove ruby.*) then reinstalling, all I get is: wilmer@veer:~/adsb$ sudo puppet agent --waitforcert 60 -t /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is obsolete /usr/lib/ruby/vendor_ruby/puppet/file_system/file_impl.rb:80: warning: Using the last argument as keyword parameters is deprecated free(): invalid pointer Aborted Some gdb'ing and strace'ing suggests it gets stuck in facter, which indeed fails individually with the ~same error. Some stracing uncovered that it was trying to read the following directories: /opt/puppetlabs/facter/facts.d /etc/facter/facts.d /etc/puppetlabs/facter/facts.d through trial and Aborted errors I've created those and now it works again. Really wondering what's special about my system, or are more folks seeing this? -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 5.6.0-1-amd64 (SMP w/8 CPU cores) Kernel taint flags: TAINT_WARN Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages puppet depends on: ii adduser 3.118 ii facter 3.11.0-4.1 ii hiera 3.2.0-2 ii init-system-helpers 1.57 ii lsb-base 11.1.0 ii ruby 1:2.7+1 ii ruby-augeas 1:0.5.0-3+b8 ii ruby-deep-merge 1.1.1-1 ii ruby-shadow 2.5.0-1+b3 Versions of packages puppet recommends: ii debconf-utils 1.5.74 ii lsb-release 11.1.0 ii ruby-selinux 3.0-1+b3 Versions of packages puppet suggests: pn ruby-hocon pn ruby-rrd -- no debconf information