Bug 1350259 - [GSS](6.4.z) Random ClassCastException for ErrorReportValve at start up
Summary: [GSS](6.4.z) Random ClassCastException for ErrorReportValve at start up
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web
Version: 6.4.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.10
Assignee: Aaron Ogburn
QA Contact: Radim Hatlapatka
URL: https://github.com/jbossas/jboss-eap/...
Whiteboard:
Depends On:
Blocks: eap6410-payload
TreeView+ depends on / blocked
 
Reported: 2016-06-26 20:17 UTC by Aaron Ogburn
Modified: 2020-01-17 15:48 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-01-17 13:01:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
01657328.btm (411 bytes, text/plain)
2016-06-26 20:18 UTC, Aaron Ogburn
no flags Details
standalone-ha.xml (22.14 KB, application/xml)
2016-06-26 20:18 UTC, Aaron Ogburn
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2399611 0 None None None 2016-06-26 20:23:40 UTC

Description Aaron Ogburn 2016-06-26 20:17:00 UTC
Description of problem:

When starting with -Dorg.apache.catalina.connector.WAIT_FOR_BEFORE_START set, an exception like the following can be seen randomly at start up if the WebVirtualHostService.start and WebConnectorService.start are firing at the same time.

ERROR [org.apache.catalina.core] (MSC service thread 1-1) JBWEB001085: Failed loding specified error report valve class: org.apache.catalina.valves.ErrorReportValve: java.lang.ClassCastException: org.apache.catalina.valves.ErrorReportValve cannot be cast to org.apache.catalina.Container
	at org.jboss.as.web.WebConnectorService$2.containerEvent(WebConnectorService.java:344) [jboss-as-web-7.5.9.Final-redhat-SNAPSHOT.jar:7.5.9.Final-redhat-SNAPSHOT]
	at org.apache.catalina.core.ContainerBase.fireContainerEvent(ContainerBase.java:1345) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
	at org.apache.catalina.core.ContainerBase.addValve(ContainerBase.java:1204) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:462) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:803) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
	at org.apache.catalina.core.StandardEngine.addChild(StandardEngine.java:217) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
	at org.jboss.as.web.WebServerService.addHost(WebServerService.java:167) [jboss-as-web-7.5.9.Final-redhat-SNAPSHOT.jar:7.5.9.Final-redhat-SNAPSHOT]
	at org.jboss.as.web.WebVirtualHostService.start(WebVirtualHostService.java:98) [jboss-as-web-7.5.9.Final-redhat-SNAPSHOT.jar:7.5.9.Final-redhat-SNAPSHOT]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.6.Final-redhat-1.jar:1.1.6.Final-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.6.Final-redhat-1.jar:1.1.6.Final-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]


Version-Release number of selected component (if applicable):


How reproducible:

Somewhat

Steps to Reproduce:
1. Enable byteman rule in JVM options:

-javaagent:/path/to/$BYTEMAN_HOME/lib/byteman.jar=script:/path/to/$BYTEMAN_HOME/01657328.btm,sys:/path/to/$BYTEMAN_HOME/lib/byteman.jar

2. Start up with the attached standalone xml and org.apache.catalina.connector.WAIT_FOR_BEFORE_START set:

./standalone.sh -c standalone-ha.xml -Dorg.apache.catalina.connector.WAIT_FOR_BEFORE_START=/foobar

3. Check for the exception.  Seeing this right before the forced StandardHost sleep is an indication that the problem start up ordering was hit:

16:07:50,528 INFO  [stdout] (MSC service thread 1-1) addContainerListener: StandardEngine[jboss.web].StandardHost[default-host] org.jboss.as.web.WebConnectorService$2@2749da2b


Actual results:

ClassCastException may occur

Expected results:

ClassCastException does not occur

Additional info:

Comment 1 Aaron Ogburn 2016-06-26 20:18:07 UTC
Created attachment 1172650 [details]
01657328.btm

Comment 2 Aaron Ogburn 2016-06-26 20:18:48 UTC
Created attachment 1172651 [details]
standalone-ha.xml

Comment 4 Aaron Ogburn 2016-06-26 22:09:25 UTC
PR: https://github.com/jbossas/jboss-eap/pull/2802

Comment 6 Michael Cada 2016-08-23 08:46:22 UTC
Verified with EAP 6.4.10.CP.CR2

Comment 7 Petr Penicka 2017-01-17 13:01:16 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.


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