Description of problem: When the agent is shutdown or the agent's plug-in container is restarted while there are event sources being monitored (polled) the removal of registered event pollers fails. Version-Release number of selected component (if applicable): 4.7.0.JON [adad71f] How reproducible: Always Steps to Reproduce: 1. Start JBoss ON system. 2. Import RHQ Server resource into inventory. 3. Add an event source to the RHQ Server resource. 4. Verify events are being captured. 5. Shutdown agent. Actual results: Agent will log ERRORs for each event source that is active: ERROR [ResourceContainer.invoker.daemon-14] (rhq.core.pc.event.EventManager)- Failed to remove poller with PollerKey[resourceId=10003, eventType=logEntry] from thread pool. Expected results: No errors appears on shutdown of agent or restart of plug-in container. Additional info: This issue appears to have no functional impact to the system. (04:17:10 PM) jsanda: *now* i think i know the cause (04:19:22 PM) jsanda: during the PC shutdown (04:19:43 PM) jsanda: EventManager.shutdown is invoked before the resource components are stopped (04:20:07 PM) loleary: Interesting. (04:20:11 PM) loleary: I see where that is going. (04:20:27 PM) jsanda: and EventManager.shutdown shuts down the thread pool (04:20:45 PM) jsanda: and then subsequently, the resource components try to unregister their pollers (04:21:09 PM) jsanda: while the error msg is misleading, i think it is actually harmless (04:21:16 PM) jsanda: with that said, it should be fixed (04:21:39 PM) loleary: Agreed. (04:22:07 PM) jsanda: EventManager.unregisterEventPoller() should be a no-op if pollerThreadPool.isTerminated() returns true (04:22:31 PM) jsanda: that call to isTerminated needs to be added and then if anything maybe just log a debug msg (04:22:49 PM) jsanda: sorry, isShutdown(), not isTerminated (04:23:37 PM) jsanda: i verified that this is in fact happening by setting breakpoints
Master commit 4d2ec5e773ff94879d11a7e2fb2e395220b2183e Author: Jay Shaughnessy <jshaughn> Date: Thu Sep 4 14:52:06 2014 -0400 Don't try to unregister the poller shutdown if the threadpool is shutdown. Release/jon3.3.x commit c17e15132f0e49b745e2d9d3383f76c9a68bbebd Author: Jay Shaughnessy <jshaughn> Date: Thu Sep 4 14:52:06 2014 -0400 (cherry picked from commit 4d2ec5e773ff94879d11a7e2fb2e395220b2183e) Signed-off-by: Jay Shaughnessy <jshaughn>
Moving to ON_QA as available for test with the following brew build: https://brewweb.devel.redhat.com//buildinfo?buildID=385149
Verified on version : 3.3.0.ER03 build Number :4aefe39:44e33a4