You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Kathey Marsden <km...@sbcglobal.net> on 2011/10/04 21:13:04 UTC
Problem with Oracle JDK 1.7 tests and DERBY-5363
I have noticed sice DERBY-5363 was checked in all the Oracle jdk 1.7
runs show NA,
e.g. here is the latest one:
http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/Limited/testSummary-1178434.html
It seems to have started with the checkin of DERBY-5363, revision 1176591
http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/Limited/
Is this a known issue?
Thanks
Kathey
Re: Problem with Oracle JDK 1.7 tests and DERBY-5363
Posted by "Dag H. Wanvik" <da...@oracle.com>.
Knut Anders Hatlen <kn...@oracle.com> writes:
> org.apache.derbyTesting.functionTests.tests.engine.RestrictiveFilePermissionsTest$2.run(RestrictiveFilePermissionsTest.java:694)
> ... 18 more
> Caused by: java.nio.file.FileSystemException: system/testPermissions:
> Invalid argument (file system does not support NFSv4 ACLs)
> at
> sun.nio.fs.SolarisAclFileAttributeView.getAcl(SolarisAclFileAttributeView.java:327)
> ... 23 more
> Failed to invoke suite():java.lang.reflect.InvocationTargetException
>
> Looks like ACL view isn't available if the tests are running on Solaris
> with the legacy UFS file system, whereas it probably works if the file
> system is ZFS or NFS.
The fix for Linux did not solve this, I still see the stack below.
>From the code, it appears that the call to get the ACL view:
Object aclView = getFileAttributeView.invoke(
null,
new Object[]{
fileP,
aclFileAttributeViewClz,
Array.newInstance(linkOptionClz, 0)});
must have succeeded because the error happens on this line:
if (aclView != null) { // Windows, Solaris 11
Object owner = getOwner.invoke(
null,
new Object[]{
fileP,
Array.newInstance(linkOptionClz, 0)});
List oldAcl =
**********************> (List)getAcl.invoke(aclView, (Object[])null);
which is disconcerting. I would have through that in the case of ACL
views not being supported, the call to getFileAttributeView(..,
aclFileAttributeViewClz, ..) would have failed. But it seems the view is
returned (see SolarisAclFileAttributeView.getAcl in the stack trace) but
we can't use it for getting the ACL itself... hmm. I'll re-read the
Java docs find out if this is expected behavior or a JVM bug.
Thanks,
Dag
Failed to invoke class org.apache.derbyTesting.functionTests.tests.engine._Suite
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.derbyTesting.functionTests.suites.AllPackages.invokeSuite(AllPackages.java:176)
at org.apache.derbyTesting.functionTests.suites.AllPackages.suite(AllPackages.java:63)
at org.apache.derbyTesting.functionTests.suites.All.suite(All.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:126)
at junit.textui.TestRunner.start(TestRunner.java:184)
at junit.textui.TestRunner.main(TestRunner.java:143)
Caused by: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derbyTesting.functionTests.tests.engine.RestrictiveFilePermissionsTest.checkAccessToOwner(RestrictiveFilePermissionsTest.java:589)
at org.apache.derbyTesting.functionTests.tests.engine.RestrictiveFilePermissionsTest.suite(RestrictiveFilePermissionsTest.java:93)
at org.apache.derbyTesting.functionTests.tests.engine._Suite.suite(_Suite.java:53)
... 14 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.derbyTesting.functionTests.tests.engine.RestrictiveFilePermissionsTest$2.run(RestrictiveFilePermissionsTest.java:714)
... 18 more
Caused by: java.nio.file.FileSystemException: system/testPermissions: Invalid argument (file system does not support NFSv4 ACLs)
at sun.nio.fs.SolarisAclFileAttributeView.getAcl(SolarisAclFileAttributeView.java:327)
... 23 more
Failed to invoke suite():java.lang.reflect.InvocationTargetException
Re: Problem with Oracle JDK 1.7 tests and DERBY-5363
Posted by Knut Anders Hatlen <kn...@oracle.com>.
Kristian Waagan <kr...@oracle.com> writes:
> On 05.10.11 04:56, Dag H. Wanvik wrote:
>>
>>>> I have noticed sice DERBY-5363 was checked in all the Oracle jdk 1.7
>>>> runs show NA,
>>>> e.g. here is the latest one:
>>>> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/Limited/testSummary-1178434.html
>>>>
>>>> It seems to have started with the checkin of DERBY-5363, revision 1176591
>>>> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/Limited/
>>>
>>> Thanks, Kathey. I will investigate.
>>
>> I have checked in a patch which hopefully resolves this issue at svn
>> r1179042. This might also make the test work for IBM's JDK7 on Linux
>> now.
>
> Hi Dag,
>
> It appears your fix is for Linux only ([1]), but the results show NA
> for suites.All on all platforms when running with Java 7.
> Is this a reporting problem, or is this, or another, bug affecting all
> platforms?
I checked the log for the nightly tests. The error happens in suite(),
so none of the tests are actually started. Here's what the failure looks
like on Solaris:
Failed to invoke class org.apache.derbyTesting.functionTests.tests.engine._Suite
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.derbyTesting.functionTests.suites.AllPackages.invokeSuite(AllPackages.java:176)
at org.apache.derbyTesting.functionTests.suites.AllPackages.suite(AllPackages.java:63)
at org.apache.derbyTesting.functionTests.suites.All.suite(All.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:126)
at junit.textui.TestRunner.start(TestRunner.java:184)
at junit.textui.TestRunner.main(TestRunner.java:143)
Caused by: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derbyTesting.functionTests.tests.engine.RestrictiveFilePermissionsTest.checkAccessToOwner(RestrictiveFilePermissionsTest.java:590)
at org.apache.derbyTesting.functionTests.tests.engine.RestrictiveFilePermissionsTest.suite(RestrictiveFilePermissionsTest.java:92)
at org.apache.derbyTesting.functionTests.tests.engine._Suite.suite(_Suite.java:53)
... 14 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.derbyTesting.functionTests.tests.engine.RestrictiveFilePermissionsTest$2.run(RestrictiveFilePermissionsTest.java:694)
... 18 more
Caused by: java.nio.file.FileSystemException: system/testPermissions: Invalid argument (file system does not support NFSv4 ACLs)
at sun.nio.fs.SolarisAclFileAttributeView.getAcl(SolarisAclFileAttributeView.java:327)
... 23 more
Failed to invoke suite():java.lang.reflect.InvocationTargetException
Looks like ACL view isn't available if the tests are running on Solaris
with the legacy UFS file system, whereas it probably works if the file
system is ZFS or NFS.
Dag's fix for Linux may also fix this, but the error seen on Linux is
different:
Failed to invoke class org.apache.derbyTesting.functionTests.tests.engine._Suite
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.derbyTesting.functionTests.suites.AllPackages.invokeSuite(AllPackages.java:176)
at org.apache.derbyTesting.functionTests.suites.AllPackages.suite(AllPackages.java:63)
at org.apache.derbyTesting.functionTests.suites.All.suite(All.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:126)
at junit.textui.TestRunner.start(TestRunner.java:184)
at junit.textui.TestRunner.main(TestRunner.java:143)
Caused by: junit.framework.AssertionFailedError
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.fail(Assert.java:53)
at org.apache.derbyTesting.functionTests.tests.engine.RestrictiveFilePermissionsTest$2.run(RestrictiveFilePermissionsTest.java:673)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.derbyTesting.functionTests.tests.engine.RestrictiveFilePermissionsTest.checkAccessToOwner(RestrictiveFilePermissionsTest.java:590)
at org.apache.derbyTesting.functionTests.tests.engine.RestrictiveFilePermissionsTest.suite(RestrictiveFilePermissionsTest.java:92)
at org.apache.derbyTesting.functionTests.tests.engine._Suite.suite(_Suite.java:53)
... 14 more
Failed to invoke suite():java.lang.reflect.InvocationTargetException
On Windows, it looks like the error happens in the test framework that
starts all the tests. It fails when trying to move files to/from the
machine. It might be that a failure in an earlier test run prevented
some resources from being released and that manual intervention (like a
reboot) would be necessary to get the tests running again. Let's first
see what happens when Dag's fix is picked up.
--
Knut Anders
Re: Problem with Oracle JDK 1.7 tests and DERBY-5363
Posted by Kristian Waagan <kr...@oracle.com>.
On 05.10.11 04:56, Dag H. Wanvik wrote:
>
>>> I have noticed sice DERBY-5363 was checked in all the Oracle jdk 1.7
>>> runs show NA,
>>> e.g. here is the latest one:
>>> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/Limited/testSummary-1178434.html
>>>
>>> It seems to have started with the checkin of DERBY-5363, revision 1176591
>>> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/Limited/
>>
>> Thanks, Kathey. I will investigate.
>
> I have checked in a patch which hopefully resolves this issue at svn
> r1179042. This might also make the test work for IBM's JDK7 on Linux
> now.
Hi Dag,
It appears your fix is for Linux only ([1]), but the results show NA for
suites.All on all platforms when running with Java 7.
Is this a reporting problem, or is this, or another, bug affecting all
platforms?
It will be interesting to see what happens in the next run when your
change is picked up.
Regards,
--
Kristian
[1] It may be based on the availability of the functionality, not on
operating system - I haven't checked.
>
> Thanks,
> Dag
>
> ----------------------------------------------------------------------
> DERBY-5363 Tighten permissions of DB files to owner with>= JDK7
>
> Patch derby-5363-followup-linux.
>
> RestrictiveFilePermissionsTest for this feature broke on some
> platforms (thanks to Kathey for noticing). Apparently, the ACL view of
> Posix file system permissions is not available for all Unix/Linux
> versions in JDK 1.7 (I had tested on Solaris 11 and Windows). The
> changes in the test now fall back on using
> PosixFileAttributeView#readAttributes if the ACL view is not
> available.
Re: Problem with Oracle JDK 1.7 tests and DERBY-5363
Posted by "Dag H. Wanvik" <da...@oracle.com>.
>> I have noticed sice DERBY-5363 was checked in all the Oracle jdk 1.7
>> runs show NA,
>> e.g. here is the latest one:
>> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/Limited/testSummary-1178434.html
>>
>> It seems to have started with the checkin of DERBY-5363, revision 1176591
>> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/Limited/
>
> Thanks, Kathey. I will investigate.
I have checked in a patch which hopefully resolves this issue at svn
r1179042. This might also make the test work for IBM's JDK7 on Linux
now.
Thanks,
Dag
----------------------------------------------------------------------
DERBY-5363 Tighten permissions of DB files to owner with >= JDK7
Patch derby-5363-followup-linux.
RestrictiveFilePermissionsTest for this feature broke on some
platforms (thanks to Kathey for noticing). Apparently, the ACL view of
Posix file system permissions is not available for all Unix/Linux
versions in JDK 1.7 (I had tested on Solaris 11 and Windows). The
changes in the test now fall back on using
PosixFileAttributeView#readAttributes if the ACL view is not
available.
Re: Problem with Oracle JDK 1.7 tests and DERBY-5363
Posted by "Dag H. Wanvik" <da...@oracle.com>.
Kathey Marsden <km...@sbcglobal.net> writes:
> I have noticed sice DERBY-5363 was checked in all the Oracle jdk 1.7
> runs show NA,
> e.g. here is the latest one:
> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/Limited/testSummary-1178434.html
>
> It seems to have started with the checkin of DERBY-5363, revision 1176591
> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.7/testing/Limited/
Thanks, Kathey. I will investigate.
Dag