[
https://issues.apache.org/jira/browse/DERBY-6741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14623921#comment-14623921
]
Rick Hillegas commented on DERBY-6741:
--------------------------------------
I ran the full regression suite on my macbook pro using this Oracle vm:
1.8.0-b132. I did not see any errors in NoDBInternalsPermissionTest. However, I
did see this instability:
{noformat}
There was 1 failure:
1)
spawnProcess:JDBCDriversEmbeddedTest(org.apache.derbyTesting.functionTests.tests.jdbcapi.AutoloadTest)junit.framework.AssertionFailedError:
subprocess run failed: exit code==143
[ (stdout subprocess) .......]
[ (stderr subprocess) ]
[Subprocess 4416 hanging, jstack result:2015-07-12 09:46:12
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.0-b70 mixed mode):
"Attach Listener" #18 daemon prio=9 os_prio=31 tid=0x00007fb8459af000
nid=0x410b waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Service Thread" #8 daemon prio=9 os_prio=31 tid=0x00007fb84388f800 nid=0x5603
runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C1 CompilerThread2" #7 daemon prio=9 os_prio=31 tid=0x00007fb843867000
nid=0x5403 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" #6 daemon prio=9 os_prio=31 tid=0x00007fb843866800
nid=0x5203 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" #5 daemon prio=9 os_prio=31 tid=0x00007fb843870800
nid=0x5003 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" #4 daemon prio=9 os_prio=31 tid=0x00007fb84384b800
nid=0x4e03 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" #3 daemon prio=8 os_prio=31 tid=0x00007fb843848000 nid=0x3e03 in
Object.wait() [0x000000011eb38000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000780122798> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:142)
- locked <0x0000000780122798> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:158)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)
"Reference Handler" #2 daemon prio=10 os_prio=31 tid=0x00007fb843847800
nid=0x3c03 in Object.wait() [0x000000011ea35000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000780138d68> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:157)
- locked <0x0000000780138d68> (a java.lang.ref.Reference$Lock)
"main" #1 prio=5 os_prio=31 tid=0x00007fb845800000 nid=0x1d03 waiting on
condition [0x000000010b042000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at
org.apache.derbyTesting.junit.NetworkServerTestSetup.waitForAvailablePort(NetworkServerTestSetup.java:276)
at
org.apache.derbyTesting.junit.NetworkServerTestSetup.waitForAvailablePort(NetworkServerTestSetup.java:244)
at
org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:203)
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)
"VM Thread" os_prio=31 tid=0x00007fb843843000 nid=0x3a03 runnable
"GC task thread#0 (ParallelGC)" os_prio=31 tid=0x00007fb84580d000 nid=0x3203
runnable
"GC task thread#1 (ParallelGC)" os_prio=31 tid=0x00007fb84580e000 nid=0x3403
runnable
"GC task thread#2 (ParallelGC)" os_prio=31 tid=0x00007fb84580e800 nid=0x3603
runnable
"GC task thread#3 (ParallelGC)" os_prio=31 tid=0x00007fb84580f000 nid=0x3803
runnable
"VM Periodic Task Thread" os_prio=31 tid=0x00007fb84384a800 nid=0x5803 waiting
on condition
JNI global references: 48
End of jstack output]
at
org.apache.derbyTesting.functionTests.tests.jdbcapi.AutoloadTest.spawnProcess(AutoloadTest.java:319)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at
org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:120)
at
org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:443)
at
org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:460)
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)
FAILURES!!!
Tests run: 13851, Failures: 1, Errors: 0
{noformat}
I will try to reproduce the NoDBInternalsPermissionTest heisenbug on my Ubuntu
laptop.
Making some wild guesses about what might be going on: It could be that there's
some instability related to the resetting of the security manager which happens
between tests. That instability might be sensitive to the order in which tests
are run. That order, in turn, may vary between VMs. Maybe it varies between
runs on the Linux VM.
> User code can get the ContextManager from an EmbedConnection
> ------------------------------------------------------------
>
> Key: DERBY-6741
> URL: https://issues.apache.org/jira/browse/DERBY-6741
> Project: Derby
> Issue Type: Bug
> Components: JDBC, Services
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Fix For: 10.12.0.0
>
> Attachments: derby-6741-01-aa-usederbyinternals.diff
>
>
> EmbedConnection.getContextManager() is a public method. Exposing internals
> like the ContextManager is a security risk.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)