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 3C4799773 for ; Mon, 17 Oct 2011 05:52:38 +0000 (UTC) Received: (qmail 8176 invoked by uid 500); 17 Oct 2011 05:52:36 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 8126 invoked by uid 500); 17 Oct 2011 05:52:36 -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 7481 invoked by uid 99); 17 Oct 2011 05:52:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 05:52:33 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Oct 2011 05:52:32 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D15F030B572 for ; Mon, 17 Oct 2011 05:52:11 +0000 (UTC) Date: Mon, 17 Oct 2011 05:52:11 +0000 (UTC) From: "Rob Walker (Commented) (JIRA)" To: dev@felix.apache.org Message-ID: <1649153624.19689.1318830731859.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1818737061.5007.1318426511815.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (FELIX-3160) NPE in BundleRevisionImpl.close() when uninstalling a bundle MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-3160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128684#comment-13128684 ] Rob Walker commented on FELIX-3160: ----------------------------------- Sounds like there must be some other obscure factor at work here. Will try and assess what else is different in our setup and see if I can recreate with your bundle above. > NPE in BundleRevisionImpl.close() when uninstalling a bundle > ------------------------------------------------------------ > > Key: FELIX-3160 > URL: https://issues.apache.org/jira/browse/FELIX-3160 > Project: Felix > Issue Type: Bug > Components: Framework > Affects Versions: framework-4.0.0 > Reporter: Rob Walker > Assignee: Rob Walker > Priority: Minor > Fix For: framework-4.2.0 > > > There seems to be a case where m_content can be null when uninstalling a bundle, causing the following code to throw an NPE: > synchronized void close() > { > try > { > resolve(null); > } > catch (Exception ex) > { > ((BundleImpl) m_bundle).getFramework().getLogger().log( > Logger.LOG_ERROR, "Error releasing revision: " + ex.getMessage(), ex); > } > > m_content.close(); > I've added a simple check for null around the close in my version to avoid the exception, which I'll check in. > I'm not sure of the scenarios where this can legally be null at this point, and whether there's some nastier underlying circumstance that needs investigating. We see it under the following circumstances: > * we register a listener that looks for framework STARTED > * when triggered, this iterates all bundles and performs an uninstall on ones which we determine are zombies leftover from a previous run > Aside from the fact we're calling uninstall from inside an event handling method, there doesn't anything else unusual about this code. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira