[Pkg-puppet-devel] Bug#810484: puppet agent: ruby segfault during applying catalog

Felix Hagemann felix.hagemann at gmail.com
Mon Jan 18 20:39:07 UTC 2016


On 17 January 2016 Markus Frosch wrote:
> Can you verify that the following test brings the same crash?

Yes, I can reproduce the test with your minimal example:

# cat augtest2.pp
augeas { "sshd_config":
  changes => [
    "set /files/etc/ssh/sshd_config/PermitRootLogin no",
  ],
}
# puppet apply augtest2.pp >augtest2_output.log 2>&1
Aborted
#

The output is attached.
> If so, we need to continue with gdb to find out what lib fails exactly. Are you familiar with that kind of debugging?

Yes, but up to now only debugging my own C projects, not scripting
languages/interpreters. A first gdb session:

# gdb ruby
GNU gdb (Debian 7.10-1+b1) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ruby...(no debugging symbols found)...done.
(gdb) run /usr/bin/puppet apply augtest2.pp
Starting program: /usr/bin/ruby /usr/bin/puppet apply augtest2.pp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7fcf700 (LWP 16474)]
Warning: Setting templatedir is deprecated. See
http://links.puppetlabs.com/env-settings-deprecations
   (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in
`issue_deprecation_warning')
Notice: Compiled catalog for MYMACHINE.MYDOMAIN.org in environment
production in 0.03 seconds
[Thread 0x7ffff7fcf700 (LWP 16474) exited]
[New Thread 0x7ffff7fcf700 (LWP 16654)]

Program received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106     ../sysdeps/x86_64/strlen.S: No such file or directory.
(gdb) bt
#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00007ffff1e75d51 in augeas_get () from
/usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.2.0/_augeas.so
#2  0x00007ffff7adba76 in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#3  0x00007ffff7adf602 in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#4  0x00007ffff7ae4ce0 in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#5  0x00007ffff7ae9f8d in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#6  0x00007ffff7aeb0fb in rb_yield () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#7  0x00007ffff798d6f2 in rb_ary_each () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#8  0x00007ffff7adba76 in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#9  0x00007ffff7aebc4e in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#10 0x00007ffff7adf557 in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#11 0x00007ffff7ae4ce0 in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#12 0x00007ffff7ae9f8d in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#13 0x00007ffff7aeb0fb in rb_yield () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#14 0x00007ffff798d6f2 in rb_ary_each () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#15 0x00007ffff7adba76 in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#16 0x00007ffff7adf557 in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#17 0x00007ffff7ae4ce0 in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#18 0x00007ffff7ae63d4 in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#19 0x00007ffff7ae76ff in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#20 0x00007ffff79da8ea in rb_method_call_with_block () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#21 0x00007ffff7adba76 in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#22 0x00007ffff7adf602 in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#23 0x00007ffff7ae4ce0 in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#24 0x00007ffff7ae620f in rb_iseq_eval_main () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#25 0x00007ffff79d102d in ?? () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#26 0x00007ffff79d2bdd in ruby_exec_node () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#27 0x00007ffff79d4b2e in ruby_run_node () from
/usr/lib/x86_64-linux-gnu/libruby-2.2.so.2.2
#28 0x00000000004008ab in ?? ()
#29 0x00007ffff69fb870 in __libc_start_main (main=0x400860, argc=4,
argv=0x7fffffffe688, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>,
    stack_end=0x7fffffffe678) at libc-start.c:291
#30 0x00000000004008d9 in _start ()
(gdb)

I guess without debugging symbols this is of limited use. There is no
deb with the ruby debugging symbols, so do I need to recompile the
ruby package without stripping? That will need some handholding....

Cheers
Felix
-------------- next part --------------
A non-text attachment was scrubbed...
Name: augtest2_output.log
Type: text/x-log
Size: 75902 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-puppet-devel/attachments/20160118/2e260318/attachment-0001.bin>


More information about the Pkg-puppet-devel mailing list