Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 76D3C10857 for ; Wed, 19 Mar 2014 16:13:53 +0000 (UTC) Received: (qmail 18952 invoked by uid 500); 19 Mar 2014 16:13:52 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 17414 invoked by uid 500); 19 Mar 2014 16:13:45 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 17247 invoked by uid 99); 19 Mar 2014 16:13:43 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2014 16:13:43 +0000 Date: Wed, 19 Mar 2014 16:13:43 +0000 (UTC) From: =?utf-8?Q?Florian_M=C3=BCller_=28JIRA=29?= To: dev@chemistry.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CMIS-769) CacheImpl is not thread safe (org.apache.chemistry.opencmis.client.bindings.cache.impl.CacheImpl) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CMIS-769?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Florian M=C3=BCller resolved CMIS-769. --------------------------------- Resolution: Fixed Fix Version/s: OpenCMIS 0.11.0 Thanks for the report. > CacheImpl is not thread safe (org.apache.chemistry.opencmis.client.bindin= gs.cache.impl.CacheImpl) > -------------------------------------------------------------------------= ------------------------ > > Key: CMIS-769 > URL: https://issues.apache.org/jira/browse/CMIS-769 > Project: Chemistry > Issue Type: Bug > Components: opencmis-client > Affects Versions: OpenCMIS 0.10.0 > Reporter: Trask Stalnaker > Assignee: Florian M=C3=BCller > Fix For: OpenCMIS 0.11.0 > > > We ended up with a thread stuck in an infinite loop at: > java.lang.Thread.State: RUNNABLE > java.util.LinkedHashMap.transfer(Unknown Source) > java.util.HashMap.resize(Unknown Source) > java.util.LinkedHashMap.addEntry(Unknown Source) > java.util.HashMap.put(Unknown Source) > org.apache.chemistry.opencmis.client.bindings.cache.impl.AbstractMapCache= Level.put(AbstractMapCacheLevel.java:56) > org.apache.chemistry.opencmis.client.bindings.cache.impl.CacheImpl.put(Ca= cheImpl.java:191) > org.apache.chemistry.opencmis.client.bindings.spi.atompub.LinkCache.addLi= nk(LinkCache.java:133) > The issue seems to be that CacheImpl is using an access-ordered LinkedHas= hMap via LruCacheLevelImpl, and CacheImpl is using a ReentrantReadWriteLock= to synchronize access to the LinkedHashMap, allowing multiple concurrent r= eaders, which is ok for HashMap, but is not ok for an access-ordered Linked= HashMap, see the bolded sentence at http://docs.oracle.com/javase/7/docs/ap= i/java/util/LinkedHashMap.html: > "In access-ordered linked hash maps, merely querying the map with get is = a structural modification." -- This message was sent by Atlassian JIRA (v6.2#6252)