You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksey Plekhanov (Jira)" <ji...@apache.org> on 2023/03/30 15:52:00 UTC

[jira] [Assigned] (IGNITE-17867) Node fails to start if cpMapSnapshot.bin is empty

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

Aleksey Plekhanov reassigned IGNITE-17867:
------------------------------------------

    Assignee: Aleksey Plekhanov

> Node fails to start if cpMapSnapshot.bin is empty
> -------------------------------------------------
>
>                 Key: IGNITE-17867
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17867
>             Project: Ignite
>          Issue Type: Bug
>          Components: persistence
>            Reporter: Sergey Chugunov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>             Fix For: 2.15
>
>
> Scenario for cpMapSnapshot.bin to become empty isn't known but we need to protect against it anyway.
> When it is empty starting node fails with the following exception:
> {code:java}
> [2022-08-16T15:10:46,280][ERROR][main][IgniteKernal] Exception during start processors, node will be stopped and close connections
> org.apache.ignite.IgniteCheckedException: Failed to deserialize object with given class loader: sun.misc.Launcher$AppClassLoader@3d4eac69
> 	at org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:131) ~[ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:138) ~[ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:80) ~[ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointMarkersStorage.initialize(CheckpointMarkersStorage.java:198) ~[ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointManager.initializeStorage(CheckpointManager.java:313) ~[ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.readMetastore(GridCacheDatabaseSharedManager.java:846) ~[ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.notifyMetaStorageSubscribersOnReadyForRead(GridCacheDatabaseSharedManager.java:3252) ~[ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1209) [ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1784) [ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1706) [ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1143) [ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:1058) [ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:944) [ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:843) [ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:713) [ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:682) [ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.Ignition.start(Ignition.java:344) [ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:358) [ignite-core-8.8.15.jar:8.8.15]
> Caused by: java.io.EOFException
> 	at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source) ~[?:1.8.0_333]
> 	at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source) ~[?:1.8.0_333]
> 	at java.io.ObjectInputStream.readStreamHeader(Unknown Source) ~[?:1.8.0_333]
> 	at java.io.ObjectInputStream.<init>(Unknown Source) ~[?:1.8.0_333]
> 	at org.apache.ignite.marshaller.jdk.JdkMarshallerObjectInputStream.<init>(JdkMarshallerObjectInputStream.java:42) ~[ignite-core-8.8.15.jar:8.8.15]
> 	at org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:121) ~[ignite-core-8.8.15.jar:8.8.15]
> 	... 17 more
> {code}
> Initializing code relies on catching IOException but it gets wrapped into IgniteCheckedException in unmarshalling code and misses the catch block.
> We need to implement a protection against this situation (how we get into it is a question beyond the scope of the ticket) and do a correct clean-up of an empty file.



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