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 81D211047B for ; Thu, 20 Nov 2014 16:46:35 +0000 (UTC) Received: (qmail 1347 invoked by uid 500); 20 Nov 2014 16:46:35 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 1284 invoked by uid 500); 20 Nov 2014 16:46:35 -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 1271 invoked by uid 99); 20 Nov 2014 16:46:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2014 16:46:35 +0000 Date: Thu, 20 Nov 2014 16:46:35 +0000 (UTC) From: "jay brown (JIRA)" To: dev@chemistry.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CMIS-868) OOM issue when run concurrent test on GetDescendant, GetTypeFlat, GetTypeTree. 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-868?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D142195= 74#comment-14219574 ]=20 jay brown commented on CMIS-868: -------------------------------- Thanks Florian! > OOM issue when run concurrent test on GetDescendant, GetTypeFlat, GetType= Tree. > -------------------------------------------------------------------------= ----- > > Key: CMIS-868 > URL: https://issues.apache.org/jira/browse/CMIS-868 > Project: Chemistry > Issue Type: Bug > Components: opencmis-client > Affects Versions: OpenCMIS 0.12.0 > Environment: AIX 7.1+Websphere ND 8.5.5.3 > Java(TM) SE Runtime Environment (build pap6460_26sr2ifix-20120419_02(SR2+= IV19661)) > IBM J9 VM (build 2.6, JRE 1.6.0 AIX ppc64-64 20120322_106210 (JIT enabled= , AOT enabled) > J9VM - R26_Java626_SR2_20120322_1722_B106210 > JIT - r11_20120322_22976 > GC - R26_Java626_SR2_20120322_1722_B106210 > J9CL - 20120322_106210) > JCL - 20120316_01 > Reporter: Yi Wang > Assignee: Florian M=C3=BCller > Priority: Critical > Fix For: OpenCMIS 0.13.0 > > Attachments: heapdump.20141111.151212.10223668.0002.zip.001, heap= dump.20141111.151212.10223668.0002.zip.002, heapdump.20141111.151212.102236= 68.0002.zip.003, heapdump.20141111.151212.10223668.0002.zip.004, javacore.2= 0141111.151212.10223668.0003.txt > > > When I run concurrent test with 100 threads on GetDescendants, GetTypeTre= e, GetTypeFlat function. > I found there are many hashtable objects(>500MB) saved in heap after anal= yzed heap dump. I found there was one line(red line below) in convertTypeDe= finition method that chemistry used typeDefinition object as the key of Has= hMap. However, JAVA does not think 2 typeDefinition objects are same object= s although the value of typeDefinition members are same. I debug to this li= ne, the "result" variable always was "null". It made the objectTypecache la= rger and larger when run concurrent test. > private ObjectType convertTypeDefinition(TypeDefinition typeDefinition) = { > lock.writeLock().lock(); > try { > ObjectType result =3D null; > if (objectTypeCache =3D=3D null) { > objectTypeCache =3D new IdentityHashMap(); > } else { > result =3D objectTypeCache.get(typeDefinition); > } > if (result =3D=3D null) { > result =3D objectFactory.convertTypeDefinition(typeDefini= tion); > objectTypeCache.put(typeDefinition, result); > } > return result; > } finally { > lock.writeLock().unlock(); > } > } -- This message was sent by Atlassian JIRA (v6.3.4#6332)