Hi,
I'm trying to compile a set of static CFEngine binaries on Alpine Linux (musl libc). My goal is to be able to scp a small tarball to an arbitrary linux x86_64 and have it setup a working cfengine environment. This would be very difficult to do using glibc or dynamic binaries.
Anyway, I can generate a statically linked binary, but when I run it on my policy, I get:
error: Could not open database txn /var/cfengine/state/cf_lock.lmdb: MDB_BAD_RSLOT: Invalid reuse of reader locktable slot
error: Could not open database txn /var/cfengine/state/cf_lock.lmdb: MDB_BAD_RSLOT: Invalid reuse of reader locktable slot
error: Could not open database txn /var/cfengine/state/cf_lock.lmdb: MDB_BAD_RSLOT: Invalid reuse of reader locktable slot
error: Could not open database txn /var/cfengine/state/cf_lock.lmdb: MDB_BAD_RSLOT: Invalid reuse of reader locktable slot
error: Could not open database txn /var/cfengine/state/cf_lock.lmdb: MDB_BAD_RSLOT: Invalid reuse of reader locktable slot
...
fish: “sudo /var/cfengine/bin/cf-agent” terminated by signal SIGSEGV (Address boundary error)
I am compiling against LMDB tagged "LMDB_0.9.18" in the openldap git repository. Also, pcre-8.38, and openssl-1.0.1t. I've been able to replicate this on both cfengine 3.8.2 and 3.9.0.
Any ideas on what could be causing this issue? I attached the generated cf-agent and cf-promises binaries, although I understand if you're not brave enough to run them :)
Thanks,
Eric