Bug 691773 - Invalid plugins remain in the in-memory cache even after deletion/purge
Summary: Invalid plugins remain in the in-memory cache even after deletion/purge
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.0.0.Beta2
Hardware: All
OS: All
medium vote
Target Milestone: ---
: ---
Assignee: John Sanda
QA Contact: Mike Foley
Depends On:
Blocks: rhq4
TreeView+ depends on / blocked
Reported: 2011-03-29 13:02 UTC by Jay Shaughnessy
Modified: 2013-09-02 07:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-09-02 07:19:09 UTC

Attachments (Terms of Use)

Description Jay Shaughnessy 2011-03-29 13:02:56 UTC
If you drop a bad plugin jar into ../plugins it will generate server log messages while trying to wait for it to become valid (assuming it's in a mid-copy state). When that times out it throws an exception which bubbles up out of the container. The net effect is that the invalid plugin is still put into the in-mem cache.  With the new delete/purge ability it's possible to get rid of the bad plugin from db and file system, but it remains in the cache and generated verbose logging every minute.

I think either the exception should be caught and the plugin not placed in the cache, or on delete, maybe purge, it should be removed from the cache.

I need someone more familiar to review this, jsanda or mazz.

Comment 1 John Mazzitelli 2011-03-29 13:30:45 UTC
something very recently came up re: the plugin cache in the plugin scanner code - john s. fixed it (about a week or two ago).

we can discuss possible solution

Comment 2 John Mazzitelli 2011-04-01 15:25:37 UTC
john is fixing this

Comment 3 John Sanda 2011-04-05 19:42:25 UTC
I believe this issue is slightly different from bug 683545.

Comment 4 John Sanda 2011-04-18 15:06:20 UTC
Added a finally block to ensure the AgentPluginScanner.scanned list always gets cleared even if ProductPluginDeployer throws an exception when ProductPluginDeployer.pluginDetected() is called.

commit hash: 2378d5452826890b0c62b4b93e95b5c24e276be9

Comment 5 Mike Foley 2011-06-23 18:09:53 UTC
created a "bad" plugin by starting with a "good" plugin and then making the rhq-plugin.xml invalid.  added the plugin.  did not see any residual or invalid plugins in Administration-->plugin.

Comment 6 Heiko W. Rupp 2013-09-02 07:19:09 UTC
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.

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