Bug 461942 - cfagent segfaults
Summary: cfagent segfaults
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: cfengine
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Sheltren
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-11 15:23 UTC by Orion Poplawski
Modified: 2008-09-29 15:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-09-29 15:50:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Orion Poplawski 2008-09-11 15:23:16 UTC
Description of problem:

[root@localhost ~]# cfagent -q
DB->get_dbname: method not permitted before handle's open method
���H��������������������������������������������������������h���
Segmentation fault

Version-Release number of selected component (if applicable):
cfengine-2.2.8-1.fc10.x86_64

How reproducible:
everytime

Unfortunately strace -f appears to be broken on rawhide, so I'm not sure where this is comming from.

-d3 shows:

Loaded /var/cfengine/ppkeys/root-192.168.0.8.pub
cfengine:localhost: BAD: keys did not match
cfengine:localhost: Authentication dialogue with earth.cora.nwra.com failed
cfengine:localhost: Unable to establish connection with earth.cora.nwra.com (failover)
Checking copy from localhost:/usr/sbin/cfagent to /var/cfengine/bin/cfagent
DB->get_dbname: method not permitted before handle's open method
Segmentation fault

-d4 shows:

cfengine:localhost: Authentication dialogue with earth.cora.nwra.com failed
IsDefinedClass(any,VADDCLASSES)

--------
EvaluateORString(any)
(a)(n)(y)
GetORATom(any)->any
EvaluateANDString(any)

GetANDATom(any)->any
Checking OR atom (any)?
EvalORString-temp-result3.5 count=1
EvaluateANDString(any) returns true
EvalORString-temp-result-n=1 (any)
EvaluateORString(any) returns 1
DB->get_dbname: method not permitted before handle's open method
Segmentation fault


gdb isn't much help:
(gdb) run -q
Starting program: /usr/sbin/cfagent -q
Detaching after fork from child process 15866.
Detaching after fork from child process 15888.
Detaching after fork from child process 15910.
Detaching after fork from child process 15929.
DB->get_dbname: method not permitted before handle's open method
���H��������������������������������������������������������h���

Program received signal SIGSEGV, Segmentation fault.
0x00007fffffff21e0 in ?? ()
Missing separate debuginfos, use: debuginfo-install compat-db.x86_64 glibc.x86_64 libselinux.x86_64 openssl.x86_64 zlib.x86_64
(gdb) bt
#0  0x00007fffffff21e0 in ?? ()
#1  0x0000000000000000 in ?? ()

Comment 1 Jeff Sheltren 2008-09-12 14:55:59 UTC
Thanks for the report.  If you install the relevant debuginfo packages, can you get any more info out of gdb?  I guess this may be an issue with the new db version, but I'll have to dig deeper...

Comment 2 Orion Poplawski 2008-09-26 22:41:08 UTC
Well, we're no longer segfaulting, but seeing lots of:

DB->get_dbname: method not permitted before handle's open method
: Successful return: 0
: Successful return: 0
DB->get_dbname: method not permitted before handle's open method
H��    ��: Successful return: 0
DB->fd: method not permitted before handle's open method
DB->get: method not permitted before handle's open method

Google has turned up a few things but nothing seems applicable yet.

Comment 3 Orion Poplawski 2008-09-26 23:05:47 UTC
Here's another clue as to where to start looking:

Error reading from persistent state database

Comment 4 Panu Matilainen 2008-09-27 07:37:32 UTC
Looking at the build logs and resulting package, it seems that the current rawhide cfengine was built against db4-4.7.25 headers, but somehow got linked against db-4.6.x. (4.6.x being present in the buildroot from compat-db). Header vs linkage mismatch on BDB *will* give you weird errors... I suggest you check and fix that part before even considering diving into the code.

Comment 5 Jeff Sheltren 2008-09-27 17:47:27 UTC
Panu, thanks for tracking that down!  Seems that the configure script wasn't setup to detect db 4.7.  I've created a patch for that and built cfengine-2.2.8-2.fc10
http://koji.fedoraproject.org/koji/buildinfo?buildID=64472

Orion, could you please test that package to see if it fixes the issue?

Comment 6 Orion Poplawski 2008-09-29 15:50:36 UTC
Works.  Thanks everyone!


Note You need to log in before you can comment on or make changes to this bug.