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

ArrayIndexOutOfBoundsException in CollectionMetric.getValueAndReset() #555

Closed
jnioche opened this Issue Mar 28, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@jnioche
Copy link
Member

jnioche commented Mar 28, 2018

Caused by: java.lang.ArrayIndexOutOfBoundsException: 9
	at java.util.LinkedList.toArray(LinkedList.java:1053) ~[?:1.8.0_161]
	at java.util.LinkedList.addAll(LinkedList.java:408) ~[?:1.8.0_161]
	at java.util.LinkedList.addAll(LinkedList.java:387) ~[?:1.8.0_161]
	at java.util.LinkedList.<init>(LinkedList.java:119) ~[?:1.8.0_161]
	at com.digitalpebble.stormcrawler.util.CollectionMetric.getValueAndReset(CollectionMetric.java:35) ~[stormjar.jar:?]
	at org.apache.storm.daemon.executor$metrics_tick$fn__4899.invoke(executor.clj:345) ~[storm-core-1.2.1.jar:1.2.1]
	at clojure.core$map$fn__4553.invoke(core.clj:2622) ~[clojure-1.7.0.jar:?]

LinkedList<Long> copy = new LinkedList<>(measurements);

The metric object is used by

My guess is that the spout instance is trying to add the list while it is being copied. We could simply add synchronized blocks to prevent concurrent access to the list.

@jnioche jnioche added the bug label Mar 28, 2018

@jnioche jnioche added this to the 1.9 milestone Mar 28, 2018

@jnioche jnioche closed this in b16e6ae Mar 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.