Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 52827 invoked from network); 16 May 2008 08:59:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 May 2008 08:59:07 -0000 Received: (qmail 7671 invoked by uid 500); 16 May 2008 08:59:09 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 7653 invoked by uid 500); 16 May 2008 08:59:09 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 7642 invoked by uid 99); 16 May 2008 08:59:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 May 2008 01:59:09 -0700 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 May 2008 08:58:23 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C4646234C114 for ; Fri, 16 May 2008 01:58:43 -0700 (PDT) Message-ID: <1127141574.1210928323803.JavaMail.jira@brutus> Date: Fri, 16 May 2008 01:58:43 -0700 (PDT) From: "Gary Tully (JIRA)" To: dev@activemq.apache.org Subject: [jira] Closed: (AMQ-1727) java.lang.IllegalStateException: Timer already cancelled caused by Exception in thread "ActiveMQ Scheduler" java.util.ConcurrentModificationException and In-Reply-To: <162230107.1210770223482.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-1727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Tully closed AMQ-1727. --------------------------- > java.lang.IllegalStateException: Timer already cancelled caused by Exception in thread "ActiveMQ Scheduler" java.util.ConcurrentModificationException and > ---------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: AMQ-1727 > URL: https://issues.apache.org/activemq/browse/AMQ-1727 > Project: ActiveMQ > Issue Type: Bug > Components: Message Store > Affects Versions: 5.1.0 > Reporter: Gary Tully > Assignee: Rob Davies > Fix For: 5.2.0 > > Attachments: AMQ-1727.patch > > > stack trace causes timer thread to abort: > Exception in thread "ActiveMQ Scheduler" java.util.ConcurrentModificationException > at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841) > at java.util.HashMap$KeyIterator.next(HashMap.java:877) > at java.util.AbstractSet.removeAll(AbstractSet.java:143) > at org.apache.activemq.kaha.impl.async.AsyncDataManager.consolidateDataFilesNotIn(AsyncDataManager.java:404) > at org.apache.activemq.store.amq.AMQPersistenceAdapter.cleanup(AMQPersistenceAdapter.java:415) > at org.apache.activemq.store.amq.AMQPersistenceAdapter$3.run(AMQPersistenceAdapter.java:267) > at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33) > at java.util.TimerThread.mainLoop(Timer.java:512) > at java.util.TimerThread.run(Timer.java:462) > subsequent timer enqueue fails with: > java.lang.IllegalStateException: Timer already cancelled. > at java.util.Timer.sched(Timer.java:354) > at java.util.Timer.scheduleAtFixedRate(Timer.java:296) > at org.apache.activemq.thread.Scheduler.executePeriodically(Scheduler.java:38) > at org.apache.activemq.kaha.impl.async.AsyncDataManager.start(AsyncDataManager.java:190) > at org.apache.activemq.store.amq.AMQPersistenceAdapter.start(AMQPersistenceAdapter.java:207) > at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerService.java:1597) > at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.java:1550) > at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java:560) > at org.apache.activemq.broker.BrokerService.start(BrokerService.java:455) > Problem identified in this diff, the inUse set needs to be copied as it may be modified in parallel to the cleanup. > Index: activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java > =================================================================== > --- activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java (revision 655936) > +++ activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java (working copy) > @@ -411,7 +411,7 @@ > } > Integer lastDataFile = asyncDataManager.getCurrentDataFileId(); > inProgress.add(lastDataFile); > - Set inUse = referenceStoreAdapter.getReferenceFileIdsInUse(); > + Set inUse = new HashSet(referenceStoreAdapter.getReferenceFileIdsInUse()); > asyncDataManager.consolidateDataFilesNotIn(inUse, inProgress); > } catch (IOException e) { > LOG.error("Could not cleanup data files: " + e, e); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.