Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1120535 - [GSS] (6.3.1) Querying patching MBeans during shutdown results in IllegalStateException
[GSS] (6.3.1) Querying patching MBeans during shutdown results in IllegalStat...
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Patching (Show other bugs)
6.3.0
Unspecified Unspecified
unspecified Severity unspecified
: CR1
: EAP 6.3.1
Assigned To: James Livingston
Jan Martiska
Russell Dickenson
: Triaged
Depends On: 1110117
Blocks: eap631-blockers/eap631-payload/eap63-cp01-blockers 1120537
  Show dependency treegraph
 
Reported: 2014-07-17 02:23 EDT by James Livingston
Modified: 2016-02-21 19:56 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
This release of JBoss EAP 6 carries a bug caused by the patching subsystem PatchResource not having a depenency on the InstallationManagerService but using it when it may be shut down. This may cause an `IllegalStateException` if a shutdown hook attempts to query the patching subsystem MBeans. The workaround is to confirm whether the `InstallationManagerService` is up prior to using it.
Story Points: ---
Clone Of:
: 1120537 (view as bug list)
Environment:
Last Closed: 2014-10-13 14:39:17 EDT
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 2015-05-08 11:48:36 EDT

  None (edit)
Description James Livingston 2014-07-17 02:23:28 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 1 James Livingston 2014-07-22 21:54:05 EDT
I'll post the PR once the branch is created
Comment 4 baranowb 2014-08-07 01:59:54 EDT
Merged.
Comment 5 Jan Martiska 2014-09-01 04:12:19 EDT
Verified in 6.3.1.CR1.

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