giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maja Kabiljo (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GIRAPH-403) GraphMapper.notiftySentMessages need to be thread-safe
Date Tue, 06 Nov 2012 03:14:13 GMT

    [ 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

Mime
View raw message