Comment 5 for bug 1838740

Revision history for this message
Marc Streckfuß (mefisto94) wrote :

This issue definitely seems to be certainly triggered by some of the Ubuntu patches as AdoptOpenJDK and "upstream" (OpenJDK built by Redhat) work.

The case I am affected is by being unable to load "lwjgl2" with KUbuntu 18.04 or Ubuntu 19.10:

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

symbol=Java_org_lwjgl_opengl_LinuxDisplay_nLockAWT; lookup in file=/lib/x86_64-linux-gnu/librt.so.1 [0]
usr/lib/jvm/java-11-openjdk-amd64/lib/libjawt.so: error: symbol lookup error: undefined symbol: Java_org_lwjgl_opengl_LinuxDisplay_nLockAWT (fatal)
symbol=Java_org_lwjgl_opengl_LinuxDisplay_nLockAWT; lookup in file=/home/marc/Dokumente/02_GIT/sdk/build/testuserdir/liblwjgl64.so [0]
binding file /home/marc/Dokumente/02_GIT/sdk/build/testuserdir/liblwjgl64.so [0] to /home/marc/Dokumente/02_GIT/sdk/build/testuserdir/liblwjgl64.so [0]: normal symbol `Java_org_lwjgl_opengl_LinuxDisplay_nLockAWT'

Now the openjdk-dev mailing list traces this down to this glibc/gcc bug: https://bugs.launchpad.net/ubuntu/+source/gcc-7/+bug/1764701

A note to the above output: For every native symbol, LD tries to look into a few and fails:
/usr/lib/jvm/java-11-openjdk-amd64/lib/libjawt.so: error: symbol lookup error: undefined symbol: Java_org_lwjgl_DefaultSysImplementation_setDebug (fatal)

/usr/lib/jvm/java-11-openjdk-amd64/lib/libnio.so: error: symbol lookup error: undefined symbol: Java_sun_awt_image_BytePackedRaster_initIDs (fatal)

/usr/lib/jvm/java-11-openjdk-amd64/lib/libjava.so: error: symbol lookup error: undefined symbol: Java_sun_awt_image_BytePackedRaster_initIDs (fatal)

/usr/lib/jvm/java-11-openjdk-amd64/lib/libsplashscreen.so: error: symbol lookup error: undefined symbol: Java_sun_awt_image_BytePackedRaster_initIDs (fatal)

I don't know the inner workings, but in general it seems to only produce this error on .so's from the JDK, looking up in, say, libstdc++.so.6 works. It's also confusing that libjava.so is reported as faulty for one symbol but not for another.

Actually, even this:
/usr/lib/jvm/java-11-openjdk-amd64/bin/java: error: symbol lookup error: undefined symbol: JNI_OnLoad_awt (fatal)

Is there an easy way I could do a binary diff? Maybe comparing the symbols with objdump as well?
Thanks in Advance