Return-Path: Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: (qmail 58516 invoked from network); 23 Jan 2011 21:15:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Jan 2011 21:15:05 -0000 Received: (qmail 1375 invoked by uid 500); 23 Jan 2011 21:15:05 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 1327 invoked by uid 500); 23 Jan 2011 21:15:05 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 1319 invoked by uid 99); 23 Jan 2011 21:15:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Jan 2011 21:15:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Jan 2011 21:15:04 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0NLEhCP027532 for ; Sun, 23 Jan 2011 21:14:43 GMT Message-ID: <30252315.139591295817283534.JavaMail.jira@thor> Date: Sun, 23 Jan 2011 16:14:43 -0500 (EST) From: "Erik Onnen (JIRA)" To: commits@cassandra.apache.org Subject: [jira] Commented: (CASSANDRA-2037) Unsafe Multimap Access in MessagingService In-Reply-To: <18328987.139031295814163676.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-2037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985416#action_12985416 ] Erik Onnen commented on CASSANDRA-2037: --------------------------------------- Looks like this was fixed in trunk w/ 1057935 > Unsafe Multimap Access in MessagingService > ------------------------------------------ > > Key: CASSANDRA-2037 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2037 > Project: Cassandra > Issue Type: Bug > Components: Core > Affects Versions: 0.7.0 > Reporter: Erik Onnen > Priority: Critical > > MessagingSerice is a system singleton with a static Multimap field targets. Multimaps are not thread safe but no attempt is made to synchronize access to that field. Multimap ultimately uses the standard java HashMap which is susceptible to a race condition where threads will get stuck during a get operation yielding multiple threads similar to the following stack: > "pool-1-thread-6451" prio=10 tid=0x00007fa5242c9000 nid=0x10f4 runnable [0x00007fa52fde4000] > java.lang.Thread.State: RUNNABLE > at java.util.HashMap.get(HashMap.java:303) > at com.google.common.collect.AbstractMultimap.getOrCreateCollection(AbstractMultimap.java:205) > at com.google.common.collect.AbstractMultimap.put(AbstractMultimap.java:194) > at com.google.common.collect.AbstractListMultimap.put(AbstractListMultimap.java:72) > at com.google.common.collect.ArrayListMultimap.put(ArrayListMultimap.java:60) > at org.apache.cassandra.net.MessagingService.sendRR(MessagingService.java:303) > at org.apache.cassandra.service.StorageProxy.strongRead(StorageProxy.java:353) > at org.apache.cassandra.service.StorageProxy.readProtocol(StorageProxy.java:229) > at org.apache.cassandra.thrift.CassandraServer.readColumnFamily(CassandraServer.java:98) > at org.apache.cassandra.thrift.CassandraServer.get(CassandraServer.java:289) > at org.apache.cassandra.thrift.Cassandra$Processor$get.process(Cassandra.java:2655) > at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555) > at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.