felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Berger (JIRA)" <j...@apache.org>
Subject [jira] Closed: (FELIX-2378) Deadlock in Felix Shell implementation
Date Tue, 01 Jun 2010 15:18:39 GMT

     [ https://issues.apache.org/jira/browse/FELIX-2378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexander Berger closed FELIX-2378.
-----------------------------------


Ok. Works perfectly now, no deadlocks anymore :-)

Thank you very much for the quick bugfix.


> Deadlock in Felix Shell implementation
> --------------------------------------
>
>                 Key: FELIX-2378
>                 URL: https://issues.apache.org/jira/browse/FELIX-2378
>             Project: Felix
>          Issue Type: Bug
>          Components: Shell
>    Affects Versions: shell-1.4.2
>         Environment: Felix Framework Version 2.0.5
> SunOS castor 5.10 Generic_138888-06 sun4u sparc SUNW,Sun-Fire-V890
> java version "1.6.0_12"
> Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
> Java HotSpot(TM) Server VM (build 11.2-b01, mixed mode)
>            Reporter: Alexander Berger
>            Assignee: Richard S. Hall
>             Fix For: shell-1.6.0
>
>         Attachments: Activator.patch
>
>
> The class org.apache.felix.shell.impl.Activator$ShellServiceImpl makes heavy use of synchronized
methods which synchronized on the ShellServiceImpl itself. This causes a deadlock if a refresh/resolve
(PackageAdmin) cycle is initiated using the shell and some Commands are about to be removed
from the OSGi service registry (as a result of the refresh/resolve).
> This happens because executeCommand locks the ShellServiceImpl instance and later on
when the PackageAdmin indirectly triggers the removal of some registered Commands ShellServiceImpl.removeCommand(...)
will try to lock the same ShellServiceImpl instance which is still locked by the executeCommand.
> I have created a patch for org.apache.felix.shell.impl.Activator (see Attachment) for
a possible solution of this problem.

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


Mime
View raw message