[ 
https://issues.apache.org/jira/browse/KAFKA-19839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Morten Bøgeskov updated KAFKA-19839:
------------------------------------
    Description: 
When sending records to a topic created like this:
{quote}            admin.createTopics(List.of(new NewTopic("foo", 24, (short) 1)
                    
.configs(Map.of(TopicConfig.COMPRESSION_TYPE_CONFIG,"zstd"))));
{quote}
With a producer configured with:
{quote}producerProps.put(ProducerConfig.COMPRESSION_TYPE_CONFIG, "zstd");
{quote}
The server fails with:
{quote}[TIMESTAMP] ERROR [ReplicaManager broker=1] Error processing append 
operation on partition Z6OCnSwIS9KVFCN2gLaxnQ:foo-1 
(kafka.server.ReplicaManager)
java.lang.NoSuchFieldError: 
com.github.luben.zstd.ZstdOutputStreamNoFinalizer.dstPos
at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$Support.getFieldID(JNIFunctions.java:1357)
 ~[?:?]
at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.GetFieldID(JNIFunctions.java:449)
 ~[?:?]
at com.github.luben.zstd.ZstdOutputStreamNoFinalizer.resetCStream(Native 
Method) ~[?:?]
at 
com.github.luben.zstd.ZstdOutputStreamNoFinalizer.close(ZstdOutputStreamNoFinalizer.java:423)
 ~[?:?]
at 
com.github.luben.zstd.ZstdOutputStreamNoFinalizer.close(ZstdOutputStreamNoFinalizer.java:405)
 ~[?:?]
...
at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211)
 [kafka.Kafka:?]
Suppressed: java.lang.NoSuchFieldError: 
com.github.luben.zstd.ZstdOutputStreamNoFinalizer.dstPos
at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$Support.getFieldID(JNIFunctions.java:1357)
 ~[?:?]
at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.GetFieldID(JNIFunctions.java:449)
 ~[?:?]
at com.github.luben.zstd.ZstdOutputStreamNoFinalizer.resetCStream(Native 
Method) ~[?:?]
...
at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211)
 [kafka.Kafka:?]
Suppressed: java.lang.NoSuchFieldError: 
com.github.luben.zstd.ZstdOutputStreamNoFinalizer.dstPos
at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$Support.getFieldID(JNIFunctions.java:1357)
 ~[?:?]
at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.GetFieldID(JNIFunctions.java:449)
 ~[?:?]
at com.github.luben.zstd.ZstdOutputStreamNoFinalizer.resetCStream(Native 
Method) ~[?:?]
{quote}
The file: {{docker/native/native-image-configs/jni-config.json}} seems to have 
it referred:
{quote}{
  "name":"com.github.luben.zstd.ZstdInputStreamNoFinalizer",
  "fields":[\{ "name":"dstPos"}, \{ "name":"srcPos"}]
},{quote}

  was:
When sending records to a topic created like this:

{quote}
            admin.createTopics(List.of(new NewTopic("foo", 24, (short) 1)
                    
.configs(Map.of(TopicConfig.COMPRESSION_TYPE_CONFIG,"zstd"))));
{quote}

With a producer configured with:

{quote}
        producerProps.put(ProducerConfig.COMPRESSION_TYPE_CONFIG, "zstd");
{quote}

The server fails with:

{quote}
[TIMESTAMP] ERROR [ReplicaManager broker=1] Error processing append operation 
on partition Z6OCnSwIS9KVFCN2gLaxnQ:foo-1 (kafka.server.ReplicaManager)
java.lang.NoSuchFieldError: 
com.github.luben.zstd.ZstdOutputStreamNoFinalizer.dstPos
        at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$Support.getFieldID(JNIFunctions.java:1357)
 ~[?:?]
        at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.GetFieldID(JNIFunctions.java:449)
 ~[?:?]
        at 
com.github.luben.zstd.ZstdOutputStreamNoFinalizer.resetCStream(Native Method) 
~[?:?]
        at 
com.github.luben.zstd.ZstdOutputStreamNoFinalizer.close(ZstdOutputStreamNoFinalizer.java:423)
 ~[?:?]
        at 
com.github.luben.zstd.ZstdOutputStreamNoFinalizer.close(ZstdOutputStreamNoFinalizer.java:405)
 ~[?:?]
...
        at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211)
 [kafka.Kafka:?]
        Suppressed: java.lang.NoSuchFieldError: 
com.github.luben.zstd.ZstdOutputStreamNoFinalizer.dstPos
                at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$Support.getFieldID(JNIFunctions.java:1357)
 ~[?:?]
                at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.GetFieldID(JNIFunctions.java:449)
 ~[?:?]
                at 
com.github.luben.zstd.ZstdOutputStreamNoFinalizer.resetCStream(Native Method) 
~[?:?]
...
                at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211)
 [kafka.Kafka:?]
        Suppressed: java.lang.NoSuchFieldError: 
com.github.luben.zstd.ZstdOutputStreamNoFinalizer.dstPos
                at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$Support.getFieldID(JNIFunctions.java:1357)
 ~[?:?]
                at 
org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.GetFieldID(JNIFunctions.java:449)
 ~[?:?]
                at 
com.github.luben.zstd.ZstdOutputStreamNoFinalizer.resetCStream(Native Method) 
~[?:?]
{quote}

The file: {{docker/native/native-image-configs/jni-config.json}} seems to have 
it referred:

{quote}
{
  "name":"com.github.luben.zstd.ZstdInputStreamNoFinalizer",
  "fields":[{"name":"dstPos"}, {"name":"srcPos"}]
},
{quote}





> Native-image (dockerimage) does not work with compression.type=zstd
> -------------------------------------------------------------------
>
>                 Key: KAFKA-19839
>                 URL: https://issues.apache.org/jira/browse/KAFKA-19839
>             Project: Kafka
>          Issue Type: Bug
>          Components: docker
>    Affects Versions: 4.1.1
>         Environment: Docker image: apache/kafka-native:4.1.1-rc2
> JavaClient: org.apache.kafka:kafka-clients:4.1.0
>            Reporter: Morten Bøgeskov
>            Priority: Minor
>
> When sending records to a topic created like this:
> {quote}            admin.createTopics(List.of(new NewTopic("foo", 24, (short) 
> 1)
>                     
> .configs(Map.of(TopicConfig.COMPRESSION_TYPE_CONFIG,"zstd"))));
> {quote}
> With a producer configured with:
> {quote}producerProps.put(ProducerConfig.COMPRESSION_TYPE_CONFIG, "zstd");
> {quote}
> The server fails with:
> {quote}[TIMESTAMP] ERROR [ReplicaManager broker=1] Error processing append 
> operation on partition Z6OCnSwIS9KVFCN2gLaxnQ:foo-1 
> (kafka.server.ReplicaManager)
> java.lang.NoSuchFieldError: 
> com.github.luben.zstd.ZstdOutputStreamNoFinalizer.dstPos
> at 
> org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$Support.getFieldID(JNIFunctions.java:1357)
>  ~[?:?]
> at 
> org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.GetFieldID(JNIFunctions.java:449)
>  ~[?:?]
> at com.github.luben.zstd.ZstdOutputStreamNoFinalizer.resetCStream(Native 
> Method) ~[?:?]
> at 
> com.github.luben.zstd.ZstdOutputStreamNoFinalizer.close(ZstdOutputStreamNoFinalizer.java:423)
>  ~[?:?]
> at 
> com.github.luben.zstd.ZstdOutputStreamNoFinalizer.close(ZstdOutputStreamNoFinalizer.java:405)
>  ~[?:?]
> ...
> at 
> org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211)
>  [kafka.Kafka:?]
> Suppressed: java.lang.NoSuchFieldError: 
> com.github.luben.zstd.ZstdOutputStreamNoFinalizer.dstPos
> at 
> org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$Support.getFieldID(JNIFunctions.java:1357)
>  ~[?:?]
> at 
> org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.GetFieldID(JNIFunctions.java:449)
>  ~[?:?]
> at com.github.luben.zstd.ZstdOutputStreamNoFinalizer.resetCStream(Native 
> Method) ~[?:?]
> ...
> at 
> org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:211)
>  [kafka.Kafka:?]
> Suppressed: java.lang.NoSuchFieldError: 
> com.github.luben.zstd.ZstdOutputStreamNoFinalizer.dstPos
> at 
> org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions$Support.getFieldID(JNIFunctions.java:1357)
>  ~[?:?]
> at 
> org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.functions.JNIFunctions.GetFieldID(JNIFunctions.java:449)
>  ~[?:?]
> at com.github.luben.zstd.ZstdOutputStreamNoFinalizer.resetCStream(Native 
> Method) ~[?:?]
> {quote}
> The file: {{docker/native/native-image-configs/jni-config.json}} seems to 
> have it referred:
> {quote}{
>   "name":"com.github.luben.zstd.ZstdInputStreamNoFinalizer",
>   "fields":[\{ "name":"dstPos"}, \{ "name":"srcPos"}]
> },{quote}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to