Replies: 1 comment 4 replies
-
Which JDK are you running the test on? I tried System.out.println(Math.abs(Integer.MIN_VALUE) % 4); The output is 0. And IDEA also indicated that as a warning before running. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Search before asking
Apache SkyWalking Component
OAP server (apache/skywalking)
What happened
I current use Skywalking OAP Server 8.5.0 , receiver's log file print error:
java.lang.ArrayIndexOutOfBoundsException: -8
at com.google.common.collect.RegulatImmutableList.get(RegularImmutableList.java:75) ~[guava-28.1-jre.jar:?]
at org.apache.skywalking,oap.server.core.remote.selector.HashCodeSelector.select(HashCodeSelector.java;31) ~[server-core-8.5.0.jar:8.5.0]
at org.apache.skywalking,oap.server.core.remote.RemoteSenderService,send(RemoteSenderService.java:75) ~[server-core-8.5.0.jar:8.5.0]
at org.apache.skywalking,oap.server.core.analysis.worker.MetricsRemoteWorker.in(MetricsRemoteWorker.java;46) ~[server-core-8.5.0.jar:8.5.0]
.........
What you expected to happen
I reviewd [HashCodeSelector#select()] code,
find :
int selectIndex = Math.abs(streamData.remoteHashCode()) % size;
Maybe
streamData.remoteHashCode() = Integer.MIN_VALUE
causeselectIndex
< 0 。How to reproduce
I have used skywalking OAP 8.5.0 5 years , just meet this error recently.
Anything else
No response
Are you willing to submit a pull request to fix on your own?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions