You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by "Maja Kabiljo (JIRA)" <ji...@apache.org> on 2012/11/05 23:30:12 UTC
[jira] [Created] (GIRAPH-403) GraphMapper.notiftySentMessages need
to be thread-safe
Maja Kabiljo created GIRAPH-403:
-----------------------------------
Summary: GraphMapper.notiftySentMessages need to be thread-safe
Key: GIRAPH-403
URL: https://issues.apache.org/jira/browse/GIRAPH-403
Project: Giraph
Issue Type: Bug
Reporter: Maja Kabiljo
Assignee: Nitay Joffe
GraphMapper.notifySentMessages() is not thread-safe. Here is the error I got:
Caused by: java.lang.NullPointerException
at org.apache.giraph.graph.GraphMapper.notifySentMessages(GraphMapper.java:454)
at org.apache.giraph.graph.Vertex.sendMessage(Vertex.java:225)
at org.apache.giraph.graph.Vertex.sendMessageToAllEdges(Vertex.java:266)
at org.apache.giraph.benchmark.PageRankComputation.computePageRank(PageRankComputation.java:59)
at org.apache.giraph.benchmark.EdgeListVertexPageRankBenchmark.compute(EdgeListVertexPageRankBenchmark.java:36)
at org.apache.giraph.graph.ComputeCallable.computePartition(ComputeCallable.java:194)
at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:139)
at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:60)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GIRAPH-403) GraphMapper.notiftySentMessages
need to be thread-safe
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491211#comment-13491211 ]
Hudson commented on GIRAPH-403:
-------------------------------
Integrated in Giraph-trunk-Commit #273 (See [https://builds.apache.org/job/Giraph-trunk-Commit/273/])
GIRAPH-403: GraphMapper.notiftySentMessages need to be thread-safe (Revision 1406041)
Result = FAILURE
maja : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1406041
Files :
* /giraph/trunk/CHANGELOG
* /giraph/trunk/giraph/src/main/java/org/apache/giraph/graph/GraphMapper.java
> GraphMapper.notiftySentMessages need to be thread-safe
> ------------------------------------------------------
>
> Key: GIRAPH-403
> URL: https://issues.apache.org/jira/browse/GIRAPH-403
> Project: Giraph
> Issue Type: Bug
> Reporter: Maja Kabiljo
> Assignee: Nitay Joffe
> Attachments: GIRAPH-403-2.patch, GIRAPH-403.patch
>
>
> GraphMapper.notifySentMessages() is not thread-safe. Here is the error I got:
> Caused by: java.lang.NullPointerException
> at org.apache.giraph.graph.GraphMapper.notifySentMessages(GraphMapper.java:454)
> at org.apache.giraph.graph.Vertex.sendMessage(Vertex.java:225)
> at org.apache.giraph.graph.Vertex.sendMessageToAllEdges(Vertex.java:266)
> at org.apache.giraph.benchmark.PageRankComputation.computePageRank(PageRankComputation.java:59)
> at org.apache.giraph.benchmark.EdgeListVertexPageRankBenchmark.compute(EdgeListVertexPageRankBenchmark.java:36)
> at org.apache.giraph.graph.ComputeCallable.computePartition(ComputeCallable.java:194)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:139)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:60)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GIRAPH-403) GraphMapper.notiftySentMessages
need to be thread-safe
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491264#comment-13491264 ]
Hudson commented on GIRAPH-403:
-------------------------------
Integrated in Giraph-trunk-Commit #274 (See [https://builds.apache.org/job/Giraph-trunk-Commit/274/])
GIRAPH-412: Checkstyle error from Giraph-403 (Revision 1406058)
Result = SUCCESS
> GraphMapper.notiftySentMessages need to be thread-safe
> ------------------------------------------------------
>
> Key: GIRAPH-403
> URL: https://issues.apache.org/jira/browse/GIRAPH-403
> Project: Giraph
> Issue Type: Bug
> Reporter: Maja Kabiljo
> Assignee: Nitay Joffe
> Attachments: GIRAPH-403-2.patch, GIRAPH-403.patch
>
>
> GraphMapper.notifySentMessages() is not thread-safe. Here is the error I got:
> Caused by: java.lang.NullPointerException
> at org.apache.giraph.graph.GraphMapper.notifySentMessages(GraphMapper.java:454)
> at org.apache.giraph.graph.Vertex.sendMessage(Vertex.java:225)
> at org.apache.giraph.graph.Vertex.sendMessageToAllEdges(Vertex.java:266)
> at org.apache.giraph.benchmark.PageRankComputation.computePageRank(PageRankComputation.java:59)
> at org.apache.giraph.benchmark.EdgeListVertexPageRankBenchmark.compute(EdgeListVertexPageRankBenchmark.java:36)
> at org.apache.giraph.graph.ComputeCallable.computePartition(ComputeCallable.java:194)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:139)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:60)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GIRAPH-403) GraphMapper.notiftySentMessages need
to be thread-safe
Posted by "Nitay Joffe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nitay Joffe updated GIRAPH-403:
-------------------------------
Attachment: GIRAPH-403-2.patch
sure, good idea
> GraphMapper.notiftySentMessages need to be thread-safe
> ------------------------------------------------------
>
> Key: GIRAPH-403
> URL: https://issues.apache.org/jira/browse/GIRAPH-403
> Project: Giraph
> Issue Type: Bug
> Reporter: Maja Kabiljo
> Assignee: Nitay Joffe
> Attachments: GIRAPH-403-2.patch, GIRAPH-403.patch
>
>
> GraphMapper.notifySentMessages() is not thread-safe. Here is the error I got:
> Caused by: java.lang.NullPointerException
> at org.apache.giraph.graph.GraphMapper.notifySentMessages(GraphMapper.java:454)
> at org.apache.giraph.graph.Vertex.sendMessage(Vertex.java:225)
> at org.apache.giraph.graph.Vertex.sendMessageToAllEdges(Vertex.java:266)
> at org.apache.giraph.benchmark.PageRankComputation.computePageRank(PageRankComputation.java:59)
> at org.apache.giraph.benchmark.EdgeListVertexPageRankBenchmark.compute(EdgeListVertexPageRankBenchmark.java:36)
> at org.apache.giraph.graph.ComputeCallable.computePartition(ComputeCallable.java:194)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:139)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:60)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GIRAPH-403) GraphMapper.notiftySentMessages
need to be thread-safe
Posted by "Maja Kabiljo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491171#comment-13491171 ]
Maja Kabiljo commented on GIRAPH-403:
-------------------------------------
This means we are synchronizing on every sendMessage call? How about checking whether it's null before synchronizing? Something like:
{code}
if (timeToFirstMessageContext != null) {
synchronized (notifySentMsgLock) {
if (timeToFirstMessageContext != null) {
...
}
}
}
{code}
> GraphMapper.notiftySentMessages need to be thread-safe
> ------------------------------------------------------
>
> Key: GIRAPH-403
> URL: https://issues.apache.org/jira/browse/GIRAPH-403
> Project: Giraph
> Issue Type: Bug
> Reporter: Maja Kabiljo
> Assignee: Nitay Joffe
> Attachments: GIRAPH-403.patch
>
>
> GraphMapper.notifySentMessages() is not thread-safe. Here is the error I got:
> Caused by: java.lang.NullPointerException
> at org.apache.giraph.graph.GraphMapper.notifySentMessages(GraphMapper.java:454)
> at org.apache.giraph.graph.Vertex.sendMessage(Vertex.java:225)
> at org.apache.giraph.graph.Vertex.sendMessageToAllEdges(Vertex.java:266)
> at org.apache.giraph.benchmark.PageRankComputation.computePageRank(PageRankComputation.java:59)
> at org.apache.giraph.benchmark.EdgeListVertexPageRankBenchmark.compute(EdgeListVertexPageRankBenchmark.java:36)
> at org.apache.giraph.graph.ComputeCallable.computePartition(ComputeCallable.java:194)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:139)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:60)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GIRAPH-403) GraphMapper.notiftySentMessages need
to be thread-safe
Posted by "Nitay Joffe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nitay Joffe updated GIRAPH-403:
-------------------------------
Attachment: GIRAPH-403.patch
Good catch Maja, my apologies. Here's proposed fix.
> GraphMapper.notiftySentMessages need to be thread-safe
> ------------------------------------------------------
>
> Key: GIRAPH-403
> URL: https://issues.apache.org/jira/browse/GIRAPH-403
> Project: Giraph
> Issue Type: Bug
> Reporter: Maja Kabiljo
> Assignee: Nitay Joffe
> Attachments: GIRAPH-403.patch
>
>
> GraphMapper.notifySentMessages() is not thread-safe. Here is the error I got:
> Caused by: java.lang.NullPointerException
> at org.apache.giraph.graph.GraphMapper.notifySentMessages(GraphMapper.java:454)
> at org.apache.giraph.graph.Vertex.sendMessage(Vertex.java:225)
> at org.apache.giraph.graph.Vertex.sendMessageToAllEdges(Vertex.java:266)
> at org.apache.giraph.benchmark.PageRankComputation.computePageRank(PageRankComputation.java:59)
> at org.apache.giraph.benchmark.EdgeListVertexPageRankBenchmark.compute(EdgeListVertexPageRankBenchmark.java:36)
> at org.apache.giraph.graph.ComputeCallable.computePartition(ComputeCallable.java:194)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:139)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:60)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GIRAPH-403) GraphMapper.notiftySentMessages
need to be thread-safe
Posted by "Avery Ching (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491219#comment-13491219 ]
Avery Ching commented on GIRAPH-403:
------------------------------------
INFO] There are 1 checkstyle errors.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Giraph Parent .............................. SUCCESS [0.141s]
[INFO] Apache Giraph ..................................... FAILURE [2:45.303s]
[INFO] Apache Giraph Formats ............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:45.643s
[INFO] Finished at: Tue Nov 06 04:55:50 UTC 2012
[INFO] Final Memory: 30M/326M
> GraphMapper.notiftySentMessages need to be thread-safe
> ------------------------------------------------------
>
> Key: GIRAPH-403
> URL: https://issues.apache.org/jira/browse/GIRAPH-403
> Project: Giraph
> Issue Type: Bug
> Reporter: Maja Kabiljo
> Assignee: Nitay Joffe
> Attachments: GIRAPH-403-2.patch, GIRAPH-403.patch
>
>
> GraphMapper.notifySentMessages() is not thread-safe. Here is the error I got:
> Caused by: java.lang.NullPointerException
> at org.apache.giraph.graph.GraphMapper.notifySentMessages(GraphMapper.java:454)
> at org.apache.giraph.graph.Vertex.sendMessage(Vertex.java:225)
> at org.apache.giraph.graph.Vertex.sendMessageToAllEdges(Vertex.java:266)
> at org.apache.giraph.benchmark.PageRankComputation.computePageRank(PageRankComputation.java:59)
> at org.apache.giraph.benchmark.EdgeListVertexPageRankBenchmark.compute(EdgeListVertexPageRankBenchmark.java:36)
> at org.apache.giraph.graph.ComputeCallable.computePartition(ComputeCallable.java:194)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:139)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:60)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GIRAPH-403) GraphMapper.notiftySentMessages
need to be thread-safe
Posted by "Nitay Joffe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491221#comment-13491221 ]
Nitay Joffe commented on GIRAPH-403:
------------------------------------
Yeah Maja and I are talking about this. Go ahead and add the tmp or checkstyle ignore Maja, the AtomicReference idea I had doesn't quite work. Thanks.
> GraphMapper.notiftySentMessages need to be thread-safe
> ------------------------------------------------------
>
> Key: GIRAPH-403
> URL: https://issues.apache.org/jira/browse/GIRAPH-403
> Project: Giraph
> Issue Type: Bug
> Reporter: Maja Kabiljo
> Assignee: Nitay Joffe
> Attachments: GIRAPH-403-2.patch, GIRAPH-403.patch
>
>
> GraphMapper.notifySentMessages() is not thread-safe. Here is the error I got:
> Caused by: java.lang.NullPointerException
> at org.apache.giraph.graph.GraphMapper.notifySentMessages(GraphMapper.java:454)
> at org.apache.giraph.graph.Vertex.sendMessage(Vertex.java:225)
> at org.apache.giraph.graph.Vertex.sendMessageToAllEdges(Vertex.java:266)
> at org.apache.giraph.benchmark.PageRankComputation.computePageRank(PageRankComputation.java:59)
> at org.apache.giraph.benchmark.EdgeListVertexPageRankBenchmark.compute(EdgeListVertexPageRankBenchmark.java:36)
> at org.apache.giraph.graph.ComputeCallable.computePartition(ComputeCallable.java:194)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:139)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:60)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GIRAPH-403) GraphMapper.notiftySentMessages
need to be thread-safe
Posted by "Maja Kabiljo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491210#comment-13491210 ]
Maja Kabiljo commented on GIRAPH-403:
-------------------------------------
+1, comitting.
Nitay, can you please also take a quick look through the rest of metrics stuff, just to make sure everything that should be thread-safe is?
> GraphMapper.notiftySentMessages need to be thread-safe
> ------------------------------------------------------
>
> Key: GIRAPH-403
> URL: https://issues.apache.org/jira/browse/GIRAPH-403
> Project: Giraph
> Issue Type: Bug
> Reporter: Maja Kabiljo
> Assignee: Nitay Joffe
> Attachments: GIRAPH-403-2.patch, GIRAPH-403.patch
>
>
> GraphMapper.notifySentMessages() is not thread-safe. Here is the error I got:
> Caused by: java.lang.NullPointerException
> at org.apache.giraph.graph.GraphMapper.notifySentMessages(GraphMapper.java:454)
> at org.apache.giraph.graph.Vertex.sendMessage(Vertex.java:225)
> at org.apache.giraph.graph.Vertex.sendMessageToAllEdges(Vertex.java:266)
> at org.apache.giraph.benchmark.PageRankComputation.computePageRank(PageRankComputation.java:59)
> at org.apache.giraph.benchmark.EdgeListVertexPageRankBenchmark.compute(EdgeListVertexPageRankBenchmark.java:36)
> at org.apache.giraph.graph.ComputeCallable.computePartition(ComputeCallable.java:194)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:139)
> at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:60)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira