Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-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 04FE917818 for ; Tue, 3 Feb 2015 09:24:14 +0000 (UTC) Received: (qmail 69395 invoked by uid 500); 3 Feb 2015 09:17:35 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 69165 invoked by uid 500); 3 Feb 2015 09:17:35 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 68955 invoked by uid 99); 3 Feb 2015 09:17:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Feb 2015 09:17:34 +0000 Date: Tue, 3 Feb 2015 09:17:34 +0000 (UTC) From: "Christian Schneider (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (FELIX-4783) ConcurrentModificationException when stopping MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Christian Schneider created FELIX-4783: ------------------------------------------ Summary: ConcurrentModificationException when stopping Key: FELIX-4783 URL: https://issues.apache.org/jira/browse/FELIX-4783 Project: Felix Issue Type: Bug Components: Gogo Runtime Reporter: Christian Schneider The exception below happens in the karaf itests but originates in felix. The problem is in org.apache.felix.gogo.runtime.CommandProcessorImpl.stop . It iterates over the sessions in a foreach loop and removes the session during the iteration. I propose to do the remove at the end in one clear call. This should go into gogo runtime 0.14.1. Unfortunately there is no version for it in jira. 14:31:55,602 | ERROR | Felix | Error stopping bundle. java.util.ConcurrentModificationException at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:882)[:1.7.0_60] at java.util.WeakHashMap$KeyIterator.next(WeakHashMap.java:915)[:1.7.0_60] at org.apache.felix.gogo.runtime.CommandProcessorImpl.stop(CommandProcessorImpl.java:87)[42:org.apache.karaf.shell.core:4.0.0.SNAPSHOT] at org.apache.karaf.shell.impl.console.SessionFactoryImpl.stop(SessionFactoryImpl.java:139)[42:org.apache.karaf.shell.core:4.0.0.SNAPSHOT] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredSessionFactoryImpl.stop(SecuredSessionFactoryImpl.java:76)[42:org.apache.karaf.shell.core:4.0.0.SNAPSHOT] at org.apache.karaf.shell.impl.console.osgi.Activator.stop(Activator.java:88)[42:org.apache.karaf.shell.core:4.0.0.SNAPSHOT] at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:667)[org.apache.felix.framework-4.4.1.jar:] at org.apache.felix.framework.Felix.stopBundle(Felix.java:2538)[org.apache.felix.framework-4.4.1.jar:] at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1317)[org.apache.felix.framework-4.4.1.jar:] at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.framework-4.4.1.jar:] at java.lang.Thread.run(Thread.java:745)[:1.7.0_60] -- This message was sent by Atlassian JIRA (v6.3.4#6332)