[ 
https://issues.apache.org/jira/browse/IGNITE-17867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17708257#comment-17708257
 ] 

Ignite TC Bot commented on IGNITE-17867:
----------------------------------------

{panel:title=Branch: [pull/10619/head] Base: [master] : No blockers 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/10619/head] Base: [master] : New Tests 
(1)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}PDS 4{color} [[tests 
1|https://ci2.ignite.apache.org/viewLog.html?buildId=7116399]]
* {color:#013220}IgnitePdsTestSuite4: 
IgnitePdsCheckpointMapSnapshotTest.testCorruptedCpMap - PASSED{color}

{panel}
[TeamCity *--> Run :: All* 
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=7116445&buildTypeId=IgniteTests24Java8_RunAll]

> 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
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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)

Reply via email to