[
https://issues.apache.org/jira/browse/DERBY-6112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14134554#comment-14134554
]
Myrna van Lunteren commented on DERBY-6112:
-------------------------------------------
If I change the IOException caught into an Exception, I get the following
output:
1)
testSSLBasicDSConnect(org.apache.derbyTesting.functionTests.tests.derbynet.SSLTest)junit.framework.AssertionFailedError:
Timed out waiting for network server to start (localhost:1527):Spawned
SpawnedNetworkServer exitCode=0
STDOUT:
Mon Sep 15 14:38:02 PDT 2014 : Security manager installed using the Basic
server security policy.
Mon Sep 15 14:38:02 PDT 2014 : Apache Derby Network Server - 10.12.0.0 alpha -
(1625092:1625093M) started and ready to accept SSL connections on port 1527
Mon Sep 15 14:38:02 PDT 2014 : Access denied ("java.util.PropertyPermission"
"derby.system.home" "read")
java.security.AccessControlException: Access denied
("java.util.PropertyPermission" "derby.system.home" "read")
at java.security.AccessController.throwACE(AccessController.java:100)
at
java.security.AccessController.checkPermission(AccessController.java:174)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
at
java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1311)
at java.lang.System.getProperty(System.java:426)
at java.lang.System.getProperty(System.java:410)
at org.apache.derby.impl.drda.ClientThread$1.run(ClientThread.java:160)
at org.apache.derby.impl.drda.ClientThread$1.run(ClientThread.java:156)
at
java.security.AccessController.doPrivileged(AccessController.java:274)
at
org.apache.derby.impl.drda.ClientThread.acceptClientWithRetry(ClientThread.java:155)
at org.apache.derby.impl.drda.ClientThread.run(ClientThread.java:63)
Mon Sep 15 14:38:03 PDT 2014 : Access denied ("java.util.PropertyPermission"
"derby.system.home" "read")
java.security.AccessControlException: Access denied
("java.util.PropertyPermission" "derby.system.home" "read")
at java.security.AccessController.throwACE(AccessController.java:100)
at
java.security.AccessController.checkPermission(AccessController.java:174)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
at
java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1311)
at java.lang.System.getProperty(System.java:426)
at java.lang.System.getProperty(System.java:410)
at org.apache.derby.impl.drda.ClientThread$1.run(ClientThread.java:160)
at org.apache.derby.impl.drda.ClientThread$1.run(ClientThread.java:156)
at
java.security.AccessController.doPrivileged(AccessController.java:274)
at
org.apache.derby.impl.drda.ClientThread.acceptClientWithRetry(ClientThread.java:155)
at org.apache.derby.impl.drda.ClientThread.run(ClientThread.java:63)
Mon Sep 15 14:38:04 PDT 2014 : Access denied ("java.util.PropertyPermission"
"derby.system.home" "read")
java.security.AccessControlException: Access denied
("java.util.PropertyPermission" "derby.system.home" "read")
at java.security.AccessController.throwACE(AccessController.java:100)
at
java.security.AccessController.checkPermission(AccessController.java:174)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
at
java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1311)
at java.lang.System.getProperty(System.java:426)
at java.lang.System.getProperty(System.java:410)
at org.apache.derby.impl.drda.ClientThread$1.run(ClientThread.java:160)
at org.apache.derby.impl.drda.ClientThread$1.run(ClientThread.java:156)
at
java.security.AccessController.doPrivileged(AccessController.java:274)
at
org.apache.derby.impl.drda.ClientThread.acceptClientWithRetry(ClientThread.java:155)
at org.apache.derby.impl.drda.ClientThread.run(ClientThread.java:63)
Mon Sep 15 14:38:04 PDT 2014 : Apache Derby Network Server - 10.12.0.0 alpha -
(1625092:1625093M) shutdown
------------
stack traces for all live threads...
------------
at
org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:225)
at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at
org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:58)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.extensions.TestSetup.run(TestSetup.java:25)
Does this seem like an appropriate fix?
> SSL Test (and network server ) can hang if serverSocket.accept() fails for
> something other than an IOException
> ---------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-6112
> URL: https://issues.apache.org/jira/browse/DERBY-6112
> Project: Derby
> Issue Type: Bug
> Components: Network Server, Test
> Affects Versions: 10.8.3.0
> Reporter: Kathey Marsden
> Labels: derby_triage10_11
>
> In starting a server with SSL as in SSLTest if serverSocket.accept() fails
> for some reason other than an IOException it may just print the error to
> console and hang. In this case it was:
> java.security.AccessControlException: Access denied
> (java.util.PropertyPermission
> I saw this when debugging a java issue in serverSocket.accept() but I think
> it could be simulated by adding an unwrapped System.getProperty() of some
> sort before serverSocket.accept() to force a permission error. e.g.
> System.getProperty("derby.system.home");
> return serverSocket.accept();
> } catch (IOException acceptE) {
> I have not verified that would work.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)