Skip to content
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

Seeing ArrayIndexOutOfBoundsException #2935

Closed
himanshu0791 opened this issue Jul 31, 2024 · 1 comment · Fixed by #2943
Closed

Seeing ArrayIndexOutOfBoundsException #2935

himanshu0791 opened this issue Jul 31, 2024 · 1 comment · Fixed by #2943
Labels
status: good-first-issue An issue that can only be worked on by brand new contributors type: bug A general bug

Comments

@himanshu0791
Copy link

Bug Report

java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5
at io.lettuce.core.internal.Futures.allOf(Futures.java:54)
at io.lettuce.core.internal.AsyncConnectionProvider.close(AsyncConnectionProvider.java:166)
at io.lettuce.core.cluster.PooledClusterConnectionProvider.closeAsync(PooledClusterConnectionProvider.java:513)
at io.lettuce.core.cluster.ClusterDistributionChannelWriter.closeAsync(ClusterDistributionChannelWriter.java:422)
at io.lettuce.core.RedisChannelHandler.closeAsync(RedisChannelHandler.java:179)
at io.lettuce.core.RedisChannelHandler.close(RedisChannelHandler.java:157)

There is no specific config for when it shows up. I have seen it for default settings on v6.2.2. Its not frequent but trickles up in logs from time to time. Please let me know if I can provide any more information related to this.

@tishun tishun added type: bug A general bug status: good-first-issue An issue that can only be worked on by brand new contributors labels Aug 1, 2024
@tishun
Copy link
Collaborator

tishun commented Aug 1, 2024

Seems to me like a problem related to concurrent code execution.
The stages provided to the method could change during the method execution.

We should rewrite this code to be more resilient.

Thanks for the report!

jinkshower added a commit to jinkshower/lettuce that referenced this issue Aug 6, 2024
jinkshower added a commit to jinkshower/lettuce that referenced this issue Aug 8, 2024
Roiocam added a commit to Roiocam/lettuce that referenced this issue Aug 15, 2024
@tishun tishun closed this as completed in bf5bd75 Sep 16, 2024
tishun added a commit to tishun/lettuce-core that referenced this issue Nov 1, 2024
* Add defensive copy

Closes redis#2935

* Polishing

* Forgot to call formatter, shame on me

---------

Co-authored-by: Tihomir Mateev <[email protected]>
tishun added a commit that referenced this issue Nov 1, 2024
* Add defensive copy

Closes #2935

* Polishing

* Forgot to call formatter, shame on me

---------

Co-authored-by: jinkshower <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: good-first-issue An issue that can only be worked on by brand new contributors type: bug A general bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants