You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2008/10/15 08:11:44 UTC

[jira] Created: (FELIX-768) NullPointerException during resolveBundles

NullPointerException during resolveBundles
------------------------------------------

                 Key: FELIX-768
                 URL: https://issues.apache.org/jira/browse/FELIX-768
             Project: Felix
          Issue Type: Bug
          Components: Framework
    Affects Versions: felix-1.2.1

            Reporter: Carsten Ziegeler


we are experiencing very sporadic NPEs with 1.2.1 in the Felix class
(see stack trace below). This happens during a series of bundle installs
and starts (intercepted by resolveBundles and refreshPackages) calls.
While our implementation is not optimal (which we fixed now), it seems
that this is a very rare race condition.

java.lang.NullPointerException
	at org.apache.felix.framework.Felix.releaseBundleLock(Felix.java:4180)
	at org.apache.felix.framework.Felix$2.moduleResolved(Felix.java:674)
	at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.fireModuleResolved(R4SearchPolicyCore.java:2845)
	at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.resolve(R4SearchPolicyCore.java:1130)
	at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1719)
	at org.apache.felix.framework.Felix.resolveBundles(Felix.java:3169)
	at
org.apache.felix.framework.PackageAdminImpl.resolveBundles(PackageAdminImpl.java:288)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-768) NullPointerException during resolveBundles

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648889#action_12648889 ] 

Richard S. Hall commented on FELIX-768:
---------------------------------------

My gut feeling is that this is a concurrent visibility issue when accessing the BundleInfo object associated with a Bundle. I believe we need to make access to the BundleInfo either synchronized or volatile. I will look into it some more.

> NullPointerException during resolveBundles
> ------------------------------------------
>
>                 Key: FELIX-768
>                 URL: https://issues.apache.org/jira/browse/FELIX-768
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.2.1

>            Reporter: Carsten Ziegeler
>         Attachments: log.txt
>
>
> we are experiencing very sporadic NPEs with 1.2.1 in the Felix class
> (see stack trace below). This happens during a series of bundle installs
> and starts (intercepted by resolveBundles and refreshPackages) calls.
> While our implementation is not optimal (which we fixed now), it seems
> that this is a very rare race condition.
> java.lang.NullPointerException
> 	at org.apache.felix.framework.Felix.releaseBundleLock(Felix.java:4180)
> 	at org.apache.felix.framework.Felix$2.moduleResolved(Felix.java:674)
> 	at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.fireModuleResolved(R4SearchPolicyCore.java:2845)
> 	at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.resolve(R4SearchPolicyCore.java:1130)
> 	at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1719)
> 	at org.apache.felix.framework.Felix.resolveBundles(Felix.java:3169)
> 	at
> org.apache.felix.framework.PackageAdminImpl.resolveBundles(PackageAdminImpl.java:288)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-768) NullPointerException during resolveBundles

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656630#action_12656630 ] 

Richard S. Hall commented on FELIX-768:
---------------------------------------

FELIX-822 seems to reproduce it, so let's just keep it open for now.

> NullPointerException during resolveBundles
> ------------------------------------------
>
>                 Key: FELIX-768
>                 URL: https://issues.apache.org/jira/browse/FELIX-768
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.2.1

>            Reporter: Carsten Ziegeler
>         Attachments: log.txt
>
>
> we are experiencing very sporadic NPEs with 1.2.1 in the Felix class
> (see stack trace below). This happens during a series of bundle installs
> and starts (intercepted by resolveBundles and refreshPackages) calls.
> While our implementation is not optimal (which we fixed now), it seems
> that this is a very rare race condition.
> java.lang.NullPointerException
> 	at org.apache.felix.framework.Felix.releaseBundleLock(Felix.java:4180)
> 	at org.apache.felix.framework.Felix$2.moduleResolved(Felix.java:674)
> 	at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.fireModuleResolved(R4SearchPolicyCore.java:2845)
> 	at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.resolve(R4SearchPolicyCore.java:1130)
> 	at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1719)
> 	at org.apache.felix.framework.Felix.resolveBundles(Felix.java:3169)
> 	at
> org.apache.felix.framework.PackageAdminImpl.resolveBundles(PackageAdminImpl.java:288)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-768) NullPointerException during resolveBundles

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler updated FELIX-768:
-----------------------------------

    Attachment: log.txt

> NullPointerException during resolveBundles
> ------------------------------------------
>
>                 Key: FELIX-768
>                 URL: https://issues.apache.org/jira/browse/FELIX-768
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.2.1

>            Reporter: Carsten Ziegeler
>         Attachments: log.txt
>
>
> we are experiencing very sporadic NPEs with 1.2.1 in the Felix class
> (see stack trace below). This happens during a series of bundle installs
> and starts (intercepted by resolveBundles and refreshPackages) calls.
> While our implementation is not optimal (which we fixed now), it seems
> that this is a very rare race condition.
> java.lang.NullPointerException
> 	at org.apache.felix.framework.Felix.releaseBundleLock(Felix.java:4180)
> 	at org.apache.felix.framework.Felix$2.moduleResolved(Felix.java:674)
> 	at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.fireModuleResolved(R4SearchPolicyCore.java:2845)
> 	at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.resolve(R4SearchPolicyCore.java:1130)
> 	at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1719)
> 	at org.apache.felix.framework.Felix.resolveBundles(Felix.java:3169)
> 	at
> org.apache.felix.framework.PackageAdminImpl.resolveBundles(PackageAdminImpl.java:288)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-768) NullPointerException during resolveBundles

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639739#action_12639739 ] 

Carsten Ziegeler commented on FELIX-768:
----------------------------------------

Attached is a shortened log of what happens with respect to the framework, before the NPE occurs. There is a series of bundle
installs, refreshs etc. (as explained we optimized our code already). Inbetween SCR kicks in and starts services.
Although this race condition happens very rarely we have at least two logs which indicate that this problem is not tied to a specific bundle
as in the two cases the exception happened at different locations

> NullPointerException during resolveBundles
> ------------------------------------------
>
>                 Key: FELIX-768
>                 URL: https://issues.apache.org/jira/browse/FELIX-768
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.2.1

>            Reporter: Carsten Ziegeler
>         Attachments: log.txt
>
>
> we are experiencing very sporadic NPEs with 1.2.1 in the Felix class
> (see stack trace below). This happens during a series of bundle installs
> and starts (intercepted by resolveBundles and refreshPackages) calls.
> While our implementation is not optimal (which we fixed now), it seems
> that this is a very rare race condition.
> java.lang.NullPointerException
> 	at org.apache.felix.framework.Felix.releaseBundleLock(Felix.java:4180)
> 	at org.apache.felix.framework.Felix$2.moduleResolved(Felix.java:674)
> 	at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.fireModuleResolved(R4SearchPolicyCore.java:2845)
> 	at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.resolve(R4SearchPolicyCore.java:1130)
> 	at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1719)
> 	at org.apache.felix.framework.Felix.resolveBundles(Felix.java:3169)
> 	at
> org.apache.felix.framework.PackageAdminImpl.resolveBundles(PackageAdminImpl.java:288)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-768) NullPointerException during resolveBundles

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656566#action_12656566 ] 

Carsten Ziegeler commented on FELIX-768:
----------------------------------------

Unfortunately I don't get this reproduced atm - our code changed dramatically in the meantime.
So, maybe we should close this bug as "can't reproduce" and come back to it *if* it occurs again?

> NullPointerException during resolveBundles
> ------------------------------------------
>
>                 Key: FELIX-768
>                 URL: https://issues.apache.org/jira/browse/FELIX-768
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.2.1

>            Reporter: Carsten Ziegeler
>         Attachments: log.txt
>
>
> we are experiencing very sporadic NPEs with 1.2.1 in the Felix class
> (see stack trace below). This happens during a series of bundle installs
> and starts (intercepted by resolveBundles and refreshPackages) calls.
> While our implementation is not optimal (which we fixed now), it seems
> that this is a very rare race condition.
> java.lang.NullPointerException
> 	at org.apache.felix.framework.Felix.releaseBundleLock(Felix.java:4180)
> 	at org.apache.felix.framework.Felix$2.moduleResolved(Felix.java:674)
> 	at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.fireModuleResolved(R4SearchPolicyCore.java:2845)
> 	at
> org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.resolve(R4SearchPolicyCore.java:1130)
> 	at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1719)
> 	at org.apache.felix.framework.Felix.resolveBundles(Felix.java:3169)
> 	at
> org.apache.felix.framework.PackageAdminImpl.resolveBundles(PackageAdminImpl.java:288)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.