Bug 1110117 - [GSS] (6.4.0) Querying patching MBeans during shutdown results in IllegalStateException
[GSS] (6.4.0) Querying patching MBeans during shutdown results in IllegalStat...
Status: VERIFIED
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Patching (Show other bugs)
6.2.3
Unspecified Unspecified
unspecified Severity unspecified
: DR1
: EAP 6.4.0
Assigned To: Brian Stansberry
Jan Martiska
:
Depends On:
Blocks: 1120535 1120537
  Show dependency treegraph
 
Reported: 2014-06-17 01:23 EDT by James Livingston
Modified: 2018-03-06 15:38 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
An attempt to query the patch status of a JBoss EAP instance could previously result in an `IllegalStateException` error being thrown. The root cause of this error was that the `InstallationManagerService` was not available as it had already been shut down. This issue has now been resolved by first checking if the `InstallationManagerService` is available and if so, the query proceeds.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-3505 Major Resolved IllegalStateException when patching MBeans are queried during shutdown 2018-04-24 06:25 EDT
Red Hat Knowledge Base (Solution) 962723 None None None Never

  None (edit)
Description James Livingston 2014-06-17 01:23:46 EDT
If the MBeans for the patching subsystem are queried during server shutdown, it can result in an IllegalStateException. InstallationManagerService has already had stop() called on it, so the value is null.

This can be reproduced by the attached EJB, which does a MBeanServer.queryMBeans(null, null); from the @PreDestroy method. It's in a loop to ensure it runs after the installation manager gets de-initialised.

java.lang.IllegalStateException
at org.jboss.as.patching.installation.InstallationManagerService.getValue(InstallationManagerService.java:87) [wildfly-patching-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.patching.installation.InstallationManagerService.getValue(InstallationManagerService.java:28) [wildfly-patching-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.msc.service.ServiceControllerImpl.getValue(ServiceControllerImpl.java:1158) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.as.patching.management.PatchResource$ElementProviderResourceProvider.children(PatchResource.java:139) [wildfly-patching-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.patching.management.PatchResource$ElementProviderResourceProvider.hasChildren(PatchResource.java:134) [wildfly-patching-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.controller.registry.AbstractModelResource.hasChildren(AbstractModelResource.java:81) [wildfly-controller-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.controller.registry.AbstractModelResource$DelegateResource.hasChildren(AbstractModelResource.java:279) [wildfly-controller-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:57) [wildfly-jmx-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.jmx.model.RootResourceIterator.doIterate(RootResourceIterator.java:61) [wildfly-jmx-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.jmx.model.RootResourceIterator.iterate(RootResourceIterator.java:43) [wildfly-jmx-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.jmx.model.ModelControllerMBeanHelper.queryMBeans(ModelControllerMBeanHelper.java:125) [wildfly-jmx-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.jmx.model.ModelControllerMBeanServerPlugin.queryMBeans(ModelControllerMBeanServerPlugin.java:159) [wildfly-jmx-8.1.0.Final.jar:8.1.0.Final]
at org.jboss.as.jmx.PluggableMBeanServerImpl.queryMBeans(PluggableMBeanServerImpl.java:816) [wildfly-jmx-8.1.0.Final.jar:8.1.0.Final]
at example.ShutdownMBeanQuery.destroy(ShutdownMBeanQuery.java:23)
Comment 4 Scott Mumford 2014-07-31 23:51:27 EDT
Is this only fixed in 6.4.0? Is it therefore a known issue in 6.3.0?

Pasting Bug Fix version of the release note here for future use:

"In previous releases of JBoss EAP 6, the patching subsystem `PatchResource`, while not having a dependency on the `InstallationManagerService`, may have attempted to use it when it may be shut down

This could cause an `IllegalStateException` to be thrown if a shutdown hook attempted to query the patching subsystem MBeans.

This release adds a check to confirm whether the `InstallationManagerService` is up prior to using it, thus avoiding the `IllegalStateException`."


Using Known Issue version of text for 6.3.0 Release Notes as issue not resolved at the time of writing.
Comment 6 Martin Simka 2014-09-18 08:50:25 EDT
verified on EAP 6.4.0.DR1.1
Comment 8 Dimitris Andreadis 2015-02-03 16:03:17 EST
re-assign Emanuel's assigned bugs to Brian.

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