Return-Path: X-Original-To: apmail-flex-issues-archive@minotaur.apache.org Delivered-To: apmail-flex-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6FD0411D30 for ; Mon, 22 Sep 2014 19:45:34 +0000 (UTC) Received: (qmail 20718 invoked by uid 500); 22 Sep 2014 19:45:34 -0000 Delivered-To: apmail-flex-issues-archive@flex.apache.org Received: (qmail 20596 invoked by uid 500); 22 Sep 2014 19:45:34 -0000 Mailing-List: contact issues-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list issues@flex.apache.org Received: (qmail 20438 invoked by uid 99); 22 Sep 2014 19:45:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Sep 2014 19:45:34 +0000 Date: Mon, 22 Sep 2014 19:45:34 +0000 (UTC) From: "Xavier Fournet (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (FLEX-34553) flex2.compiler.util.MultiName is not thread safe causing problem in case of parallel compilation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Xavier Fournet created FLEX-34553: ------------------------------------- Summary: flex2.compiler.util.MultiName is not thread safe causing problem in case of parallel compilation Key: FLEX-34553 URL: https://issues.apache.org/jira/browse/FLEX-34553 Project: Apache Flex Issue Type: Bug Components: MXML Compiler Reporter: Xavier Fournet Intellij IDEA includes a feature that permits to compile many Flex project in parallel. In some situations the compilation threads are stucks in the MultiName class when querying the internal cache of MultiName. See the following stack trace {noformat} "Thread-33" daemon prio=10 tid=0x000000000a649000 nid=0x2514 runnable [0x000000000925e000] java.lang.Thread.State: RUNNABLE at java.util.HashMap.get(HashMap.java:303) at flex2.compiler.util.MultiName.(MultiName.java:48) at flex2.compiler.CompilerSwcContext.createSource(CompilerSwcContext.java:381) at flex2.compiler.CompilerSwcContext.getSource(CompilerSwcContext.java:337) at flex2.compiler.API.findDefinition(API.java:2706) at flex2.compiler.API.resolveMultiName(API.java:3371) at flex2.compiler.API.getIncludeClasses(API.java:3638) at flex2.compiler.API.compile(API.java:1317) at flex2.compiler.API.compile(API.java:1213) at flex2.tools.Compiler.mxmlc(Compiler.java:275) at com.intellij.flex.compiler.flex3.Flex3Handler.compileSwf(Flex3Handler.java:20) at com.intellij.flex.compiler.CompilationThread.run(CompilationThread.java:48) Locked ownable synchronizers: - None "Thread-31" daemon prio=10 tid=0x000000000a64a800 nid=0x2f28 runnable [0x000000000915e000] java.lang.Thread.State: RUNNABLE at java.util.HashMap.get(HashMap.java:303) at flex2.compiler.util.MultiName.(MultiName.java:48) at flex2.compiler.CompilerSwcContext.createSource(CompilerSwcContext.java:381) at flex2.compiler.CompilerSwcContext.getSource(CompilerSwcContext.java:337) at flex2.compiler.API.findDefinition(API.java:2706) at flex2.compiler.API.resolveMultiName(API.java:3371) at flex2.compiler.API.getIncludeClasses(API.java:3638) at flex2.compiler.API.compile(API.java:1317) at flex2.compiler.API.compile(API.java:1213) at flex2.tools.Compiler.mxmlc(Compiler.java:275) at com.intellij.flex.compiler.flex3.Flex3Handler.compileSwf(Flex3Handler.java:20) at com.intellij.flex.compiler.CompilationThread.run(CompilationThread.java:48) Locked ownable synchronizers: - None "Thread-29" daemon prio=10 tid=0x000000000ab71000 nid=0x383c runnable [0x000000000c6ce000] java.lang.Thread.State: RUNNABLE at java.util.HashMap.get(HashMap.java:303) at flex2.compiler.util.MultiName.(MultiName.java:48) at flex2.compiler.CompilerSwcContext.createSource(CompilerSwcContext.java:381) at flex2.compiler.CompilerSwcContext.getSource(CompilerSwcContext.java:337) at flex2.compiler.API.findDefinition(API.java:2706) at flex2.compiler.API.resolveMultiName(API.java:3371) at flex2.compiler.API.resolveInheritance(API.java:2611) at flex2.compiler.API.batch2(API.java:373) at flex2.compiler.API.batch(API.java:1120) at flex2.compiler.API.compile(API.java:1311) at flex2.compiler.API.compile(API.java:1213) at flex2.tools.Compc.compc(Compc.java:262) at com.intellij.flex.compiler.flex3.Flex3Handler.compileSwc(Flex3Handler.java:25) at com.intellij.flex.compiler.CompilationThread.run(CompilationThread.java:51) Locked ownable synchronizers: - None "Thread-27" daemon prio=10 tid=0x000000000a648800 nid=0xfa4 runnable [0x000000000945f000] java.lang.Thread.State: RUNNABLE at java.util.HashMap.get(HashMap.java:303) at flex2.compiler.util.MultiName.(MultiName.java:48) at flex2.compiler.API.getIncludeClasses(API.java:3637) at flex2.compiler.API.compile(API.java:1317) at flex2.compiler.API.compile(API.java:1213) at flex2.tools.Compiler.mxmlc(Compiler.java:275) at com.intellij.flex.compiler.flex3.Flex3Handler.compileSwf(Flex3Handler.java:20) at com.intellij.flex.compiler.CompilationThread.run(CompilationThread.java:48) Locked ownable synchronizers: - None {noformat} The cache is an HashMap that can be corrupted when many put operations are done in parallel on it. I successfully patch the class to avoid this problem with Flex 3 compiler. For more information see http://youtrack.jetbrains.com/issue/IDEA-130128 -- This message was sent by Atlassian JIRA (v6.3.4#6332)