Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eXist-db does not run correctly on JDKs 12, 13, 14 and 15 #3375

Open
dizzzz opened this issue Apr 18, 2020 · 27 comments
Open

eXist-db does not run correctly on JDKs 12, 13, 14 and 15 #3375

dizzzz opened this issue Apr 18, 2020 · 27 comments
Labels
bug issue confirmed as bug enhancement new features, suggestions, etc. high prio
Milestone

Comments

@dizzzz
Copy link
Member

dizzzz commented Apr 18, 2020

During running unit tests, at least one test fails, only with Java13:

[WARNING] Tests run: 156, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 3.288 s - in xquery.arrays.ArrayTests
1466[WARNING] Tests run: 458, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 34.446 s - in xquery.xquery3.XQuery3Tests
1467[INFO] Tests run: 58, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 33.929 s - in xquery.optimizer.OptimizerTests
1468[INFO] 
1469[INFO] Results:
1470[INFO] 
1471[ERROR] Errors: 
1472[ERROR]   VariableByteStreamTest.copyTo:82 » ArrayIndexOutOfBounds Index 3106157 out of ...
1473[INFO] 
1474[ERROR] Tests run: 4673, Failures: 0, Errors: 1, Skipped: 102
1475[INFO] 
@dizzzz dizzzz added bug issue confirmed as bug enhancement new features, suggestions, etc. labels Apr 18, 2020
@adamretter adamretter added this to the eXist-5.2.1 milestone Apr 20, 2020
@adamretter
Copy link
Member

Just to let you know @dizzzz I am digging into this. It's a tricksy one...

@dizzzz
Copy link
Member Author

dizzzz commented Apr 21, 2020

@adamretter the issue is not visible in all PRs....

@adamretter
Copy link
Member

@dizzzz Indeed. The issue I am tracing appears to be non-deterministic on JDK 13 :-/ I am still not sure I believe it!

@reinhapa
Copy link
Member

reinhapa commented Jul 6, 2020

@adamretter do we have something like code coverage in the build? We got something similar in our build when using jacoco...

@adamretter
Copy link
Member

adamretter commented Jul 6, 2020

@reinhapa No, there is no code coverage in that build or any other form of bytecode instrumentation that I am aware of.

I do have a branch where I introduce JaCoCo, but that is separate... and that has other problems... #3341

@adamretter
Copy link
Member

I finally managed to isolate the issue to an independent stripped down test case - https://github.com/adamretter/vbe-test

Still it's a mystery right now that I trying to understand, but much less code to look through now at least.

@reinhapa
Copy link
Member

@adamretter I wil try to take a look into this

@adamretter adamretter changed the title [feature] Make eXist-db Java13 compliant [feature] Make eXist-db run on JDKs 12, 13 and 14 Sep 15, 2020
@adamretter adamretter changed the title [feature] Make eXist-db run on JDKs 12, 13 and 14 eXist-db does not run correctly on JDKs 12, 13 and 14 Sep 15, 2020
@adamretter
Copy link
Member

adamretter commented Sep 15, 2020

Looks like a JIT issue with HotSpot JDKs. Versions 12, 13, 14, and 15 are affected - https://github.com/adamretter/vbe-test#testing-results

eXist-db's Variable Byte Encoding implementation would need to be replaced to fix this at the eXist-db end.

@adamretter adamretter changed the title eXist-db does not run correctly on JDKs 12, 13 and 14 eXist-db does not run correctly on JDKs 12, 13, 14 and 15 Sep 15, 2020
@adamretter
Copy link
Member

Thanks to @reinhapa for helping us report the JDK issue - https://bugs.openjdk.java.net/browse/JDK-8253191

@dizzzz
Copy link
Member Author

dizzzz commented Oct 19, 2020

see #3545

@joewiz
Copy link
Member

joewiz commented Nov 23, 2020

During the community call @wolfgangmm said he wanted to have a look at this

@joewiz
Copy link
Member

joewiz commented Jan 4, 2021

During today's Community Call @wolfgangmm said he is looking at this

@dizzzz
Copy link
Member Author

dizzzz commented Apr 8, 2021

I'd vote to update the PR to ignore java 12-13-14-15 and pull this in as-is.

@line-o line-o modified the milestones: eXist-5.2.1, eXist-6.0.0 Jun 28, 2021
@StephanMa
Copy link
Contributor

Dear Team,

it seems that this issue was recently fixed (2020) for Java 15.0.2.
Unfortunately eXist is not able to run with Java15 because of "Error Code: 13".
Is this still intended?

@adamretter
Copy link
Member

@StephanMa Can you tell us which platform, which JDK, and what you are running to get Error Code: 13 please?

@StephanMa
Copy link
Contributor

Mac M1
macOS Big Sur 11.4
JDK 15.0.2
trying to start eXist via ./startup.sh

Building via maven works fine... but I cannot run it due error 13

@joewiz
Copy link
Member

joewiz commented Jun 28, 2021

@StephanMa Which JDK distribution?

@adamretter
Copy link
Member

@StephanMa Any chance of a screenshot showing the error 13?

@StephanMa
Copy link
Contributor

Will attach all the needed infos today

@StephanMa
Copy link
Contributor

Bildschirmfoto 2021-06-28 um 12 46 56
@adamretter Please see attached file

@adamretter
Copy link
Member

@StephanMa Ah ha! Thanks that explains it.

So eXist-db only checks the major Java version, see https://github.com/eXist-db/exist/pull/3545/files#diff-7c6977667d2de8c09c5d46280134525d516cff8a0a43552b042cea303dfe8819R30

If this is fixed in Java 15.0.2, then we should update the check to permit that version.

In the mean time, your options are JDK 8 - 11.

adamretter added a commit to adamretter/exist that referenced this issue Jun 29, 2021
@adamretter
Copy link
Member

@StephanMa I have a fix for you here - #3960

adamretter added a commit to adamretter/exist that referenced this issue Jun 29, 2021
@StephanMa
Copy link
Contributor

Thank you… will give it a try

@dizzzz
Copy link
Member Author

dizzzz commented Jun 29, 2021

I am sure we actually implemented this way on purpose; for most end-users the 3rd digit it just to complex to understand; it is much more clear just to block java 12,13,14 and 15 ; from a communication perspective imo this is better. Java15 is EOL and should not be used anyway.

@line-o
Copy link
Member

line-o commented Jun 29, 2021

I agree with @dizzzz the communications overhead we might get with this change does not justify the gain to support a patch of a Java version that is no longer supported anyway.
@StephanMa do you really need this?

adamretter added a commit to adamretter/exist that referenced this issue Jul 30, 2021
dizzzz added a commit to adamretter/exist that referenced this issue Aug 30, 2021
* 'develop' of github.com:eXist-db/exist:
  Bump caffeine from 2.9.1 to 2.9.2
  [bugfix] Make the Compatible Java Version Check more fine-grained. For example. JDK 15.0.2 should be ok now See eXist-db#3375
  Update IntelliJ run configurations for 5.4.0-SNAPSHOT
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release eXist-5.3.0
  Only run the github-release-plugin when mvn release:perform is performed
  Bump github-release-plugin from 1.1.1 to 1.4.0
  [fix] docker ci add  license check
  hotfix(docker): add license header to xml fixtures

# Conflicts:
#	exist-ant/pom.xml
#	exist-core/pom.xml
#	exist-distribution/pom.xml
#	exist-docker/pom.xml
#	exist-jetty-config/pom.xml
#	exist-parent/pom.xml
#	exist-samples/pom.xml
#	exist-service/pom.xml
#	exist-start/pom.xml
#	extensions/contentextraction/pom.xml
#	extensions/exiftool/pom.xml
#	extensions/expath/pom.xml
#	extensions/exquery/modules/pom.xml
#	extensions/exquery/modules/request/pom.xml
#	extensions/exquery/pom.xml
#	extensions/exquery/restxq/pom.xml
#	extensions/indexes/lucene/pom.xml
#	extensions/indexes/ngram/pom.xml
#	extensions/indexes/pom.xml
#	extensions/indexes/range/pom.xml
#	extensions/indexes/sort/pom.xml
#	extensions/indexes/spatial/pom.xml
#	extensions/modules/cache/pom.xml
#	extensions/modules/compression/pom.xml
#	extensions/modules/counter/pom.xml
#	extensions/modules/cqlparser/pom.xml
#	extensions/modules/example/pom.xml
#	extensions/modules/exi/pom.xml
#	extensions/modules/expathrepo/pom.xml
#	extensions/modules/file/pom.xml
#	extensions/modules/image/pom.xml
#	extensions/modules/jndi/pom.xml
#	extensions/modules/mail/pom.xml
#	extensions/modules/persistentlogin/pom.xml
#	extensions/modules/pom.xml
#	extensions/modules/process/pom.xml
#	extensions/modules/scheduler/pom.xml
#	extensions/modules/simpleql/pom.xml
#	extensions/modules/sql/pom.xml
#	extensions/modules/xmldiff/pom.xml
#	extensions/modules/xslfo/pom.xml
#	extensions/pom.xml
#	extensions/security/activedirectory/pom.xml
#	extensions/security/iprange/pom.xml
#	extensions/security/ldap/pom.xml
#	extensions/security/pom.xml
#	extensions/webdav/pom.xml
#	extensions/xqdoc/pom.xml
#	pom.xml
adamretter added a commit that referenced this issue Dec 13, 2021
@duncdrum
Copy link
Contributor

@adamretter @dizzzz i think this one can be closed

@adamretter
Copy link
Member

@duncdrum But the issue is not fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue confirmed as bug enhancement new features, suggestions, etc. high prio
Projects
None yet
Development

No branches or pull requests

7 participants