[
https://issues.apache.org/jira/browse/FELIX-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696383#action_12696383
]
Stuart McCulloch commented on FELIX-1027:
-----------------------------------------
@Pierre as Karl said using this switch should be safe because the custom Felix
classloader has extra fine-grained locks to protect against collisions - also
"UnlockDiagnosticVMOptions" just unlocks additional diagnostic options, to the
best of my knowledge it doesn't affect JVM performance unless you specify
further switches (think of it as a safety-catch)
@Don unfortunately the deadlock in loadClassInternal cannot be fixed in Felix
because the JVM can call loadClassInternal directly in certain situations which
means that even introducing a global lock in Felix may not help (a global lock
would also really hurt performance for everyone), if you look at
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4670071 this is a
long-standing bug in the Sun JVM that can occasionally occur during parallel
classloading with any classloader that doesn't follow the parent-delegation
model (the original bug was raised back in 2002 by someone using a custom JBoss
classloader)
Other JVMs (like IBM) don't have synchronized on loadClassInternal and
therefore don't suffer from this bug - also note from the latest evaluation
report on the sunbug, that Sun have finally decided on a different fix which
requires custom classloaders requiring parallel classloading to use a special
(currently non-standard) API - but this is only available in very recent JDK
builds and afaik would require us to use some reflection magic...
In practice this deadlock only affects applications with parallel classloading
involving the same set of classes - because most OSGi applications load their
classes during resolution or in the bundle activator, this doesn't affect them
- only a sub-set of applications that use Class.forName, etc. for the same set
of classes in different threads at exactly the same time may be affected.
> deadlock with felix 1.6.0 ?
> ---------------------------
>
> Key: FELIX-1027
> URL: https://issues.apache.org/jira/browse/FELIX-1027
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Environment: jdk1.5, linux
> Reporter: Pierre De Rop
> Priority: Critical
> Attachments: deadlock.txt,
> deadlock_after_patch_FELIX_1027_20090406.log, FELIX_1027_20090406.txt
>
>
> I just came across a deadlock with the felix 1.6.0 candidate version for the
> next fwk version.
> I have attached to this post the corresponding "kill -QUIT" output.
> Richard, is it really an framework deadlock ? This is strange because I am
> testing the trunk since one month and never noticed the problem ...
> /pierre
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.