Bug 733784 - ResourceContainer may not reset Thread ContextClassLoader (TCCL)
ResourceContainer may not reset Thread ContextClassLoader (TCCL)
Status: NEW
Product: RHQ Project
Classification: Other
Component: Plugin Container (Show other bugs)
unspecified
Unspecified Unspecified
medium Severity high (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
https://na7.salesforce.com/500A000000...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-26 16:25 EDT by Brad Maxwell
Modified: 2011-10-05 10:51 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
JBoss EAP 5.1.0
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Brad Maxwell 2011-08-26 16:25:20 EDT
Description of problem:

org.rhq.core.pc.inventory.ResourceContainer

In this code, the unlock() api [1] says it can throw an unchecked exception which would cause the TCCL to not be reset. 

if (this.lock != null) {
 this.lock.unlock();
}
Thread.currentThread().setContextClassLoader(originalContextClassLoader);

[1] http://download.oracle.com/javase/1,5.0/docs/api/java/util/concurrent/locks/Lock.html#unlock%28%29

We are seeing an issue which maybe be caused by this bug. JBoss server is started and there are some failed services that do not start when the server is started.  The application seems to run fine with these failed services.  After some unpredictable time, it seems the Admin Console tries to inventory services and hits these failed services which seems to be the precursor to the NoClassDef / ClassNotFound exceptions.

We are trying to get test results with the admin console and failed services removed.

Version-Release number of selected component (if applicable):

JBoss EAP 5.1.0 

deploy/admin-console.war/WEB-INF/lib/rhq-core-plugin-container.jar/org/rhq/core/pc/inventory/ResourceContainer.class 

From rhq-core-plugin-container.jar manifest: 

Implementation-Title: RHQ Plugin Container
Implementation-Version: 3.0.0.EmbJopr2
Os-Version: 2.6.18-194.8.1.el5

How reproducible:

Failed services such as HornetQ when starting JBoss. System runs for a while running tests against it.  After some time, it seems the Admin Console tries to inventory services which we believe is the cause.

If anyone knows how we might invoke inventory or try to trigger this, then we could confirm this is the issue.

Note You need to log in before you can comment on or make changes to this bug.