Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 12359 invoked from network); 6 Oct 2010 21:30:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Oct 2010 21:30:55 -0000 Received: (qmail 56804 invoked by uid 500); 6 Oct 2010 21:30:55 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 56575 invoked by uid 500); 6 Oct 2010 21:30:55 -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 56567 invoked by uid 99); 6 Oct 2010 21:30:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Oct 2010 21:30:55 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Oct 2010 21:30:52 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o96LUUdU014655 for ; Wed, 6 Oct 2010 21:30:31 GMT Message-ID: <26614067.15371286400630632.JavaMail.jira@thor> Date: Wed, 6 Oct 2010 17:30:30 -0400 (EDT) From: "Richard S. Hall (JIRA)" To: dev@felix.apache.org Subject: [jira] Commented: (FELIX-2434) DispatchQueue, StartLevel and PacakageAdmin threads holding VM up. In-Reply-To: <16097320.109841277127682849.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-2434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918694#action_12918694 ] Richard S. Hall commented on FELIX-2434: ---------------------------------------- You can't set the Event Dispatcher thread to daemon, because it is the only non-daemon thread created when the framework starts so the VM couldn't stay up otherwise. It will get stopped when the last framework instance is stopped. Are you sure you aren't experiencing a deadlock? Could you try this on a more recent version of the framework...at least 3.0.2, but 3.0.3 had some locking changes, but there was another bug in that so we have a 3.0.4 release under vote right now so you could also grab that from the staging repo or wait until Thursday when it is released. If this is even remotely reproducible, let me know the precise steps to reproduce and I can check into it, but try a new version of the framework first...the latest should be a drop-in replacement for 2.0.5. > DispatchQueue, StartLevel and PacakageAdmin threads holding VM up. > ------------------------------------------------------------------ > > Key: FELIX-2434 > URL: https://issues.apache.org/jira/browse/FELIX-2434 > Project: Felix > Issue Type: Bug > Components: Framework > Affects Versions: framework-2.0.5 > Environment: Linux (RHEL 4 32Bit), java 1.6 server vm (14-b08) > Linux (RHEL 5 32bit & 64Bit) java 1.6 server vm (13) > Reporter: Martin Ritchie > Attachments: FELIX-EventDispatcher-setDaemon.patch > > > Hi, In Qpid we started using Felix more for managing our broker plugins. However we are having random lockups occur during our test broker shutdown. > Our PluginManager (https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java) is shutdown via a VM ShutdownHook where it closes Service Trackers and then calls stop() on Felix followed by a waitForStop(). > We are frequently seeing the following three Felix threads in a WAITING state that could be holding the VM up. Looking at the 2.0.5 code the EventDispatcher does not use a Daemon thread could this be what is holding our VM open? > Name: FelixDispatchQueue > State: WAITING on java.util.ArrayList@dc904a > Total blocked: 21 Total waited: 22 > Stack trace: > java.lang.Object.wait(Native Method) > java.lang.Object.wait(Object.java:485) > org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:917) > org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54) > org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106) > java.lang.Thread.run(Thread.java:619) > Name: FelixStartLevel > State: WAITING on java.util.ArrayList@1c68b20 > Total blocked: 7 Total waited: 8 > Stack trace: > java.lang.Object.wait(Native Method) > java.lang.Object.wait(Object.java:485) > org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:242) > java.lang.Thread.run(Thread.java:619) > Name: FelixPackageAdmin > State: WAITING on org.apache.felix.framework.PackageAdminImpl@1d4ab05 > Total blocked: 0 Total waited: 1 > Stack trace: > java.lang.Object.wait(Native Method) > java.lang.Object.wait(Object.java:485) > org.apache.felix.framework.PackageAdminImpl.run(PackageAdminImpl.java:316) > java.lang.Thread.run(Thread.java:619) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.