This seems a little odd. I wonder if the problem is not the Berkeley
db on the system rather than cfengine. I have never seen any segfault
associated with this before.

Luc Lanthier wrote:
> Hello,
> 
> I've been testing a debian package for cfengine 2.2.2 for our production
> cluster. cfagent triggers a segmentation fault on every execution. So what
> I've decided to do is compile cfagent with the same configure flags the
> debian package would use and see if I can get some useful information from
> GDB. Here are the results. Any assistance would be appreciated.
> 
> Environment: 
> Debian Linux 3.1 Sarge (oldstable)
> 
> # ldd src/cfagent
>         libdb-4.2.so => /usr/lib/libdb-4.2.so (0xb7e9c000)
>         libcrypto.so.0.9.7 => /usr/lib/i686/cmov/libcrypto.so.0.9.7
> (0xb7d9c000)
>         libnss_nis.so.2 => /lib/tls/libnss_nis.so.2 (0xb7d93000)
>         libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7d84000)
>         librt.so.1 => /lib/tls/librt.so.1 (0xb7d7e000)
>         libm.so.6 => /lib/tls/libm.so.6 (0xb7d5c000)
>         libc.so.6 => /lib/tls/libc.so.6 (0xb7c27000)
>         libdl.so.2 => /lib/tls/libdl.so.2 (0xb7c23000)
>         libnsl.so.1 => /lib/tls/libnsl.so.1 (0xb7c0f000)
>         libnss_files.so.2 => /lib/tls/libnss_files.so.2 (0xb7c05000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7f7c000)
> 
> compile options:
>   ./configure --prefix=/usr --sysconfdir=/etc --mandir=${prefix}/share/man
> --infodir=${prefix}/share/info --with-berkeleydb=/usr --with-openssl=/usr
> --with-workdir=/var/lib/cfengine2
> 
> 
> =======================================================================
> hostname:/usr/src/cfengine-2.2.2# gdb src/cfagent
> GNU gdb 6.3-debian
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i386-linux"...Using host libthread_db library
> "/lib/tls/libthread_db.so.1".
> 
> (gdb) run -K -I -q -f /etc/cfengine/cfagent.conf
> Starting program: /usr/src/cfengine-2.2.2/src/cfagent -K -I -q -f
> /etc/cfengine/cfagent.conf
> Failed to read a valid object file image from memory.
> [Thread debugging using libthread_db enabled]
> [New Thread -1211697952 (LWP 1136)]
> cfengine:hostname: Old link /etc/rc2.d/S23ntp-server points somewhere else.
> Doing nothing!
> cfengine:hostname: (Link points to ../init.d/ntp-server not
> /etc/init.d/ntp-server)
> 
> cfengine:hostname:
> Executing script /home/opstools/bin/user-account-handler --remove-user
> XXAUSER...(timeout=0,uid=-1,gid=-1)
> cfengine:hostname: Finished script /home/opstools/bin/user-account-handler
> --remove-user XXAUSERXX
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1211697952 (LWP 1136)]
> 0xb7d048d4 in mallopt () from /lib/tls/libc.so.6
> (gdb) back
> #0  0xb7d048d4 in mallopt () from /lib/tls/libc.so.6
> #1  0xb7d03c43 in malloc () from /lib/tls/libc.so.6
> #2  0xb7fbd148 in __os_malloc_4002 () from /usr/lib/libdb-4.2.so
> #3  0xb7f42098 in __ham_db_create_4002 () from /usr/lib/libdb-4.2.so
> #4  0xb7f8c698 in db_create_4002 () from /usr/lib/libdb-4.2.so
> #5  0xb7f8c242 in db_create_4002 () from /usr/lib/libdb-4.2.so
> #6  0x0805fa89 in RecordPerformance (
>     eventname=0xbfafa740 "Exec(/home/opstools/bin/user-account-handler
> --remove-user XXAUSERXX)", t=1193106068, value=0.0041603669999999999) at
> instrument.c:59
> #7  0x08052dec in Scripts () at do.c:1489
> #8  0x0804d9ea in DoTree (passes=3, info=0x80b40c6 "Main Tree")
>     at cfagent.c:1255
> #9  0x0804b3a7 in main (argc=24, argv=0x18) at cfagent.c:240
> (gdb)
> =======================================================================
> 
> 
> 
> Note that I've also tried with libdb-4.3 and got different results:
> =======================================================================
> hostname:/usr/src/cfengine-2.2.2# gdb src/cfagent
> GNU gdb 6.3-debian
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "x86_64-linux"...Using host libthread_db library
> "/lib/libthread_db.so.1".
> 
> (gdb) run -K -I -f ./cfagent.conf
> Starting program: /usr/src/cfengine-2.2.2/src/cfagent -K -I -f
> ./cfagent.conf
> [Thread debugging using libthread_db enabled]
> [New Thread 47576083881344 (LWP 16877)]
> cfengine:hostname: Owner of /root/installables was 1016, setting to 0
> cfengine:hostname: Group of /root/installables was 1016, setting to 0
> cfengine:hostname: Owner of /root/installables was 0, setting to 1016
> cfengine:hostname: Group of /root/installables was 0, setting to 1016
> cfengine:hostname: Old link /etc/rc2.d/S23ntp-server points somewhere else.
> Doing nothing!
> cfengine:hostname: (Link points to ../init.d/ntp-server not
> /etc/init.d/ntp-server)
> 
> cfengine:hostname:
> Executing script /home/opstools/bin/user-account-handler --remove-user
> XXAUSERXX...(timeout=0,uid=-1,gid=-1)
> cfengine:hostname: Finished script /home/opstools/bin/user-account-handler
> --remove-user XXAUSERXX
> cfengine:hostname:
> Executing script /home/opstools/bin/user-account-handler --add-user
> XXANOTHERUSERXX 'Real Name' --password
> 'XXXXXXXXXXXXXXXXXXXXXXXXXX'...(timeout=0,uid=-1,gid=-1)
> cfengine:hostname: Finished script /home/opstools/bin/user-account-handler
> --add-user XXANOTHERUSERXX 'Real Name' --password
> 'XXXXXXXXXXXXXXXXXXXXXXXXXX'
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 47576083881344 (LWP 16877)]
> 0x00002b452b459d6b in mallopt () from /lib/libc.so.6
> (gdb) back
> #0  0x00002b452b459d6b in mallopt () from /lib/libc.so.6
> #1  0x00002b452b458ff7 in malloc () from /lib/libc.so.6
> #2  0x00002b452b45f982 in strdup () from /lib/libc.so.6
> #3  0x00002b452b4b3fd9 in get_avphys_pages () from /lib/libc.so.6
> #4  0x00002b452b4b3dac in get_nprocs_conf () from /lib/libc.so.6
> #5  0x00002b452b48edef in sysconf () from /lib/libc.so.6
> #6  0x00002b452b48ea11 in sysconf () from /lib/libc.so.6
> #7  0x00002b452abc542e in __os_sleep () from /usr/lib/libdb-4.3.so
> #8  0x00002b452abc546d in __os_spin () from /usr/lib/libdb-4.3.so
> #9  0x00002b452aba0bd9 in db_env_create () from /usr/lib/libdb-4.3.so
> #10 0x00002b452aba091a in db_env_create () from /usr/lib/libdb-4.3.so
> #11 0x00002b452ab91cf4 in db_create () from /usr/lib/libdb-4.3.so
> #12 0x00000000004153d2 in RecordPerformance (
>     eventname=0x7fff800aabd0 "Exec(/home/opstools/bin/user-account-handler
> --add-user XXANOTHERUSERXX 'Real Name' --password
> 'XXXXXXXXXXXXXXXXXXXXXXXXXX')", t=1193164658, value=0.0046309999999999997)
> at instrument.c:59
> #13 0x000000000040add6 in Scripts () at do.c:1489
> #14 0x000000000040679d in DoTree (passes=3, info=0x45e502 "Main Tree")
>     at cfagent.c:1255
> #15 0x00000000004046b3 in main (argc=5, argv=0x7fff800acd38) at
> cfagent.c:240
> =======================================================================
> 
> 
> Any ideas?
> -- Luc,
> IMVU Operations Staff

-- 
Mark Burgess

Professor of Network and System Administration
Oslo University College

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  [EMAIL PROTECTED]
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to