Skip to content

libInstrumentationEngine.so fails to load on Ubuntu 26.04 (works on 24.04) #599

Description

@fhnaseer

Summary

libInstrumentationEngine.so loads correctly on Ubuntu 24.04 but fails to load on Ubuntu 26.04. The engine has a NEEDED dependency on the libxml2 soname libxml2.so.2. On Ubuntu 26.04, libxml2 was updated to 2.15, the runtime package was renamed to libxml2-16, and the shared object soname changed to libxml2.so.16. libxml2.so.2 is no longer provided, so the engine's libxml2 dependency is unresolved and its libxml2 symbols come back undefined.

This surfaced downstream in dotnet-coverage, where the profiler fails to initialize on 26.04 ("Profiler was not initialized...") and no coverage is collected. The issue was originally reported there: microsoft/codecoverage#224.

Environment

  • Package: Microsoft.InstrumentationEngine_x64_ubuntu 1.0.45
  • Binary: content/Microsoft.InstrumentationEngine/libInstrumentationEngine.so
  • Arch: linux-x64
  • Ubuntu 26.04 (failing): libxml2-16, libxml2 2.15.2, soname libxml2.so.16
  • Ubuntu 24.04 (working): libxml2, libxml2 2.9.14, soname libxml2.so.2

Reproduction

Command run on each Ubuntu version (with the distro's libxml2 runtime package installed):

ldd -r ./libInstrumentationEngine.so

Ubuntu 24.04 — works (libxml2 2.9.14)

	linux-vdso.so.1 (0x00007fff287f9000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6a991da000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6a991d5000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6a98982000)
	libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f6a987a0000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6a990ec000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6a990bc000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6a9858e000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f6a991e3000)
	libicuuc.so.74 => /lib/x86_64-linux-gnu/libicuuc.so.74 (0x00007f6a98381000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f6a990a0000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f6a9906e000)
	libicudata.so.74 => /lib/x86_64-linux-gnu/libicudata.so.74 (0x00007f6a96621000)

All dependencies resolve; no undefined symbols.

Ubuntu 26.04 — fails (libxml2-16 2.15.2)

Only libxml2.so.16 is present; there is no libxml2.so.2:

lrwxrwxrwx 1 root root      17 Jun 19 17:43 /usr/lib/x86_64-linux-gnu/libxml2.so.16 -> libxml2.so.16.1.2
-rw-r--r-- 1 root root 1449112 Jun 19 17:43 /usr/lib/x86_64-linux-gnu/libxml2.so.16.1.2
	linux-vdso.so.1 (0x00007ffcce9fb000)
	libdl.so.2 => /usr/lib/x86_64-linux-gnu/libdl.so.2 (0x00007ab185a40000)
	libpthread.so.0 => /usr/lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ab185a3b000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ab185360000)
	libxml2.so.2 => not found
	libm.so.6 => /usr/lib/x86_64-linux-gnu/libm.so.6 (0x00007ab18523a000)
	libgcc_s.so.1 => /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ab185a0b000)
	libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x00007ab185019000)
	/lib64/ld-linux-x86-64.so.2 (0x00007ab185a49000)
undefined symbol: xmlFree, version LIBXML2_2.4.30	(/mnt/libInstrumentationEngine.so)
undefined symbol: xmlReadMemory, version LIBXML2_2.6.0	(/mnt/libInstrumentationEngine.so)
undefined symbol: xmlReadFile, version LIBXML2_2.6.0	(/mnt/libInstrumentationEngine.so)
undefined symbol: xmlGetProp, version LIBXML2_2.4.30	(/mnt/libInstrumentationEngine.so)
undefined symbol: xmlCheckVersion, version LIBXML2_2.4.30	(/mnt/libInstrumentationEngine.so)
undefined symbol: xmlDocGetRootElement, version LIBXML2_2.4.30	(/mnt/libInstrumentationEngine.so)
undefined symbol: xmlCleanupParser, version LIBXML2_2.4.30	(/mnt/libInstrumentationEngine.so)
undefined symbol: xmlFreeDoc, version LIBXML2_2.4.30	(/mnt/libInstrumentationEngine.so)

libxml2.so.2 is not found, so all the versioned LIBXML2_2.x symbols come back undefined and the engine cannot load.

Additional observation

The engine requires versioned symbols tagged LIBXML2_2.4.30 and LIBXML2_2.6.0. Ubuntu 26.04's libxml2.so.16 still exports these same versioned symbol nodes — creating a libxml2.so.2 -> libxml2.so.16 symlink resolves all eight undefined symbols and the engine loads and instruments normally. This is shared as an observation about the behavior difference, not a proposed fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions