Bug 1111137 - (6.4.0) WebsocketTestCase doesn't do correct cleanup
Summary: (6.4.0) WebsocketTestCase doesn't do correct cleanup
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Testsuite
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: DR1
: EAP 6.4.0
Assignee: jboss-set
QA Contact: Petr Kremensky
URL:
Whiteboard:
Depends On: 1119147
Blocks: 1123901
TreeView+ depends on / blocked
 
Reported: 2014-06-19 10:37 UTC by Ondrej Lukas
Modified: 2019-08-19 12:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1123901 (view as bug list)
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ondrej Lukas 2014-06-19 10:37:26 UTC
Some tests from manualmode (e.g. from org.jboss.as.test.manualmode.web.websocket.WebsocketTestCase.websocketTest, org.jboss.as.test.manualmode.security.OutboundLdapConnectionTestCase and org.jboss.as.test.manualmode.logging.CustomFormattersTestCase) fail with AccessControlException when running with Security Manager. It happens only with OpenJDK 7. It is probably related to set enviromenent because this issue occures only on Jenkins and I wasn't able to reproduce it locally.

https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EAP6/view/EAP6-security-manager/job/eap-60-as-testsuite-RHEL-matrix-openJDK7-SM/30/jdk=openjdk-1.7.0-local,label_exp=RHEL6%26%26x86/#showFailuresLink

Stacktrace:
ERROR [org.apache.catalina.connector] (http-/10.16.180.35:8080-6) JBWEB001018: An exception or error occurred in the container during the request processing: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "setContextClassLoader")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372) [rt.jar:1.7.0_55]
	at java.security.AccessController.checkPermission(AccessController.java:559) [rt.jar:1.7.0_55]
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) [rt.jar:1.7.0_55]
	at java.lang.Thread.setContextClassLoader(Thread.java:1503) [rt.jar:1.7.0_55]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:114)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
	at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:353)
	at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:911)
	at org.apache.tomcat.util.net.NioEndpoint$ChannelProcessor.run(NioEndpoint.java:932)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
	at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_55]

Comment 1 Josef Cacek 2014-07-23 14:42:31 UTC
Updating status. This's still an issue in 6.3.0.ER10.

There are actually 2 problems here:

1) WebsocketTestCase tests Http11NioProtocol, which has a doPrivileged() related issue. This is covered by bug #1119147.

2) The WebsocketTestCase doesn't do correct cleanup so the tests which run after this one also use Http11NioProtocol (and they will probably fail).

@Radim: Could you please fix the point 2?

Comment 2 Radim Hatlapatka 2014-07-30 08:27:33 UTC
PR: https://github.com/jbossas/jboss-eap/pull/1542

Comment 3 Petr Kremensky 2014-09-19 07:55:36 UTC
Verified on EAP 6.4.0.DR1.1


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