lpefferkorn/cfe-profiler

Seg fault

neilhwatson opened this issue · 6 comments

Tried on a rhel6 hosts with the latest 3.5.x build. Got a set fault. Attempted gdb output below:

[root@gandalf log]# gdb cf-agent
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
Copyright (C) 2010 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-redhat-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/local/sbin/cf-agent...done.
(gdb) run -K
Starting program: /usr/local/sbin/cf-agent -K
[Thread debugging using libthread_db enabled]
Detaching after fork from child process 10376.
Detaching after fork from child process 10377.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff64c30ac in vfprintf () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.5-7.el6_0.x86_64 glibc-2.12-1.107.el6.x86_64 openssl-1.0.0-27.el6_4.2.x86_64 pcre-7.8-6.el6.x86_64 tokyocabinet-1.4.33-6.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) back
#0 0x00007ffff64c30ac in vfprintf () from /lib64/libc.so.6
#1 0x00007ffff64ea9d2 in vsnprintf () from /lib64/libc.so.6
#2 0x00007ffff64ca4a3 in snprintf () from /lib64/libc.so.6
#3 0x00007ffff7bdab59 in add_bundle_call (pp=0x7ffff7978930, ticks=1008992) at cfe_profiler.c:72
#4 0x00007ffff7bdc18b in ExpandPromise (agent=6565904, scopeid=0x773790 "\300cv", pp=0x7ffff7978930, fnptr=0x0, report_context=0x206e6f6d6d6f6320) at cfe_profiler.c:141
#5 0x00007ffff795af7c in CheckCommonClassPromises (ctx=0x643010, bundle=0x75bd20) at generic_agent.c:1361
#6 BundleHashVariables (ctx=0x643010, bundle=0x75bd20) at generic_agent.c:1558
#7 0x00007ffff795b0a2 in PolicyHashVariables (ctx=0x643010, policy=0x7741b0) at generic_agent.c:1582
#8 0x00007ffff795c65e in Cf3ParseFiles (ctx=0x643010, config=0x6437d0, inputs=) at generic_agent.c:801
#9 0x00007ffff795c62e in Cf3ParseFiles (ctx=0x643010, config=0x6437d0, inputs=) at generic_agent.c:781
#10 0x00007ffff795c779 in GenericAgentLoadPolicy (ctx=0x643010, config=0x6437d0) at generic_agent.c:521
#11 0x000000000040b1c3 in main (argc=, argv=) at cf-agent.c:247

Hello Neil,

Thanks for the report. This is because there is modifications to made do cfe-profiler to handle both <3.5 and >=3.5 CFEngine versions. I will have a look.

Let me know if I can be of more help. This profiler is a great idea.

New 3.5 branch still seg faults.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7e886a9 in StringSetDestroy (set=0x1) at set.c:31
31 set.c: No such file or directory.
in set.c
Missing separate debuginfos, use: debuginfo-install cfengine-community-3.5.1-1.x86_64
(gdb) back
#0 0x00007ffff7e886a9 in StringSetDestroy (set=0x1) at set.c:31
#1 0x00007ffff7e69044 in GenericAgentConfigDestroy (config=0x7ffff7ffd908) at generic_agent.c:1790
#2 0x00007ffff7bdc773 in GenericAgentConfigDestroy (config=0x5527d0) at cfe_profiler.c:188
#3 0x000000000040dfed in main ()

Could you please test against latest test-3.5 branch ?

On Wed, Jul 17, 2013 at 03:09:56PM -0700, Loic Pefferkorn wrote:

Could you please test against latest test-3.5 branch ?

Tomorrow.

Neil Watson
Linux/UNIX Consultant
http://watson-wilson.ca