Re: RHEL9?

"[email protected]" <[email protected]> Thu, 25 May 2023 08:15:30 -0700 (PDT)
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
Any progress on this yet?  It is still coredumping.

At last, I've been able to build CFE from source on RHEL9.   ("git pull" 
yesterday, so decently up-to-date.)   On "./configure" I used 
"--enable-debug-yes" to try to get more information from gdb, and did a 
"make install".

Running under gdb gives some information additional to what I got above.

(gdb) run -KI --bootstrap=cph-mpf
...
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff7eb3785 in PromiseRuntimeHash (pp=0x564800, 
    salt=0x7fffffffc800 "method_Check Keys_", digest=0x7fffffff8f40 "", 
    type=HASH_METHOD_MD5) at locks.c:675
#2  0x00007ffff7eb3c7a in AcquireLock (ctx=0x46cb50, 
    operand=0x7fffffffc800 "method_Check Keys_", 
    host=0x7ffff7fa2340 <VUQNAME> "cs04r-sc-vserv-223", now=1685026629, 
    ifelapsed=0, expireafter=120, pp=0x564800, ignoreProcesses=false)
    at locks.c:811
#3  0x0000000000425ed7 in VerifyMethod (ctx=0x46cb50, call=..., 
    a=0x7fffffffd8a0, pp=0x564800) at verify_methods.c:122
#4  0x0000000000425cb8 in VerifyMethodsPromise (ctx=0x46cb50, pp=0x564800)
    at verify_methods.c:75
#5  0x000000000040fe5e in KeepAgentPromise (ctx=0x46cb50, pp=0x564800, 
    param=0x0) at cf-agent.c:1909
#6  0x00007ffff7e98e8e in ExpandPromiseAndDo (ctx=0x46cb50, 
iterctx=0x57f720, 
    act_on_promise=0x40fa13 <KeepAgentPromise>, param=0x0, 
    actuate_ifelse=false) at expand.c:224
#7  0x00007ffff7e991af in ExpandPromise (ctx=0x46cb50, pp=0x552cd0, 
    act_on_promise=0x40fa13 <KeepAgentPromise>, param=0x0) at expand.c:307
#8  0x000000000040f1ca in ScheduleAgentOperations (ctx=0x46cb50, 
bp=0x552030)
    at cf-agent.c:1564
#9  0x000000000040ee5c in KeepPromiseBundles (ctx=0x46cb50, 
policy=0x54c3a0, 
    config=0x46c2a0) at cf-agent.c:1474
#10 0x000000000040d8ee in KeepPromises (ctx=0x46cb50, policy=0x54c3a0, 
    config=0x46c2a0) at cf-agent.c:939
#11 0x000000000040c54e in main (argc=3, argv=0x7fffffffe618) at 
cf-agent.c:301
(gdb) frame 1
#1  0x00007ffff7eb3785 in PromiseRuntimeHash (pp=0x564800, 
    salt=0x7fffffffc800 "method_Check Keys_", digest=0x7fffffff8f40 "", 
    type=HASH_METHOD_MD5) at locks.c:675
675         EVP_DigestUpdate(context, pp->promiser, strlen(pp->promiser));
(gdb) p *pp
$1 = {parent_section = 0x552c30, classes = 0x560c40 "any", 
  comment = 0x564df0 "Without a valid keypair we aren't going to be 
able\n", ' ' <repeats 20 times>, "to establish trust", promiser = 0x5698c0 
"Check Keys", 
  promisee = {item = 0x0, type = RVAL_TYPE_NOPROMISEE}, conlist = 0x56a8d0, 
  org_pp = 0x552cd0, offset = {start = 0, end = 0, line = 71, context = 0}}
(gdb) p (int)strlen(pp->promiser)
$2 = 10
(gdb)

To my totally untrained eye it looks reasonable.

Line 675 is "EVP_DigestUpdate(context, pp->promiser, 
strlen(pp->promiser));" and "pp->promiser" is a neat string of ten 
characters.

Thoughts?

-- David Lee


On Tuesday, 4 April 2023 at 18:01:54 UTC+1 [email protected] wrote:

> Vratislav,
>
> About a week ago I sent Craig Comstock a core dump off-list.  You might 
> want to contact him.
>
> Meanwhile here's some output:
>
> ---------------------------------------------------------------------
> $ sudo ldd /var/cfengine/bin/cf-agent
> linux-vdso.so.1 (0x00007ffcdc38e000)
> libpromises.so.3 => /var/cfengine/lib/libpromises.so.3 (0x00007f1f6ec47000)
> liblmdb.so => /var/cfengine/lib/liblmdb.so (0x00007f1f6ec30000)
> libacl.so.1 => /var/cfengine/lib/libacl.so.1 (0x00007f1f6ec25000)
> libyaml-0.so.2 => /var/cfengine/lib/libyaml-0.so.2 (0x00007f1f6ec03000)
> libcurl.so.4 => /var/cfengine/lib/libcurl.so.4 (0x00007f1f6eb78000)
> libssl.so.3 => /lib64/libssl.so.3 (0x00007f1f6eac4000)
> libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007f1f6e697000)
> libpcre.so.1 => /var/cfengine/lib/libpcre.so.1 (0x00007f1f6e653000)
> libxml2.so.2 => /var/cfengine/lib/libxml2.so.2 (0x00007f1f6e4e8000)
> libpam.so.0 => /lib64/libpam.so.0 (0x00007f1f6e4d6000)
> libm.so.6 => /lib64/libm.so.6 (0x00007f1f6e3fb000)
> libc.so.6 => /lib64/libc.so.6 (0x00007f1f6e1f0000)
> libattr.so.1 => /var/cfengine/lib/libattr.so.1 (0x00007f1f6e1e8000)
> libzstd.so.1 => /lib64/libzstd.so.1 (0x00007f1f6e111000)
> libz.so.1 => /lib64/libz.so.1 (0x00007f1f6e0f7000)
> liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f1f6e0cb000)
> libaudit.so.1 => /lib64/libaudit.so.1 (0x00007f1f6e09b000)
> libeconf.so.0 => /lib64/libeconf.so.0 (0x00007f1f6e090000)
> /lib64/ld-linux-x86-64.so.2 (0x00007f1f6edb7000)
> libcap-ng.so.0 => /lib64/libcap-ng.so.0 (0x00007f1f6e087000)
> $ 
> $ rpm -qf /lib64/libssl.so.3
> openssl-libs-3.0.1-47.el9_1.x86_64
> $ sudo yum info openssl-libs-3.0.1-47.el9_1.x86_64
> Updating Subscription Management repositories.
> Red Hat Enterprise Linux 9 for x86_64 - AppStre 9.6 kB/s | 2.8 kB     
> 00:00    
> Red Hat Enterprise Linux 9 for x86_64 - BaseOS  8.9 kB/s | 2.4 kB     
> 00:00    
> Installed Packages
> Name         : openssl-libs
> Epoch        : 1
> Version      : 3.0.1
> Release      : 47.el9_1
> Architecture : x86_64
> Size         : 6.4 M
> Source       : openssl-3.0.1-47.el9_1.src.rpm
> Repository   : @System
> From repo    : rhel-9-for-x86_64-baseos-rpms
> Summary      : A general purpose cryptography library with TLS 
> implementation
> URL          : http://www.openssl.org/
> License      : ASL 2.0
> Description  : OpenSSL is a toolkit for supporting cryptography. The
>              : openssl-libs package contains the libraries that are used by
>              : various applications which support cryptographic algorithms 
> and
>              : protocols.
>
> $ sudo rpm -qa --last | grep openssl-libs
> openssl-libs-3.0.1-47.el9_1.x86_64            Fri 24 Mar 2023 10:47:38 GMT
> $ 
> ---------------------------------------------------------------------
>
> -- David Lee
>
>
>
> On Tuesday, 4 April 2023 at 13:51:15 UTC+1 [email protected] 
> wrote:
>
>> Hi David, see a comment below. 
>>
>> On Wed, 2023-03-29 at 08:32 -0700, [email protected] wrote: 
>> > Craig, 
>> > 
>> > Many thanks. 
>> > 
>> > I've tweaked the machine to produce coredumps. 
>> > 
>> > And because this machine was basically "@minimal_environment" I also 
>> added loads of extra RPMs, 
>> > including even "@development", on the speculative guess that it might 
>> have been the absence of 
>> > something.  But it still coredumps (which is at least consistent). 
>> > 
>> > I  have a core dump (and can produce more), and "cf-support" has 
>> produced what looks like a decent 
>> > tar.gz.  It says "Please send <long-tarfile_anme> to CFEngine support 
>> staff."  How can I do that, 
>> > please? 
>> > 
>> > Meanwhile I had a quick look at the gdb backtrace.  It is: 
>> > 
>> > ----------------------------------------------------------- 
>> > (gdb) backtrace 
>> > #0  0x0000000000000000 in ?? () 
>> > #1  0x00007f4852579b75 in PromiseRuntimeHash () 
>> This function uses OpenSSL to calculate hash of a given promise. Can you 
>> check `ldd 
>> /var/cfengine/bin/cf-agent` and if all those libraries are OK and in 
>> expected locations? On RHEL 9, 
>> CFEngine should use the system-provided OpenSSL libraries. 
>>
>> -- 
>> Vratislav 
>>
>

-- 
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/4df925ea-c97b-4e6a-8c53-39a461236510n%40googlegroups.com.