You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Roman Khachatryan (Jira)" <ji...@apache.org> on 2024/07/09 14:51:00 UTC
[jira] [Closed] (FLINK-35786) NPE in BlobServer / shutdownHook
[ https://issues.apache.org/jira/browse/FLINK-35786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roman Khachatryan closed FLINK-35786.
-------------------------------------
Resolution: Fixed
Fix merged to master as [050767cda9de4f41748b0169b28679a87b5c5a11|https://github.com/apache/flink/commit/050767cda9de4f41748b0169b28679a87b5c5a11], to 1.19 as [3693d07db27ba2977b575f9d1c3ecfda5f5613f1|https://github.com/apache/flink/commit/3693d07db27ba2977b575f9d1c3ecfda5f5613f1].
> NPE in BlobServer / shutdownHook
> --------------------------------
>
> Key: FLINK-35786
> URL: https://issues.apache.org/jira/browse/FLINK-35786
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Coordination
> Affects Versions: 1.19.1
> Reporter: Roman Khachatryan
> Assignee: Roman Khachatryan
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.20.0, 1.19.2
>
>
> In constructor, BlobServer registers a shutdown hook to close the socket.
> Later in constructor, BlobServer creates this socket (and makes sure it's not null).
>
> But if the shutdown hook gets invoked before opening the socket, NPE will be thrown:
> {code:java}
> 12:02:49,983 [PermanentBlobCache shutdown hook] INFO org.apache.flink.runtime.blob.PermanentBlobCache [] - Shutting down BLOB cache
> 12:02:49,985 [BlobServer shutdown hook] ERROR org.apache.flink.runtime.blob.BlobServer [] - Error during shutdown of BlobServer via JVM shutdown hook.
> java.lang.NullPointerException: null
> at org.apache.flink.runtime.blob.BlobServer.close(BlobServer.java:358) ~[classes/:?]
> at org.apache.flink.util.ShutdownHookUtil.lambda$addShutdownHook$0(ShutdownHookUtil.java:39) ~[flink-core-1.19-SNAPSHOT.jar:1.19-SNAPSHOT]
> at java.lang.Thread.run(Thread.java:829) [?:?]
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)