Hi Bruno - sorry you are having hard time of it but it's all very
helpful information.
Thoughts, so far, inline.
On 25/10/17 22:39, Bruno P. Kinoshita wrote:
It could be normal warnings when running tests. And since you noticed it
before, I'm fine assuming it's unrelated to the issue we have right now.
First thing after getting a coffee & triggering PHP builds this morning, was to
checkout jena at 8235ee335eea114aecffd55525ad36e408a2f39b, and run `mvn clean
install` on Windows 10.
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426;
2017-04-04T07:39:06+12:00)
Maven home: C:\Users\kinow\Development\java\apache-maven-3.5.0
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_144\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
It fails with other errors:
--- snip ---
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec - in
org.apache.jena.dboe.base.file.TestMetaFile
so that worked!
Running org.apache.jena.dboe.base.file.TestProcessFileLock
TDB2 uses OS file locking, so it is different to TDB1.
ProcessFileLock - wrapped up "fileChannel.lock()"
java.io.IOException: Access is denied
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1012)
at
org.apache.jena.dboe.base.file.TestProcessFileLock.beforeTest(TestProcessFileLock.java:52)
The code does:
@Before public void beforeTest() {
File f = new File(lockfile);
try {
f.delete();
f.createNewFile();
}
catch (IOException e) {
e.printStackTrace();
}
}
so f.delete didn't.
Tests run: 7, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 0.03 sec <<<
FAILURE! - in org.apache.jena.dboe.base.file.TestProcessFileLock
process_lock_3(org.apache.jena.dboe.base.file.TestProcessFileLock) Time elapsed: 0.007
sec <<< ERROR!
org.apache.jena.atlas.RuntimeIOException: Failed to open
'C:\Users\kinow\Development\java\workspace\jena\jena-db\jena-dboe-base\target\locktest\tdb.lock'
at
org.apache.jena.dboe.base.file.TestProcessFileLock.process_lock_3(TestProcessFileLock.java:74)
Caused by: java.nio.file.AccessDeniedException:
C:\Users\kinow\Development\java\workspace\jena\jena-db\jena-dboe-base\target\locktest\tdb.lock
at
org.apache.jena.dboe.base.file.TestProcessFileLock.process_lock_3(TestProcessFileLock.java:74)
From the gist log (thanks for that!)
> Running org.apache.jena.dboe.base.file.TestProcessFileLock
6 occurences of:
java.io.IOException: Access is denied
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1012)
at
org.apache.jena.dboe.base.file.TestProcessFileLock.beforeTest(TestProcessFileLock.java:52)
@Before catches and prints stacktraces. (Should fail).
7 tests. So probably before each of tests 2 to 7.
It looks like test 2 will pass without clean up from test 1.
Then 5 failures.
Test 3 does
ProcessFileLock lock1 = ProcessFileLock.create(lockfile);
ProcessFileLock.release(lock1);
ProcessFileLock lock2 = ProcessFileLock.create(lockfile); // Line 74.
release() is a ConcurrenctHasMapRemove.
but it fails to close the file.
Maybe reopening it fails on Windows.
Maybe its region locking blocking delete in the same JVM.
In real use, an app would have to explicitly expel a database from the
StoreConnection to make this happen.
Its the test code trying to test in one JVM that is triggering it.
> Tests in error:
> TestDatabaseOps.compact_prefixes_3:142 ยป NullPointer
As before.
Complete log for that module:
https://gist.github.com/kinow/1b9db27820bdbc5c5808b20cbf3f943d
This is a corporate Windows HP notebook, with 8 CPU, 32 GB, which I rarely use.
Just have Outlook, Git Bash, Maven, JDK 8, and word utilities. The rest of my
work is done on a Linux VM. I am not administrator in this computer. Not sure
if any of this helps diagnosing the error above.
I only have a 4 core machine.
I think maven runs on N-2 CPUs if parallel at all.
That's going to change the timing a lot.
But we now have some clues that it's not, or not all, parallel problems.
Many thanks
Andy