Skip to content

Grpc Client in Tests fail when Running on Linux with Netty Native Transports #47021

@pcasaes

Description

@pcasaes

Describe the bug

Used Getting Started and created a project with the grpc extension.

Added linux netty native transports and enabled quarkus.vertx.prefer-native-transport.

When running tests on linux, fails with:

Caused by: java.lang.IllegalStateException: incompatible event loop type: io.netty.channel.epoll.EpollEventLoop
        at io.netty.channel.AbstractChannel$AbstractUnsafe.register(AbstractChannel.java:472)

Expected behavior

Tests should pass

Actual behavior

Test fails with

Caused by: java.lang.IllegalStateException: incompatible event loop type: io.netty.channel.epoll.EpollEventLoop
        at io.netty.channel.AbstractChannel$AbstractUnsafe.register(AbstractChannel.java:472)

How to Reproduce?

Reproducer: https://github.com/pcasaes/test-grpc-client

On windows and mac can use docker to run on linux vm

docker run --rm -it -v .:/work maven:3.9-amazoncorretto-21 /bin/bash

cd work
mvn clean verify

Output of uname -a or ver

Linux 09dcf29f42c6 6.10.14-linuxkit #1 SMP Fri Nov 29 17:22:03 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

Output of java -version

OpenJDK 64-Bit Server VM warning: Unable to get SVE vector length on this system. Disabling SVE. Specify -XX:UseSVE=0 to shun this warning. openjdk version "21.0.6" 2025-01-21 LTS OpenJDK Runtime Environment Corretto-21.0.6.7.1 (build 21.0.6+7-LTS) OpenJDK 64-Bit Server VM Corretto-21.0.6.7.1 (build 21.0.6+7-LTS, mixed mode, sharing)

Quarkus version or git rev

3.21.0

Build tool (ie. output of mvnw --version or gradlew --version)

OpenJDK 64-Bit Server VM warning: Unable to get SVE vector length on this system. Disabling SVE. Specify -XX:UseSVE=0 to shun this warning. Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937) Maven home: /usr/share/maven Java version: 21.0.6, vendor: Amazon.com Inc., runtime: /usr/lib/jvm/java-21-amazon-corretto Default locale: en, platform encoding: UTF-8 OS name: "linux", version: "6.10.14-linuxkit", arch: "aarch64", family: "unix"

Additional information

The issue seems to be in the GRPC Client. Although the client is in the test code in this reproducer, I suspect the issue will also happen in production code.

Disabling GRPC client's use-vertx-event-loop will allow the client to work. The issue seems to be introduced by this PR #46198

quarkus:
  vertx:
    prefer-native-transport: true
  grpc:
    clients:
      "test":
        use-vertx-event-loop: false

Disabling native-transport will also allow the the client to work. Using the new Vert.x gRPC on the server has no impact.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions