Thread goes into Waiting state forever
Tanroop Dhillon <dhillon...@...>
Hi,
I have following traversal, Code: GraphTraversal<Vertex, Map<String, Object >> vertexGraphTraversal = janusGraphConfig.getJanusGraph().traversal().V() .has(VertexType.DEVICE.name(), PropertyEnum.ID.name(), TextP.startingWith(String.valueOf(devicePrefix))) .as("devices").inE(EdgeType.LOGIN.name()).outV().hasLabel(VertexType.USER.name()) .as("users").select("devices","uidx").by(PropertyEnum.ID.name()) .by(PropertyEnum.ID.name()); while (vertexGraphTraversal.hasNext()){ next = vertexGraphTraversal.next(); curr_device = (String) next.get("devices"); curr_uidx = (String) next.get("uidx"); // Do some business logic / traverse } Problem Threads go to waiting state Stacktrace: "pool-12-thread-3" #175 prio=5 os_prio=0 tid=0x00007f3de5732800 nid=0x1b9f0 in Object.wait() [0x00007f3c799f5000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:502) at io.vavr.concurrent.FutureImpl$$Lambda$592/765826899.run(Unknown Source) at io.vavr.control.Try.run(Try.java:105) at io.vavr.concurrent.FutureImpl.await(FutureImpl.java:114) - locked <0x00000006cdb56b98> (a java.lang.Object) at org.janusgraph.diskstorage.cql.CQLKeyColumnValueStore.interruptibleWait(CQLKeyColumnValueStore.java:308) at org.janusgraph.diskstorage.cql.CQLKeyColumnValueStore.getSlice(CQLKeyColumnValueStore.java:289) at org.janusgraph.diskstorage.util.MetricInstrumentedStore.lambda$getSlice$0(MetricInstrumentedStore.java:104) at org.janusgraph.diskstorage.util.MetricInstrumentedStore$$Lambda$606/587180314.call(Unknown Source) at org.janusgraph.diskstorage.util.MetricInstrumentedStore.runWithMetrics(MetricInstrumentedStore.java:204) at org.janusgraph.diskstorage.util.MetricInstrumentedStore.getSlice(MetricInstrumentedStore.java:103) at org.janusgraph.diskstorage.keycolumnvalue.KCVSProxy.getSlice(KCVSProxy.java:76) at org.janusgraph.diskstorage.keycolumnvalue.KCVSProxy.getSlice(KCVSProxy.java:76) at org.janusgraph.diskstorage.BackendTransaction$1.call(BackendTransaction.java:271) at org.janusgraph.diskstorage.BackendTransaction$1.call(BackendTransaction.java:268) at org.janusgraph.diskstorage.util.BackendOperation.executeDirect(BackendOperation.java:68) at org.janusgraph.diskstorage.util.BackendOperation.execute(BackendOperation.java:54) at org.janusgraph.diskstorage.BackendTransaction.executeRead(BackendTransaction.java:469) at org.janusgraph.diskstorage.BackendTransaction.edgeStoreQuery(BackendTransaction.java:268) at org.janusgraph.graphdb.database.StandardJanusGraph.edgeQuery(StandardJanusGraph.java:440) at org.janusgraph.graphdb.query.vertex.SimpleVertexQueryProcessor.lambda$null$0(SimpleVertexQueryProcessor.java:120) at org.janusgraph.graphdb.query.vertex.SimpleVertexQueryProcessor$$Lambda$1036/1665748425.apply(Unknown Source) at org.janusgraph.graphdb.query.profile.QueryProfiler.profile(QueryProfiler.java:99) at org.janusgraph.graphdb.query.profile.QueryProfiler.profile(QueryProfiler.java:91) at org.janusgraph.graphdb.query.profile.QueryProfiler.profile(QueryProfiler.java:83) at org.janusgraph.graphdb.query.vertex.SimpleVertexQueryProcessor.lambda$getBasicIterator$1(SimpleVertexQueryProcessor.java:120) at org.janusgraph.graphdb.query.vertex.SimpleVertexQueryProcessor$$Lambda$1032/1126366380.get(Unknown Source) at org.janusgraph.graphdb.vertices.CacheVertex.loadRelations(CacheVertex.java:67) at org.janusgraph.graphdb.query.vertex.SimpleVertexQueryProcessor.getBasicIterator(SimpleVertexQueryProcessor.java:120) at org.janusgraph.graphdb.query.vertex.SimpleVertexQueryProcessor.iterator(SimpleVertexQueryProcessor.java:77) at com.google.common.collect.Iterables$6.iterator(Iterables.java:689) at org.janusgraph.graphdb.query.vertex.SimpleVertexQueryProcessor.vertexIds(SimpleVertexQueryProcessor.java:100) at org.janusgraph.graphdb.query.vertex.BasicVertexCentricQueryBuilder.executeIndividualVertices(BasicVertexCentricQueryBuilder.java:336) at org.janusgraph.graphdb.query.vertex.BasicVertexCentricQueryBuilder.executeVertices(BasicVertexCentricQueryBuilder.java:330) at org.janusgraph.graphdb.query.vertex.BasicVertexCentricQueryBuilder$VertexConstructor.getResult(BasicVertexCentricQueryBuilder.java:241) at org.janusgraph.graphdb.query.vertex.BasicVertexCentricQueryBuilder$VertexConstructor.getResult(BasicVertexCentricQueryBuilder.java:237) at org.janusgraph.graphdb.query.vertex.VertexCentricQueryBuilder.execute(VertexCentricQueryBuilder.java:86) at org.janusgraph.graphdb.query.vertex.VertexCentricQueryBuilder.vertices(VertexCentricQueryBuilder.java:114) at org.janusgraph.graphdb.vertices.AbstractVertex.getVertexLabelInternal(AbstractVertex.java:125) at org.janusgraph.graphdb.vertices.AbstractVertex.vertexLabel(AbstractVertex.java:130) at org.janusgraph.graphdb.vertices.AbstractVertex.label(AbstractVertex.java:121) at org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer.testLabel(HasContainer.java:114) at org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer.test(HasContainer.java:85) at org.apache.tinkerpop.gremlin.process.traversal.step.util.HasContainer.testAll(HasContainer.java:180) at org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasStep.filter(HasStep.java:50) at org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep.processNextStart(FilterStep.java:38) at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143) at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50) at org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep.processNextStart(FlatMapStep.java:48) at org.janusgraph.graphdb.tinkerpop.optimize.JanusGraphVertexStep.processNextStart(JanusGraphVertexStep.java:182) at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143) at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50) at org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep.processNextStart(FilterStep.java:37) at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143) at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50) at org.apache.tinkerpop.gremlin.process.traversal.step.map.MapStep.processNextStart(MapStep.java:36) at org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectStep.processNextStart(SelectStep.java:156) at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143) at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:192) at com.myntra.ats.linkedaccounts.batch.utils.MultiUserDevicesHelper.fetchForDevicesStartingWith(MultiUserDevicesHelper.java:57) at com.myntra.ats.linkedaccounts.batch.utils.MultiUserDevicesHelper.run(MultiUserDevicesHelper.java:35) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Can someone please help here. |
|
ssbothe3@...
Hi Tanroop, |
|
hadoopmarc@...
Hi Tanroop,
Does the problem also occur if you replace v() with V().limit(1) inside your query? If not, at what result size does your issue start to occur? Btw, your post has a typo: "user" and "uidx" should be the same, but I assume it stems from anonymizing your query. Marc |
|