ClusterLabs/libqb

logsys_qb_init: Assertion `"implicit callsite section is populated, otherwise target's build is at fault, preventing reliable logging" && QB_ATTR_SECTION_START != QB_ATTR_SECTION_STOP' failed. Aborted

mijenix opened this issue · 6 comments

Hello

We use LFS; corosync 3.0.4 is linked against libqb 1.0.6 and as soon as I want to start the compiled corosync binary we get:

corosync: main.c:144: logsys_qb_init: Assertion `"implicit callsite section is populated, otherwise target's build is at fault, preventing reliable logging" && QB_ATTR_SECTION_START != QB_ATTR_SECTION_STOP' failed.
Aborted

I guess it has something to do with 20246f5#diff-8fbdb1f32a7680e9972ca43e4230dc83 but I do not have enough knowledge to dig deeper :(

GNU ld (GNU Binutils) 2.31.1, gcc (GCC) 8.2.0

config.log result section of libqb 1.0.6:

configure:24574: result:
configure:24576: result: libqb configuration:
configure:24578: result:   Version                  = 1.0.6
configure:24580: result:   Prefix                   = /opt/pcmk/qb
configure:24582: result:   Executables              = ${exec_prefix}/sbin
configure:24584: result:   Man pages                = ${datarootdir}/man
configure:24586: result:   Doc dir                  = ${datarootdir}/doc/${PACKAGE_TARNAME}
configure:24588: result:   Libraries                = ${exec_prefix}/lib
configure:24590: result:   Header files             = ${prefix}/include
configure:24592: result:   Arch-independent files   = ${datarootdir}
configure:24594: result:   State information        = ${prefix}/var
configure:24596: result:   System configuration     = ${prefix}/etc
configure:24598: result:   SOCKETDIR                = ${prefix}/var/run
configure:24600: result:   Features                 =  epoll gcc__sync attribute-section-workaround
configure:24602: result:
configure:24604: result: libqb build info:
configure:24606: result:   Optimization             =
configure:24608: result:   Debug options            =
configure:24610: result:   Extra compiler warnings  =
configure:24612: result:   Env. defined CFLAG       = -O2 -s -pipe -fno-strict-aliasing -mtune=generic
configure:24614: result:   Env. defined CPPFLAGS    =
configure:24616: result:   Env. defined LDFLAGS     = -s
configure:24618: result:   ANSI defined CPPFLAGS    =
configure:24620: result:   Coverage     CFLAGS      =
configure:24622: result:   Coverage     LDFLAGS     =
configure:24624: result:   Fatal War.   CFLAGS      =
configure:24626: result:   Final        CFLAGS      = -O2 -s -pipe -fno-strict-aliasing -mtune=generic            -Wall -Wextra -Wunused -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wstrict-prototypes -Wpointer-arith -Wwrite-strings -Wcast-align -Wbad-function-cast -Wmissing-format-attribute -Wfloat-equal -Wformat=2 -Wformat-signedness -Wshift-overflow=2 -Woverlength-strings -Winit-self -Wuninitialized -Wunknown-pragmas -Wno-unused-parameter -Wno-format-nonliteral -Wno-format-truncation -Wno-sign-compare
configure:24628: result:   Final        CPPFLAGS    =
configure:24630: result:   Final        LDFLAGS     = -s

Let me know if you need anything other logs or infos.

Thanks.

Hmm, as I build libqb and corosync in the same build container, there is no existing libqb.
So I am a little bit puzzled how this can happen?!

A quick heads up, I haven't changed anything in the build environment and just used the 1.9.1 tarball and with this version I don't get this error.

Is there a way to force 1.0.6 to not build this section workaround libqb.so?

Sadly not. It's an ABI change and one of the main things I did for the
1.9->2.0 series. TBH you're better off using that version anyway unless
there's a good reason not to. There's not a huge amount of code changes,
just a few new features and the loss of the linker sections.

I've looked into this a bit more and it seems that the 1.0.x version from about 1.0.3 onwards all seem to do this - I'm not sure why it hasn't been reported before! For some reason packaged versions are OK.

The code surrounding the linker stuff is horrific and very prone to breakage with compiler and/or linker updates, so I think I'll release 2.0 tomorrow and encourage people to use that for all new builds.

At least CentOS 8 doesn't ship the linker script in their 1.0.5 libqb/libqb-devel RPMs.

Anyway, I'll continue with 2.0 as you suggested.

Thank you very much for the prompt feedback.

Yes, the Centos/RHEL version of libqb is effectively version 2 without the new features :)