Bug 461942 - cfagent segfaults
cfagent segfaults
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: cfengine (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Sheltren
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-11 11:23 EDT by Orion Poplawski
Modified: 2008-09-29 11:50 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-29 11:50:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2008-09-11 11:23:16 EDT
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 10:55:59 EDT
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 18:41:08 EDT
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 19:05:47 EDT
Here's another clue as to where to start looking:

Error reading from persistent state database
Comment 4 Panu Matilainen 2008-09-27 03:37:32 EDT
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 13:47:27 EDT
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 11:50:36 EDT
Works.  Thanks everyone!

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