produces broken binary: Inconsistency detected by [regression gcc-7 7.3.0-15ubuntu2 => 7.3.0-16ubuntu2]

Bug #1764701 reported by Julian Andres Klode on 2018-04-17
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gcc-7 (Ubuntu)

Bug Description

The adequate test suite fails because one of the test binaries built cannot be read by

Inconsistency detected by dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!

Test case is to go into tests/testpkg, run

 $PWD/debian/rules clean build

which runs:

cc -shared -Wl, -Wl,--version-script=verscript-global lib.c -o debian/tmp/
ln -sf debian/tmp/
cc undef.c -Ldebian/tmp -o debian/tmp/adequate-test-msvi -ladequate-test-versionless
cc -shared -Wl, lib.c -o debian/tmp/

and then

 LD_LIBRARY_PATH=$PWD/debian/tmp/ ldd -r debian/tmp/adequate-test-msvi

fails with the error. Using gcc-7 7.3.0-15ubuntu2 works, but -16ubuntu2 fails. It's only the library that fails (adequate-test-msvi from 16u2 works fine with LD_LIBRARY_PATH set to 15u2 build, fails with 16u2 LD_LIBRARY_PATH).

Running diffoscope on the libraries ( revealed that 2 sections are missing from the library in 16u2: .gnu_version and .gnu_version_r.

Changed in gcc-7 (Ubuntu):
importance: Undecided → High
summary: - Regression gcc-7 7.3.0-15ubuntu2 => 7.3.0-16ubuntu2
+ produces broken binary: Inconsistency detected by [regression
+ gcc-7 7.3.0-15ubuntu2 => 7.3.0-16ubuntu2]
Julian Andres Klode (juliank) wrote :

Note that Debian's 7.3.0-16 works fine too.

Julian Andres Klode (juliank) wrote :

Installing 16ubuntu2 in the Debian container makes it fail there too, so it seems highly likely that whatever is different between 16 and 16ubuntu2 is the cause

Julian Andres Klode (juliank) wrote :

Summary of bisecting:

15ubuntu1 good
15ubuntu2 good
16 good
16ubuntu2 bad

Julian Andres Klode (juliank) wrote :


jak@jak-t480s:~/Projects/Ubuntu/adequate-0.15.1ubuntu5/tests/testpkg$ ldd /home/jak/Projects/Ubuntu/adequate-0.15.1ubuntu5/tests/testpkg/debian/tmp-15u2/ (0x00007fff3bbfb000) => /lib/x86_64-linux-gnu/ (0x00007f92bab2a000)
        /lib64/ (0x00007f92bb11d000)
jak@jak-t480s:~/Projects/Ubuntu/adequate-0.15.1ubuntu5/tests/testpkg$ ldd /home/jak/Projects/Ubuntu/adequate-0.15.1ubuntu5/tests/testpkg/debian/tmp-16u2/
        statically linked

Matthias Klose (doko) wrote :

there are almost no changes between 16 and 16ubuntu2. Are you sure that 16 is good? There might be a related problem reported as Debian #896012, but that is reported with 16.

Matthias Klose (doko) wrote :

the output of the link command run with -v would probaböy help, as well as the contents of the linker scripts

Matthias Klose (doko) wrote :

there's agcc-7 test build building in ppa:doko/toolchain. please check this as well.

Julian Andres Klode (juliank) wrote :

Here's the output of gcc -v -shared -Wl, lib.c with the PPA build, does not seem to help.

Julian Andres Klode (juliank) wrote :

Here's the output with 15ubuntu2 which is working.

Julian Andres Klode (juliank) wrote :

The lib.c is just:

void this_symbol_might_be_undefined(void)
{ }

char this_symbol_size_varies[ADEQUATE_SYMBOL_SIZE];

Julian Andres Klode (juliank) wrote :

the version script is:

  global: *;

and undef.c, which is linked against the first build with versioning is:

extern void this_symbol_might_be_undefined(void);

int main(int argc, char **argv)
        return 0;

Julian Andres Klode (juliank) wrote :

But in any case what's broken is the unversioned build - it does not even register as dynamically linked in ldd...

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gcc-7 (Ubuntu):
status: New → Confirmed

i have the same(?) problem in ubuntu 18.10 starting sweethome3d

I am experiencing this issue when trying to start Terasology with OpenJDK 11.

java --version

openjdk 11.0.1 2018-10-16
OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-3ubuntu3.18.10.1)
OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-3ubuntu3.18.10.1, mixed mode, sharing)

Joe (joesalmon1985) wrote :

I also have this problem when trying to run Neuroph, I get the below error

Inconsistency detected by dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments