[jira] [Updated] (IGNITE-18302) ignite-spring-sessions: IgniteSession serialization drags its parent class

2023-09-10 Thread Andrey Novikov (Jira)


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

Andrey Novikov updated IGNITE-18302:

Fix Version/s: (was: 2.16)

> ignite-spring-sessions: IgniteSession serialization drags its parent class
> --
>
> Key: IGNITE-18302
> URL: https://issues.apache.org/jira/browse/IGNITE-18302
> Project: Ignite
>  Issue Type: Bug
>  Components: extensions
>Affects Versions: 2.15
>Reporter: Alexandr Shapkin
>Assignee: Andrey Novikov
>Priority: Major
>
> In short, there is a bug in ignite-spring-session-ext implementation.
> We store IgniteIndexedSessionRepository${{{}IgniteSession{}}} in the cache, 
> but it’s an internal non-static class, having a reference to the parent 
> [\{{{}IgniteIndexedSessionRepository{}}}] indirectly.
> Hence, during the serialization Ignite also writes {{{}name=this$0, 
> type=Object, fieldId=0xCBDD23AA (-874699862){}}}, which is the reference to 
> {{{}IgniteIndexedSessionRepository{}}}. That leads to the following issues:
>  * we are serializing and saving internal utility data, like}} Ignite 
> ignite{}}}, {{private IndexResolver indexResolver}} etc
>  * one of the IgniteIndexedSessionRepository’s fields is IgniteCache itself - 
> {{IgniteCache sessions}} that basically keeps every 
> session so far leading to a StackOverflow error after some time. 
>  
> {code:java}
> [2022-11-25T17:27:29,268][ERROR][sys-stripe-0-#1%USERS_IGNITE%][GridCacheIoManager]
>  Failed processing message [senderId=0f0ca915-d6cd-4580-92a3-1fbc3d2a5722, 
> msg=GridNearSingleGetResponse [futId=1669397231378, res=-547701325, 
> topVer=null, err=null, flags=0]] 2java.lang.StackOverflowError: null 3 at 
> org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerUtils.descriptorFromCache(OptimizedMarshallerUtils.java:328)
>  ~[ignite-core-8.8.22.jar:8.8.22] 4 at 
> org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerUtils.classDescriptor(OptimizedMarshallerUtils.java:273)
>  ~[ignite-core-8.8.22.jar:8.8.22] 5 at 
> org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObject0(OptimizedObjectInputStream.java:354)
>  ~[ignite-core-8.8.22.jar:8.8.22] 6 at 
> org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObjectOverride(OptimizedObjectInputStream.java:211)
>  ~[ignite-core-8.8.22.jar:8.8.22] 7 at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:480) ~[?:?] 8 at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:447) ~[?:?] 9 at 
> org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.readExternal(GridCacheProxyImpl.java:1662)
>  ~[ignite-core-8.8.22.jar:8.8.22] 10 at 
> org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readExternalizable(OptimizedObjectInputStream.java:569)
>  ~[ignite-core-8.8.22.jar:8.8.22] 11 at 
> org.apache.ignite.internal.marshaller.optimized.OptimizedClassDescriptor.read(OptimizedClassDescriptor.java:979)
>  ~[ignite-core-8.8.22.jar:8.8.22] 12 at 
> org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObject0(OptimizedObjectInputStream.java:359)
>  ~[ignite-core-8.8.22.jar:8.8.22] 13 at 
> org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObjectOverride(OptimizedObjectInputStream.java:211)
>  ~[ignite-core-8.8.22.jar:8.8.22] 14 at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:480) ~[?:?] 15 at 
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:447) ~[?:?] 16... 
> 17[2022-11-25T17:27:29,276][ERROR][sys-stripe-0-#1%USERS_IGNITE%][] Critical 
> system error detected. Will be handled accordingly to configured handler 
> [hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, 
> super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet 
> [SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], 
> failureCtx=FailureContext [type=CRITICAL_ERROR, 
> err=java.lang.StackOverflowError]]{code}



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


[jira] [Updated] (IGNITE-18302) ignite-spring-sessions: IgniteSession serialization drags its parent class

2022-12-01 Thread Alexandr Shapkin (Jira)


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

Alexandr Shapkin updated IGNITE-18302:
--
Description: 
In short, there is a bug in ignite-spring-session-ext implementation.

We store IgniteIndexedSessionRepository${{{}IgniteSession{}}} in the cache, but 
it’s an internal non-static class, having a reference to the parent 
[\{{{}IgniteIndexedSessionRepository{}}}] indirectly.

Hence, during the serialization Ignite also writes {{{}name=this$0, 
type=Object, fieldId=0xCBDD23AA (-874699862){}}}, which is the reference to 
{{{}IgniteIndexedSessionRepository{}}}. That leads to the following issues:
 * we are serializing and saving internal utility data, like}} Ignite 
ignite{}}}, {{private IndexResolver indexResolver}} etc

 * one of the IgniteIndexedSessionRepository’s fields is IgniteCache itself - 
{{IgniteCache sessions}} that basically keeps every 
session so far leading to a StackOverflow error after some time. 

 
{code:java}
[2022-11-25T17:27:29,268][ERROR][sys-stripe-0-#1%USERS_IGNITE%][GridCacheIoManager]
 Failed processing message [senderId=0f0ca915-d6cd-4580-92a3-1fbc3d2a5722, 
msg=GridNearSingleGetResponse [futId=1669397231378, res=-547701325, 
topVer=null, err=null, flags=0]] 2java.lang.StackOverflowError: null 3 at 
org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerUtils.descriptorFromCache(OptimizedMarshallerUtils.java:328)
 ~[ignite-core-8.8.22.jar:8.8.22] 4 at 
org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerUtils.classDescriptor(OptimizedMarshallerUtils.java:273)
 ~[ignite-core-8.8.22.jar:8.8.22] 5 at 
org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObject0(OptimizedObjectInputStream.java:354)
 ~[ignite-core-8.8.22.jar:8.8.22] 6 at 
org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObjectOverride(OptimizedObjectInputStream.java:211)
 ~[ignite-core-8.8.22.jar:8.8.22] 7 at 
java.io.ObjectInputStream.readObject(ObjectInputStream.java:480) ~[?:?] 8 at 
java.io.ObjectInputStream.readObject(ObjectInputStream.java:447) ~[?:?] 9 at 
org.apache.ignite.internal.processors.cache.GridCacheProxyImpl.readExternal(GridCacheProxyImpl.java:1662)
 ~[ignite-core-8.8.22.jar:8.8.22] 10 at 
org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readExternalizable(OptimizedObjectInputStream.java:569)
 ~[ignite-core-8.8.22.jar:8.8.22] 11 at 
org.apache.ignite.internal.marshaller.optimized.OptimizedClassDescriptor.read(OptimizedClassDescriptor.java:979)
 ~[ignite-core-8.8.22.jar:8.8.22] 12 at 
org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObject0(OptimizedObjectInputStream.java:359)
 ~[ignite-core-8.8.22.jar:8.8.22] 13 at 
org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObjectOverride(OptimizedObjectInputStream.java:211)
 ~[ignite-core-8.8.22.jar:8.8.22] 14 at 
java.io.ObjectInputStream.readObject(ObjectInputStream.java:480) ~[?:?] 15 at 
java.io.ObjectInputStream.readObject(ObjectInputStream.java:447) ~[?:?] 16... 
17[2022-11-25T17:27:29,276][ERROR][sys-stripe-0-#1%USERS_IGNITE%][] Critical 
system error detected. Will be handled accordingly to configured handler 
[hnd=StopNodeOrHaltFailureHandler [tryStop=false, timeout=0, 
super=AbstractFailureHandler [ignoredFailureTypes=UnmodifiableSet 
[SYSTEM_WORKER_BLOCKED, SYSTEM_CRITICAL_OPERATION_TIMEOUT]]], 
failureCtx=FailureContext [type=CRITICAL_ERROR, 
err=java.lang.StackOverflowError]]{code}

  was:
In short, there is a bug in ignite-spring-session-ext implementation.

We store IgniteIndexedSessionRepository${{{}IgniteSession{}}} in the cache, but 
it’s an internal non-static class, having a reference to the parent 
[{{{}IgniteIndexedSessionRepository{}}}] indirectly.

Hence, during the serialization Ignite also writes {{{}name=this$0, 
type=Object, fieldId=0xCBDD23AA (-874699862){}}}, which is the reference to 
{{{}IgniteIndexedSessionRepository{}}}. That leads to the following issues:
 * we are serializing and saving internal utility data, like{{{} Ignite 
ignite{}}}, {{private IndexResolver indexResolver}} etc

 * one of the IgniteIndexedSessionRepository’s fields is IgniteCache itself - 
{{IgniteCache sessions}} that basically keeps every 
session so far leading to a StackOverflow error after some time. 


> ignite-spring-sessions: IgniteSession serialization drags its parent class
> --
>
> Key: IGNITE-18302
> URL: https://issues.apache.org/jira/browse/IGNITE-18302
> Project: Ignite
>  Issue Type: Bug
>  Components: extensions
>Reporter: Alexandr Shapkin
>Priority: Major
>
> In short, there is a bug in ignite-spring-session-ext implementation.
> We store IgniteIndexedSessionRepository${{{}IgniteSession{}}}