You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fury.apache.org by "johannschenkl (via GitHub)" <gi...@apache.org> on 2024/04/23 08:40:19 UTC
[I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [incubator-fury]
johannschenkl opened a new issue, #1558:
URL: https://github.com/apache/incubator-fury/issues/1558
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/incubator-fury/issues) and found no similar issues.
### Version
0.4.1
### Component(s)
Java
### Minimal reproduce step
We are using fury as a replacement for jdk serialization in a java rpc application. If on the server side an exception is thrown, this exception in serialized and sent to the client.
In some cases we seen and exception when the serialization is done.
Thanks for your help and for that great project!
Fury setup:
`var fury = Fury.builder()
.withLanguage(Language.JAVA)
.withRefTracking(true)
.requireClassRegistration(false)
.withAsyncCompilation(true).build();`
Relevant parts of logs:
> io.fury.serializer.LambdaSerializer.read(LambdaSerializer.java:88)
> io.fury.Fury.readRef(Fury.java:828)
> io.fury.resolver.FieldResolver.skipDataBy4(FieldResolver.java:433)
> com.mycompany.SomeExceptionFuryRefCompatibleCodec_1_815033865_986095905.readAndSetFields(SomeExceptionFuryRefCompatibleCodec_1_815033865_986095905.java:258)
> com.mycompany.SomeExceptionFuryRefCompatibleCodec_1_815033865_986095905.read(SomeExceptionFuryRefCompatibleCodec_1_815033865_986095905.java:324)
> com.mycompany.RemoteInvocationResultFuryRefCodec_1_815033865_718325701.readFields$(RemoteInvocationResultFuryRefCodec_1_815033865_718325701.java:111)
> com.mycompany.RemoteInvocationResultFuryRefCodec_1_815033865_718325701.read(RemoteInvocationResultFuryRefCodec_1_815033865_718325701.java:127)
> io.fury.Fury.readDataInternal(Fury.java:899)
> io.fury.Fury.readRef(Fury.java:801)
> io.fury.Fury.deserializeJavaObjectAndClass(Fury.java:1135)
> io.fury.Fury.deserializeJavaObjectAndClass(Fury.java:1121)
> com.mycompany.Serializer.deserialize(Serializer.java:35)
>
> ...
>
>
> Caused by:
> Index -1 out of bounds for length 512
> java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 512
> io.fury.collection.IntArray.pop(IntArray.java:51)
> io.fury.resolver.MapRefResolver.reference(MapRefResolver.java:194)
> io.fury.builder.SerializedLambdaFuryRefCodec_1_1361449601.read(SerializedLambdaFuryRefCodec_1_1361449601.java:193)
> io.fury.serializer.LambdaSerializer.read(LambdaSerializer.java:85)
> io.fury.Fury.readRef(Fury.java:828)
> io.fury.resolver.FieldResolver.skipDataBy4(FieldResolver.java:433)
> com.mycompany.SomeExceptionFuryRefCompatibleCodec_1_815033865_986095905.readAndSetFields(SomeExceptionFuryRefCompatibleCodec_1_815033865_986095905.java:258)
> com.mycompany.SomeExceptionFuryRefCompatibleCodec_1_815033865_986095905.read(SomeExceptionFuryRefCompatibleCodec_1_815033865_986095905.java:324)
> com.mycompany.RemoteInvocationResultFuryRefCodec_1_815033865_718325701.readFields$(RemoteInvocationResultFuryRefCodec_1_815033865_718325701.java:111)
> com.mycompany.RemoteInvocationResultFuryRefCodec_1_815033865_718325701.read(RemoteInvocationResultFuryRefCodec_1_815033865_718325701.java:127)
> io.fury.Fury.readDataInternal(Fury.java:899)
> io.fury.Fury.readRef(Fury.java:801)
> io.fury.Fury.deserializeJavaObjectAndClass(Fury.java:1135)
> io.fury.Fury.deserializeJavaObjectAndClass(Fury.java:1121)
> com.mycompany.Serializer.deserialize(Serializer.java:35)
### What did you expect to see?
The deserialized payload.
### What did you see instead?
An ArrayIndexOutOfBoundsException.
### Anything Else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [incubator-fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1558:
URL: https://github.com/apache/incubator-fury/issues/1558#issuecomment-2071806759
Hi @johannschenkl , thanks for reporting this bug. It seems that our current implementation has some inconsistency between interpreter mode and codegen mode. This has been reported in #1455, #1325 and #1176.
The fix won't be difficult. But none of this can provide reproduction code, so I can't debug to find out what's going wrong.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [incubator-fury]
Posted by "johannschenkl (via GitHub)" <gi...@apache.org>.
johannschenkl commented on issue #1558:
URL: https://github.com/apache/incubator-fury/issues/1558#issuecomment-2082042546
We're self-managing Fury in a ThreadLocal, is that the issue, maybe?
`
private static final ThreadLocal<Fury> THE_FURY = ThreadLocal.withInitial(() -> {
var fury = Fury.builder().withLanguage(Language.JAVA)
.withRefTracking(true)
.requireClassRegistration(false)
.withAsyncCompilation(true)
.suppressClassRegistrationWarnings(true) // as checker is enabled, see below
.build();
fury.getClassResolver().setClassChecker(...);
return fury;
});`
I know there's also the ...buildThreadSafeFury/buildThreadLocalFury implementations. But we did not see a way to register a classchecker on them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #1558: Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized
URL: https://github.com/apache/fory/issues/1558
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [fory]
Posted by "shautmann (via GitHub)" <gi...@apache.org>.
shautmann commented on issue #1558:
URL: https://github.com/apache/fory/issues/1558#issuecomment-3370809823
Hi @chaokunyang, no we use version 0.4.1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1558:
URL: https://github.com/apache/fory/issues/1558#issuecomment-3370733578
@shautmann does this happend for fory 0.12.3?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [incubator-fury]
Posted by "johannschenkl (via GitHub)" <gi...@apache.org>.
johannschenkl commented on issue #1558:
URL: https://github.com/apache/incubator-fury/issues/1558#issuecomment-2082006144
Hi @chaokunyang, unfortunately yes. I'm still trying to get a reproducer working.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1558:
URL: https://github.com/apache/fory/issues/1558#issuecomment-4269350634
0.17.0 will be released in next two days, stay tuned
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [incubator-fury]
Posted by "johannschenkl (via GitHub)" <gi...@apache.org>.
johannschenkl commented on issue #1558:
URL: https://github.com/apache/incubator-fury/issues/1558#issuecomment-2106778857
Hi @chaokunyang, sorry for the late response. After using the provided factory & disabling async compilation, the issue did not show up again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [incubator-fury]
Posted by "johannschenkl (via GitHub)" <gi...@apache.org>.
johannschenkl commented on issue #1558:
URL: https://github.com/apache/incubator-fury/issues/1558#issuecomment-2071868136
Hi @chaokunyang, thanks for the quick response. Currently, the issue is only reproducible on a qa machine and only for some users. I was not able to reproduce it by myself. As of yet, it only happend in conjunction with a serialized RuntimeException.
I'll check if disabling asyncCompilation helps and if I can somehow build a test case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #1558: Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized
URL: https://github.com/apache/fory/issues/1558
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [incubator-fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1558:
URL: https://github.com/apache/incubator-fury/issues/1558#issuecomment-2080372088
Hi @johannschenkl . Is this issue still persisits?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [incubator-fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1558:
URL: https://github.com/apache/incubator-fury/issues/1558#issuecomment-2071810290
It would be really great if you can provide reproduction code. I try to fix it for a long time
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [fory]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1558:
URL: https://github.com/apache/fory/issues/1558#issuecomment-3370821930
Please use latest fory version instead, 0.4.1 is two years ago, and it's not maintained anymore. If 0.12.3 still has such error, please open a new issue for it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [incubator-fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1558:
URL: https://github.com/apache/incubator-fury/issues/1558#issuecomment-2071809214
Will it still raise execpetion if you disabled asyncCompilation?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [incubator-fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1558:
URL: https://github.com/apache/incubator-fury/issues/1558#issuecomment-2082189918
This is right, or you can use `org.apache.fury.ThreadLocalFury#ThreadLocalFury`, which let you to set anything in the factory
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [fory]
Posted by "shautmann (via GitHub)" <gi...@apache.org>.
shautmann commented on issue #1558:
URL: https://github.com/apache/fory/issues/1558#issuecomment-3370545761
Unfortunately we faced the same issue again. @chaokunyang can you please reopen the issue?
`Caused by:
Can't deserialize lambda
java.lang.RuntimeException: Can't deserialize lambda
io.fury.serializer.LambdaSerializer.read(LambdaSerializer.java:88)
io.fury.Fury.readRef(Fury.java:828)
io.fury.resolver.FieldResolver.skipDataBy4(FieldResolver.java:433)
...
io.fury.Fury.readDataInternal(Fury.java:899)
io.fury.Fury.readRef(Fury.java:801)
io.fury.Fury.deserialize(Fury.java:750)
io.fury.Fury.deserialize(Fury.java:681)
io.fury.ThreadLocalFury.deserialize(ThreadLocalFury.java:81)
...
Caused by:
java.lang.ArrayIndexOutOfBoundsException
`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [I] Sporadic java.lang.ArrayIndexOutOfBoundsException/Can't deserialize lambda if RuntimeException is deserialized [fory]
Posted by "tex1988 (via GitHub)" <gi...@apache.org>.
tex1988 commented on issue #1558:
URL: https://github.com/apache/fory/issues/1558#issuecomment-4268242090
When is it going to be fixed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org