You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Spark, it uses kryo pool, which reuses the same kryo object, but when IdentityObjectIntMap resize throws NegativeArraySizeException exception, reuse the object again, always throws ArrayIndexOutOfBoundsException exception
Because resize first updated the mask variable, but the keyTable update failed, which caused an error in calculating the object index the next time.
This additional check is ok, but I don't fully understand how throwing an IAE helps in your case. Is it just to fail as fast as possible?
I see you are targeting Kryo 4.x which is not maintained anymore. Even if I merge this PR, I cannot guarantee that there will be a release any time soon.
but I don't fully understand how throwing an IAE helps in your case
In order to reuse the same kryo object, we used KryoPoolQueueImpl. Under this case, resize may fail because NegativeArraySizeException, and the kryo object is no longer available, but we put it back to the pool, and the next time we get the same kryo object from the pool may fail.
I saw your fix in Kryo 5.x. ObjectMap did some size checks. This problem should not appear in 5.x.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In Spark, it uses kryo pool, which reuses the same kryo object, but when IdentityObjectIntMap resize throws
NegativeArraySizeExceptionexception, reuse the object again, always throwsArrayIndexOutOfBoundsExceptionexceptionBecause resize first updated the mask variable, but the keyTable update failed, which caused an error in calculating the object index the next time.
Stack trace
Simple test