[ https://issues.apache.org/jira/browse/IGNITE-18302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17761211#comment-17761211 ]
Andrey Novikov commented on IGNITE-18302: ----------------------------------------- [~ashapkin] Can I take this issue? I see you can enough time to finish it. > 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 > Assignee: Alexandr Shapkin > 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<Session> indexResolver}} etc > * one of the IgniteIndexedSessionRepository’s fields is IgniteCache itself - > {{IgniteCache<String, IgniteSession> 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)