You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthias J. Sax (Jira)" <ji...@apache.org> on 2025/12/11 05:08:00 UTC

[jira] [Updated] (KAFKA-19930) GlobalThread fails with NPE trying to use unsupported ProcessingExceptionHandler

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

Matthias J. Sax updated KAFKA-19930:
------------------------------------
    Fix Version/s: 3.9.2
                   4.0.2
                   4.1.2

> GlobalThread fails with NPE trying to use unsupported ProcessingExceptionHandler
> --------------------------------------------------------------------------------
>
>                 Key: KAFKA-19930
>                 URL: https://issues.apache.org/jira/browse/KAFKA-19930
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 3.9.0
>            Reporter: Matthias J. Sax
>            Assignee: Arpit Goyal
>            Priority: Minor
>             Fix For: 3.9.2, 4.2.0, 4.0.2, 4.1.2
>
>
> We introduced a new `ProcessingExceptionHandler` with [KIP-1033|https://cwiki.apache.org/confluence/display/KAFKA/KIP-1033%3A+Add+Kafka+Streams+exception+handler+for+exceptions+occurring+during+processing] which was not intended to work with global Processors.
> While we might want to change this, and potentially include the GlobalThread (even if it would be more difficult for the follow up DLQ work, because the GlobalThread does not have a producer...), there is a real bug in the implementation: if a `Processor` on the global thread throws an exception, we try to use the processing exception handler, however, it was never set up, and we fail with a NPE trying to call `processingExceptionHandler.handlerError(...)` inside `ProcessorNode#process(...)`.
> This ticket is really just about fixing the NPE, and check if the handler is set, and if not, just rethrow any exception bubbling up from the user code, and let the global thread die (ie, let the user exception bubble up into the uncaught exception handler).
> We should also update the docs, calling out that this handler does not apply to the global thread.
> If we want to make the processing-exception-handler work properly with the global thread, we should file a new ticket, as it would require proper design.



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