Skip to content

Bug: java.lang.UnsatisfiedLinkError: Can't load library: /tmp/libnetty_quiche42_linux_x86_649563780249379016557.soΒ #814

@patpatpat123

Description

@patpatpat123

Describe the bug

SpribgBoot 4.0.0 just got released.

We are migrating our 3.5.x app to SpringBoot 4.0.0.
For non graalVM native version of our app, the migration went well, no issues, no issues at build time, no issues at run time.

However, as our 3.5.x app was a graalVM native image, we would like to keep using it.
While there is no issue in building the app, when running the app, this issue is happening:

Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /tmp/libnetty_quiche42_linux_x86_649563780249379016557.so
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibraries.loadLibraryAbsolute(NativeLibraries.java:105)
	at [email protected]/java.lang.ClassLoader.loadLibrary(ClassLoader.java:143)
	at [email protected]/java.lang.Runtime.load0(Runtime.java:767)
	at [email protected]/java.lang.System.load(System.java:1646)
	at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
	at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:395)
	at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:218)
	at io.netty.handler.codec.quic.Quiche.loadNativeLibrary(Quiche.java:80)
	at io.netty.handler.codec.quic.Quiche.<clinit>(Quiche.java:59)
	at io.netty.handler.codec.quic.Quic.<clinit>(Quic.java:46)
	at io.netty.handler.codec.quic.QuicheQuicSslContext.<clinit>(QuicheQuicSslContext.java:81)
	at io.netty.handler.codec.quic.QuicSslContextBuilder.build(QuicSslContextBuilder.java:402)
	... 75 more
	Suppressed: java.lang.UnsatisfiedLinkError: Can't load library: /tmp/libnetty_quiche42_linux_x86_649563780249379016557.so
		at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibraries.loadLibraryAbsolute(NativeLibraries.java:105)
		at [email protected]/java.lang.ClassLoader.loadLibrary(ClassLoader.java:143)
		at [email protected]/java.lang.Runtime.load0(Runtime.java:767)
		at [email protected]/java.lang.System.load(System.java:1646)
		at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
		at [email protected]/java.lang.reflect.Method.invoke(Method.java:565)
		at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:421)
		at [email protected]/java.security.AccessController.doPrivileged(AccessController.java:74)
		at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:413)
		at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:387)
		... 81 more
	Suppressed: java.lang.UnsatisfiedLinkError: Can't load library: netty_quiche42_linux_x86_64 | java.library.path = [/usr/lib64, /lib64, /lib, /usr/lib]
		at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibraries.loadLibraryRelative(NativeLibraries.java:141)
		at [email protected]/java.lang.ClassLoader.loadLibrary(ClassLoader.java:135)
		at [email protected]/java.lang.Runtime.loadLibrary0(Runtime.java:822)
		at [email protected]/java.lang.System.loadLibrary(System.java:1685)
		at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
		at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:395)
		at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:166)
		... 80 more
		Suppressed: java.lang.UnsatisfiedLinkError: Can't load library: netty_quiche42_linux_x86_64 | java.library.path = [/usr/lib64, /lib64, /lib, /usr/lib]
			at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibraries.loadLibraryRelative(NativeLibraries.java:141)
			at [email protected]/java.lang.ClassLoader.loadLibrary(ClassLoader.java:135)
			at [email protected]/java.lang.Runtime.loadLibrary0(Runtime.java:822)
			at [email protected]/java.lang.System.loadLibrary(System.java:1685)
			at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
			at [email protected]/java.lang.reflect.Method.invoke(Method.java:565)
			at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:421)
			at [email protected]/java.security.AccessController.doPrivileged(AccessController.java:74)
			at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:413)
			at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:387)
			... 81 more

Steps to reproduce

Here is our pom:


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>4.0.0</version>
        <relativePath/>
    </parent>

  <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <image>
                        <env>
                            <BP_JVM_VERSION>25</BP_JVM_VERSION>
                        </env>
                    </image>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.graalvm.buildtools</groupId>
                <artifactId>native-maven-plugin</artifactId>
            </plugin>


Here is the reference to web client:


    @Bean
    public WebClient getWebClient(final WebClient.Builder builder) {
        final var clientHttpConnector = new ReactorClientHttpConnector(HttpClient.create().wiretap(true).protocol(HttpProtocol.HTTP11));
        return builder.baseUrl(hostAndPort).defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE).clientConnector(clientHttpConnector).build();
    }

Expected behavior

That native image app will run, like its non native image counter part

Logs and error messages

Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /tmp/libnetty_quiche42_linux_x86_649563780249379016557.so
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibraries.loadLibraryAbsolute(NativeLibraries.java:105)
	at [email protected]/java.lang.ClassLoader.loadLibrary(ClassLoader.java:143)
	at [email protected]/java.lang.Runtime.load0(Runtime.java:767)
	at [email protected]/java.lang.System.load(System.java:1646)
	at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
	at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:395)
	at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:218)
	at io.netty.handler.codec.quic.Quiche.loadNativeLibrary(Quiche.java:80)
	at io.netty.handler.codec.quic.Quiche.<clinit>(Quiche.java:59)
	at io.netty.handler.codec.quic.Quic.<clinit>(Quic.java:46)
	at io.netty.handler.codec.quic.QuicheQuicSslContext.<clinit>(QuicheQuicSslContext.java:81)
	at io.netty.handler.codec.quic.QuicSslContextBuilder.build(QuicSslContextBuilder.java:402)
	... 75 more
	Suppressed: java.lang.UnsatisfiedLinkError: Can't load library: /tmp/libnetty_quiche42_linux_x86_649563780249379016557.so
		at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibraries.loadLibraryAbsolute(NativeLibraries.java:105)
		at [email protected]/java.lang.ClassLoader.loadLibrary(ClassLoader.java:143)
		at [email protected]/java.lang.Runtime.load0(Runtime.java:767)
		at [email protected]/java.lang.System.load(System.java:1646)
		at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
		at [email protected]/java.lang.reflect.Method.invoke(Method.java:565)
		at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:421)
		at [email protected]/java.security.AccessController.doPrivileged(AccessController.java:74)
		at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:413)
		at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:387)
		... 81 more
	Suppressed: java.lang.UnsatisfiedLinkError: Can't load library: netty_quiche42_linux_x86_64 | java.library.path = [/usr/lib64, /lib64, /lib, /usr/lib]
		at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibraries.loadLibraryRelative(NativeLibraries.java:141)
		at [email protected]/java.lang.ClassLoader.loadLibrary(ClassLoader.java:135)
		at [email protected]/java.lang.Runtime.loadLibrary0(Runtime.java:822)
		at [email protected]/java.lang.System.loadLibrary(System.java:1685)
		at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
		at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:395)
		at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:166)
		... 80 more
		Suppressed: java.lang.UnsatisfiedLinkError: Can't load library: netty_quiche42_linux_x86_64 | java.library.path = [/usr/lib64, /lib64, /lib, /usr/lib]
			at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.NativeLibraries.loadLibraryRelative(NativeLibraries.java:141)
			at [email protected]/java.lang.ClassLoader.loadLibrary(ClassLoader.java:135)
			at [email protected]/java.lang.Runtime.loadLibrary0(Runtime.java:822)
			at [email protected]/java.lang.System.loadLibrary(System.java:1685)
			at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
			at [email protected]/java.lang.reflect.Method.invoke(Method.java:565)
			at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:421)
			at [email protected]/java.security.AccessController.doPrivileged(AccessController.java:74)
			at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:413)
			at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:387)
			... 81 more

Reproducer (optional)

No response

Additional context

No response

GraalVM version

graalVM 25.0.1

Operating system

Linux

CPU architecture

AMD64 (x86-64)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions