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

Unhandled ConcurrentModificationException in RestHandler causes crash #339

Open
ebbesson opened this issue Jun 25, 2014 · 1 comment
Open

Comments

@ebbesson
Copy link
Contributor

Caught some something like this over at a customer today

Feels like it's related to the other concurrency issues we have today with the cache.
Customer is running 0.3.1

2014-06-19 19:25:12 : ERROR  : I/O dispatcher 1 : com.findwise.hydra.net.HttpRESTHandler : Unhandled exception occurred
java.util.ConcurrentModificationException: null
        at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:394) ~[na:1.7.0_07]
        at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:413) ~[na:1.7.0_07]
        at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:412) ~[na:1.7.0_07]
        at java.util.HashMap.putAllForCreate(HashMap.java:533) ~[na:1.7.0_07]
        at java.util.HashMap.<init>(HashMap.java:320) ~[na:1.7.0_07]
        at java.util.LinkedHashMap.<init>(LinkedHashMap.java:212) ~[na:1.7.0_07]
        at org.bson.BasicBSONObject.toMap(BasicBSONObject.java:76) ~[hydra-core.jar:na]
        at com.findwise.hydra.mongodb.MongoDocument.getMetadataMap(MongoDocument.java:185) ~[hydra-core.jar:na]
        at com.findwise.hydra.mongodb.MongoDocument.getMetadataSubMap(MongoDocument.java:407) ~[hydra-core.jar:na]
        at com.findwise.hydra.mongodb.MongoDocument.touchedBy(MongoDocument.java:415) ~[hydra-core.jar:na]
        at com.findwise.hydra.mongodb.MongoDocument.matches(MongoDocument.java:506) ~[hydra-core.jar:na]
        at com.findwise.hydra.MemoryCache.getDocument(MemoryCache.java:76) ~[hydra-core.jar:na]
        at com.findwise.hydra.MemoryCache.getAndTag(MemoryCache.java:104) ~[hydra-core.jar:na]
        at com.findwise.hydra.CachingDocumentNIO.getAndTag(CachingDocumentNIO.java:63) ~[hydra-core.jar:na]
        at com.findwise.hydra.net.QueryHandler.handle(QueryHandler.java:66) ~[hydra-core.jar:na]
        at com.findwise.hydra.net.HttpRESTHandler.dispatch(HttpRESTHandler.java:89) ~[hydra-core.jar:na]
        at com.findwise.hydra.net.HttpRESTHandler.handle(HttpRESTHandler.java:110) ~[hydra-core.jar:na]
        at org.apache.http.nio.protocol.BasicAsyncRequestHandler.handle(BasicAsyncRequestHandler.java:68) [hydra-core.jar:na]
        at org.apache.http.nio.protocol.BasicAsyncRequestHandler.handle(BasicAsyncRequestHandler.java:47) [hydra-core.jar:na]
        at org.apache.http.nio.protocol.HttpAsyncService.processRequest(HttpAsyncService.java:521) [hydra-core.jar:na]
        at org.apache.http.nio.protocol.HttpAsyncService.inputReady(HttpAsyncService.java:288) [hydra-core.jar:na]
        at org.apache.http.impl.nio.DefaultNHttpServerConnection.consumeInput(DefaultNHttpServerConnection.java:199) [hydra-core.jar:na]
        at org.apache.http.impl.nio.DefaultHttpServerIODispatch.onInputReady(DefaultHttpServerIODispatch.java:117) [hydra-core.jar:na]
        at org.apache.http.impl.nio.DefaultHttpServerIODispatch.onInputReady(DefaultHttpServerIODispatch.java:50) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:112) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:160) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:342) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:320) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:280) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:604) [hydra-core.jar:na]
        at java.lang.Thread.run(Thread.java:722) [na:1.7.0_07]
2014-06-19 19:25:12 : ERROR  : I/O dispatcher 1 : com.findwise.hydra.net.HttpRESTHandler : Unhandled exception occurred
java.util.ConcurrentModificationException: null
        at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:394) ~[na:1.7.0_07]
        at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:413) ~[na:1.7.0_07]
        at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:412) ~[na:1.7.0_07]
        at java.util.HashMap.putAllForCreate(HashMap.java:533) ~[na:1.7.0_07]
        at java.util.HashMap.<init>(HashMap.java:320) ~[na:1.7.0_07]
        at java.util.LinkedHashMap.<init>(LinkedHashMap.java:212) ~[na:1.7.0_07]
        at org.bson.BasicBSONObject.toMap(BasicBSONObject.java:76) ~[hydra-core.jar:na]
        at com.findwise.hydra.mongodb.MongoDocument.getMetadataMap(MongoDocument.java:185) ~[hydra-core.jar:na]
        at com.findwise.hydra.mongodb.MongoDocument.getMetadataSubMap(MongoDocument.java:407) ~[hydra-core.jar:na]
        at com.findwise.hydra.mongodb.MongoDocument.touchedBy(MongoDocument.java:415) ~[hydra-core.jar:na]
        at com.findwise.hydra.mongodb.MongoDocument.matches(MongoDocument.java:506) ~[hydra-core.jar:na]
        at com.findwise.hydra.MemoryCache.getDocument(MemoryCache.java:76) ~[hydra-core.jar:na]
        at com.findwise.hydra.MemoryCache.getAndTag(MemoryCache.java:104) ~[hydra-core.jar:na]
        at com.findwise.hydra.CachingDocumentNIO.getAndTag(CachingDocumentNIO.java:63) ~[hydra-core.jar:na]
        at com.findwise.hydra.net.QueryHandler.handle(QueryHandler.java:66) ~[hydra-core.jar:na]
        at com.findwise.hydra.net.HttpRESTHandler.dispatch(HttpRESTHandler.java:89) ~[hydra-core.jar:na]
        at com.findwise.hydra.net.HttpRESTHandler.handle(HttpRESTHandler.java:110) ~[hydra-core.jar:na]
        at org.apache.http.nio.protocol.BasicAsyncRequestHandler.handle(BasicAsyncRequestHandler.java:68) [hydra-core.jar:na]
        at org.apache.http.nio.protocol.BasicAsyncRequestHandler.handle(BasicAsyncRequestHandler.java:47) [hydra-core.jar:na]
        at org.apache.http.nio.protocol.HttpAsyncService.processRequest(HttpAsyncService.java:521) [hydra-core.jar:na]
        at org.apache.http.nio.protocol.HttpAsyncService.inputReady(HttpAsyncService.java:288) [hydra-core.jar:na]
        at org.apache.http.impl.nio.DefaultNHttpServerConnection.consumeInput(DefaultNHttpServerConnection.java:199) [hydra-core.jar:na]
        at org.apache.http.impl.nio.DefaultHttpServerIODispatch.onInputReady(DefaultHttpServerIODispatch.java:117) [hydra-core.jar:na]
        at org.apache.http.impl.nio.DefaultHttpServerIODispatch.onInputReady(DefaultHttpServerIODispatch.java:50) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:112) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:160) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:342) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:320) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:280) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106) [hydra-core.jar:na]
        at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:604) [hydra-core.jar:na]
        at java.lang.Thread.run(Thread.java:722) [na:1.7.0_07]
2014-06-19 19:25:12 : ERROR  : I/O dispatcher 1 : com.findwise.hydra.net.HttpResponseWriter : Printing Unhandled Exception
2014-06-19 19:25:12 : ERROR  : I/O dispatcher 1 : com.findwise.hydra.net.HttpResponseWriter : Printing Unhandled Exception
2014-06-19 19:25:12 : INFO   : Thread-5 : com.findwise.hydra.CachingDocumentNIO : Shutting down cache monitor thread. Attempting to save local changes.
2014-06-19 19:25:12 : INFO   : Thread-5 : com.findwise.hydra.CachingDocumentNIO : Shutting down cache monitor thread. Attempting to save local changes.
´´´
@laserval laserval changed the title Unhandled ConcurrentMondificationException in RestHandler causes crash Unhandled ConcurrentModificationException in RestHandler causes crash Jul 18, 2014
@laserval
Copy link
Contributor

Seen in 0.4.0 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants