Bug 591501
Summary: | NPE's when shutting down EWP 5.0.1 CR2 | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Ondřej Žižka <ozizka> |
Component: | Plugin Container | Assignee: | RHQ Project Maintainer <rhq-maint> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.0.0 | CC: | ccrouch, jshaughn, loleary |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-05-29 18:03:02 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 725852, 577052 |
Description
Ondřej Žižka
2010-05-12 12:27:39 UTC
So this is related to the Embedded Console, not JON correct? Ozizka, how repeatable are these errors? Do they also occur in EAP5? There appear to be several separate issues: 14:22:00,766 WARN [InventoryManager] Failure during discovery for [Service Binding Manager] Resources - failed after 525 ms. java.lang.NullPointerException at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ResourceDiscoveryComponentInvocationHandler.invokeInNewThread(DiscoveryComponentProxyFactory.java:204) 14:22:01,045 ERROR [RuntimeDiscoveryExecutor] Error in runtime discovery java.lang.NullPointerException at org.rhq.core.pc.inventory.InventoryManager.removeResourceAndIndicateIfScanIsNeeded(InventoryManager.java:952) then multiple instances of 14:22:01,064 ERROR [RuntimeDiscoveryExecutor] Error in runtime discovery java.lang.NullPointerException at org.rhq.core.pc.plugin.PluginComponentFactory.getDiscoveryComponent(PluginComponentFactory.java:81) It may not be feasible to fix these because they appear due to the discovery process being interrupted by a shutdown of the app server, but we can investigate. Charles, correct, these errors have only been seen in the admin console (https://jira.jboss.org/browse/EMBJOPR-301), not RHQ enterprise. I have not been able to reproduce this with an EAP 5.1 snapshot. But from looking at Ondra's log output, here is what I suspect is happening: 1) user hits Ctrl-C to initiate shutdown of the app server 2) app server invokes BootstrapAction.destroy() to shutdown admin console 3) admin console calls PluginContainer.shutdown() to shutdown PC 4) a) before the PC has had a chance to call InventoryManager.shutdown(), the discovery executor kicks off a runtime discovery scan -or- b) a runtime scan that was started prior to 3) could still be in progress 5) InventoryManager.shutdown() shuts down, nulling out all its ResourceContainers and other fields 6) the runtime scan encounters NPEs when it tries to access the now-nulled-out fields from the InventoryManager To greatly minimize the chances of such NPEs, we could do the following: 1) as the very first thing it does, PluginContainer.shutdown() could flip an internal stopping flag to true 2) it could expose this flag via a public isStopping() method 3) PC jobs such as avail scans and discovery scans could check whether the PC is stopping, and if so, gracefully abort; they could also check if their thread has been interrupted, and in that case also gracefully abort 4) various PC managers could also make sure not to service any requests from the Server if the PC is in the stopping state ips - how important is this to fix, or can this be closed? It's not critical, but I'd like to see it eventually get done, so I'd prefer to keep it open. Any progress? |