-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Kryo5][scala] Case class serialization issue: TestVarArgs(vargs: String*) #954
Comments
This might have the same root cause as #940. I have a tentative fix for this, but I'm not 100% sure that it is fully backwards compatible. Could you check if disabling generics optimization ( |
Thanks @theigl! I have just tested your suggetion and it works:
|
OK great. I will revisit #940 in the coming days, but as I said, I'm not sure I can come up with a fix that is guaranteed not to break some other edge cases. I would suggest you simply keep generics optimization disabled in your PR. I'm planning to disable it (or tone in down significantly) in Kryo 6. It is the source of most of the bugs that have been reported against Kryo 5 and the potential benefits are limited. |
Ok, then I will disable it in my PR. Thanks! |
More details are in this ticket: EsotericSoftware/kryo#954
I just pushed a fix for #940. Could you please test against the latest snapshot if this fixes your issue as well? |
I have just tested it and the latest 5.4.1-SNAPSHOT fixes my issue as well. |
Fantastic thanks! I will release Kryo 5.5.0 later this week. |
Describe the bug
Kryo5 cannot serialize the following scala case class which has one variable length argument:
case class TestVarArgs(vargs: String*)
It works with Kryo4 (4.0.2). Seems like this is a regression issue in Kryo5.
Error message:
Other test results:
https://github.com/roczei/kryo_repro/blob/main/repro-logs-kryo5-bad.txt
To Reproduce
Example scala code:
Bad results (Kryo5):
or
or
Console outputs: https://github.com/roczei/kryo_repro/blob/main/repro-logs-kryo5-bad.txt
Good result (Kryo4)
Console output:
https://github.com/roczei/kryo_repro/blob/main/kryo4-good-logs.txt
OS: macosx but I think this is not OS related
JDK: Azul Systems, Inc. Java 11.0.16 / Azul Systems, Inc. Java 1.8.0_345 (probably it can be reproduced with other jave versions as well)
Scala versions: 2.11.12, 2.12.7, 2.13.8
Kryo Version: all Kryo5 versions
Additional context
I would like to finish this pull request what nicknezis has started (update chill to the newer Kryo 5): twitter/chill#514 and currently this is blocking me to finish this task (latest pull request): roczei/chill#1. Similar issue was mentioned in this kryo thread as well:
https://groups.google.com/g/kryo-users/c/6iBVAKG5p4g
The text was updated successfully, but these errors were encountered: