question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[native] Integration test "kafka-snappy" fails with GraalVM 20.3.1.2

See original GitHub issue

Describe the bug

Native image of integration test kafka-snappy fails with GraalVM 20.3.1.2

Expected behavior

The native image test should pass.

Actual behavior

The native image test fails with:

[INFO] Running io.quarkus.it.kafka.KafkaSnappyProducerITCase
2021-03-31 00:17:44,123 WARN  [org.apa.kaf.cli.adm.AdminClientConfig] (vert.x-worker-thread-0) The configuration 'group.id' was supplied but isn't a known config.
2021-03-31 00:17:44,319 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-1) HTTP Request to /kafka failed, error id: ed6debba-ae18-4931-914f-8f37fcc56065-1: org.jboss.resteasy.spi.UnhandledException: org.apache.kafka.common.KafkaException: Failed to construct kafka producer
	at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:106)
	at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:372)
	at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:218)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:519)
	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
	at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
	at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)
	at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:138)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.access$000(VertxRequestHandler.java:41)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:93)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
	at java.lang.Thread.run(Thread.java:834)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
Caused by: org.apache.kafka.common.KafkaException: Failed to construct kafka producer
	at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:441)
	at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:302)
	at io.quarkus.it.kafka.KafkaProducerManager.createProducer(KafkaProducerManager.java:28)
	at io.quarkus.it.kafka.KafkaProducerManager.create(KafkaProducerManager.java:39)
	at io.quarkus.it.kafka.KafkaProducerManager_Bean.create(KafkaProducerManager_Bean.zig:347)
	at io.quarkus.it.kafka.KafkaProducerManager_Bean.create(KafkaProducerManager_Bean.zig:363)
	at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
	at io.quarkus.arc.impl.AbstractSharedContext.access$000(AbstractSharedContext.java:14)
	at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
	at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
	at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
	at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
	at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
	at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:17)
	at io.quarkus.it.kafka.KafkaProducerManager_ClientProxy.arc$delegate(KafkaProducerManager_ClientProxy.zig:67)
	at io.quarkus.it.kafka.KafkaProducerManager_ClientProxy.send(KafkaProducerManager_ClientProxy.zig:212)
	at io.quarkus.it.kafka.KafkaEndpoint.post(KafkaEndpoint.java:19)
	at java.lang.reflect.Method.invoke(Method.java:566)
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:170)
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:130)
	at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:643)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:507)
	at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:457)
	at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:459)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:419)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:393)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:68)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:492)
	... 17 more
Caused by: java.lang.IllegalArgumentException: Unknown  or unsupported compression name: snappy
	at org.apache.kafka.common.record.CompressionType.forName(CompressionType.java:59)
	at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:395)
	... 45 more

To Reproduce

./mvnw clean verify -Dtest-containers -Dstart-containers -Dnative -Dnative.surefire.skip -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:20.3-java11 -pl integration-tests/kafka-snappy

Environment (please complete the following information):

Output of uname -a or ver

Linux 5.10.20-200.fc33.x86_64

Output of java -version

11.0.10+9

GraalVM version (if different from Java)

20.3.1.2

Quarkus version or git rev

main: 06e7f6248786c3c8868c818b55d4792c441f3e8f

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

Maven 3.6.3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
cescoffiercommented, Mar 31, 2021

Yes, and we have that code somewhere already (in the devtools)

1reaction
cescoffiercommented, Mar 31, 2021

ah ah… yeah… if you remove the safeguard, then 😄

So there are multiple tasks:

  1. better warn the user if they use an unsupported graalvm version (I was thinking we were doing that already, but globally). Maybe we need to have a new build item that advertise the minimal GraalVM version. @geoand @gsmet WDYT?
  2. how can we filter these tests. Can we use Junit with the right predicate DisableIfl?
Read more comments on GitHub >

github_iconTop Results From Across the Web

20.3.5 - GraalVM
Integrated Polyglot debugger allowing to debug Javascript, Python, R, Ruby and other GraalVM languages. Implemented a VS Code Micronaut extension which:.
Read more >
Release Notes - GraalVM Enterprise Edition
Integrated Polyglot debugger allowing to debug Javascript, Python, R, Ruby and other GraalVM languages. Implemented a VS Code Micronaut extension which:.
Read more >
quarkusio/quarkus 2.0.0.Alpha1 on GitHub - NewReleases.io
Final; #16126 - [native] Integration test "main" fails with GraalVM 20.3.1.2; #16120 - OpenAPI - added more mappings between smallrye and quarkus config ......
Read more >
Oracle Graalvm version 20.3.1.2 : Security vulnerabilities
# CVE ID CWE ID Vulnerability Type(s) Publish Date Update Date Score Gaine... 1 CVE‑2021‑23841 DoS 2021‑02‑16 2022‑10‑07 4.3 None 2 CVE‑2021‑23840 190 Overflow 2021‑02‑16...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found