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

Switch to specific JDK version 21.0.1 #79

Merged
merged 1 commit into from
Feb 4, 2024
Merged

Conversation

MaisiKoleni
Copy link
Owner

@MaisiKoleni MaisiKoleni commented Feb 4, 2024

Check if this JDK difference in the builds is responsible for making the build work:

Resolved Java 21.0.1+12 from tool-cache
Setting Java 21.0.1+12 as the default
Creating toolchains.xml for JDK version 21 from temurin
Writing to /home/runner/.m2/toolchains.xml

Java configuration:
  Distribution: temurin
  Version: 21.0.1+12
  Path: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.1-12/x64

Or fail:

Resolved Java 21.0.2+13 from tool-cache
Setting Java 21.0.2+13 as the default
Creating toolchains.xml for JDK version 21 from temurin
Writing to /home/runner/.m2/toolchains.xml

Java configuration:
  Distribution: temurin
  Version: 21.0.2+13
  Path: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.2-13/x64

Maven reports:

Maven logs of failure
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running net.maisikoleni.javadoc.search.RankedTrieSearchEngineTest
2024-02-04 14:37:00,207 INFO  [net.mai.jav.db.DBManager] (main) Initialize Database
2024-02-04 14:37:00,455 INFO  [one.mic.uti.log.Logging] (main) MicroStream Version 08.01.01-MS-GA
2024-02-04 14:37:00,473 INFO  [one.mic.sto.emb.typ.EmbeddedStorageFoundation$Default] (main) Creating embedded storage manager
2024-02-04 14:37:00,584 INFO  [one.mic.per.typ.PersistenceTypeHandlerManager$Default] (main) Initializing type handler manager
2024-02-04 14:37:00,617 INFO  [one.mic.sto.emb.typ.EmbeddedStorageManager$Default] (main) Starting embedded storage manager
2024-02-04 14:37:00,619 INFO  [one.mic.sto.typ.StorageSystem$Default] (main) Starting storage system
2024-02-04 14:37:00,621 INFO  [one.mic.sto.typ.StorageStructureValidator$Default] (main) Storage structure validated successfully.
2024-02-04 14:37:00,640 INFO  [one.mic.per.typ.PersistenceTypeHandlerManager$Default] (main) Initializing type handler manager
2024-02-04 14:37:00,669 INFO  [one.mic.sto.emb.typ.EmbeddedStorageManager$Default] (main) Embedded storage manager initialized
2024-02-04 14:37:00,670 INFO  [one.mic.per.typ.PersistenceTypeHandlerManager$Default] (main) Initializing type handler manager
2024-02-04 14:37:00,671 INFO  [net.mai.jav.db.DBManager] (main) Database successfully initialized
2024-02-04 14:37:00,672 INFO  [net.mai.jav.ser.JavadocImpl] (main) Fetching JavadocIndex for jdk-latest
2024-02-04 14:37:00,679 WARN  [net.mai.jav.ser.JavadocImpl] (main) Fetching JavadocIndex as resource failed, loading it from the website: net.maisikoleni.javadoc.entities.JavadocIndex$JavadocIndexLoadException: java.lang.NullPointerException: Cannot invoke "java.io.InputStream.readAllBytes()" because "resourceStream" is null
2024-02-04 14:37:04,002 INFO  [net.mai.jav.db.PersistedJavadocIndexes] (main) Storing javadoc index for https://docs.oracle.com/en/java/javase/21/docs/api/
2024-02-04 14:37:04,322 INFO  [net.mai.jav.ser.JavadocImpl] (main) Creating JavadocImpl took 3650 ms.
2024-02-04 14:37:04,322 INFO  [net.mai.jav.ser.JavadocImpl] (main) Fetching JavadocIndex for junit5-latest
2024-02-04 14:37:04,325 WARN  [net.mai.jav.ser.JavadocImpl] (main) Fetching JavadocIndex as resource failed, loading it from the website: net.maisikoleni.javadoc.entities.JavadocIndex$JavadocIndexLoadException: java.lang.NullPointerException: Cannot invoke "java.io.InputStream.readAllBytes()" because "resourceStream" is null
2024-02-04 14:37:04,713 INFO  [net.mai.jav.db.PersistedJavadocIndexes] (main) Storing javadoc index for https://junit.org/junit5/docs/current/api/
2024-02-04 14:37:04,728 INFO  [net.mai.jav.ser.JavadocImpl] (main) Creating JavadocImpl took 406 ms.
2024-02-04 14:37:04,729 INFO  [net.mai.jav.ser.JavadocImpl] (main) Creating JavadocImpl took 1 ms.
2024-02-04 14:37:04,732 DEBUG [net.mai.jav.uti.WeakCommonPool] (main) New WeakCommonPool created.
double free or corruption (out)
Aborted (core dumped)
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:10 min
[INFO] Finished at: 2024-02-04T14:37:34Z
[INFO] ------------------------------------------------------------------------

instead of

Maven logs of success
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running net.maisikoleni.javadoc.search.RankedTrieSearchEngineTest
2024-01-29 05:46:36,759 INFO  [net.mai.jav.db.DBManager] (main) Initialize Database
2024-01-29 05:46:37,054 INFO  [one.mic.uti.log.Logging] (main) MicroStream Version 08.01.01-MS-GA
2024-01-29 05:46:37,073 INFO  [one.mic.sto.emb.typ.EmbeddedStorageFoundation$Default] (main) Creating embedded storage manager
2024-01-29 05:46:37,197 INFO  [one.mic.per.typ.PersistenceTypeHandlerManager$Default] (main) Initializing type handler manager
2024-01-29 05:46:37,235 INFO  [one.mic.sto.emb.typ.EmbeddedStorageManager$Default] (main) Starting embedded storage manager
2024-01-29 05:46:37,236 INFO  [one.mic.sto.typ.StorageSystem$Default] (main) Starting storage system
2024-01-29 05:46:37,238 INFO  [one.mic.sto.typ.StorageStructureValidator$Default] (main) Storage structure validated successfully.
2024-01-29 05:46:37,257 INFO  [one.mic.per.typ.PersistenceTypeHandlerManager$Default] (main) Initializing type handler manager
2024-01-29 05:46:37,287 INFO  [one.mic.sto.emb.typ.EmbeddedStorageManager$Default] (main) Embedded storage manager initialized
2024-01-29 05:46:37,287 INFO  [one.mic.per.typ.PersistenceTypeHandlerManager$Default] (main) Initializing type handler manager
2024-01-29 05:46:37,288 INFO  [net.mai.jav.db.DBManager] (main) Database successfully initialized
2024-01-29 05:46:37,290 INFO  [net.mai.jav.ser.JavadocImpl] (main) Fetching JavadocIndex for jdk-latest
2024-01-29 05:46:37,298 WARN  [net.mai.jav.ser.JavadocImpl] (main) Fetching JavadocIndex as resource failed, loading it from the website: net.maisikoleni.javadoc.entities.JavadocIndex$JavadocIndexLoadException: java.lang.NullPointerException: Cannot invoke "java.io.InputStream.readAllBytes()" because "resourceStream" is null
2024-01-29 05:46:40,191 INFO  [net.mai.jav.db.PersistedJavadocIndexes] (main) Storing javadoc index for https://docs.oracle.com/en/java/javase/21/docs/api/
2024-01-29 05:46:40,468 INFO  [net.mai.jav.ser.JavadocImpl] (main) Creating JavadocImpl took 3179 ms.
2024-01-29 05:46:40,468 INFO  [net.mai.jav.ser.JavadocImpl] (main) Fetching JavadocIndex for junit5-latest
2024-01-29 05:46:40,470 WARN  [net.mai.jav.ser.JavadocImpl] (main) Fetching JavadocIndex as resource failed, loading it from the website: net.maisikoleni.javadoc.entities.JavadocIndex$JavadocIndexLoadException: java.lang.NullPointerException: Cannot invoke "java.io.InputStream.readAllBytes()" because "resourceStream" is null
2024-01-29 05:46:40,833 INFO  [net.mai.jav.db.PersistedJavadocIndexes] (main) Storing javadoc index for https://junit.org/junit5/docs/current/api/
2024-01-29 05:46:40,892 INFO  [net.mai.jav.ser.JavadocImpl] (main) Creating JavadocImpl took 424 ms.
2024-01-29 05:46:40,893 INFO  [net.mai.jav.ser.JavadocImpl] (main) Creating JavadocImpl took 0 ms.
2024-01-29 05:46:40,897 DEBUG [net.mai.jav.uti.WeakCommonPool] (main) New WeakCommonPool created.
2024-01-29 05:46:43,354 INFO  [net.mai.jav.sea.TrieGenerator] (ForkJoinPool-2-worker-1) Constructing trie took 2333 ms (trie: RankedConcurrentTrie, parallel: true)
...
The logs don't show any significant difference up to the point the JVM crashed.

The timing might be interesting here:

2024-02-04T14:37:04.8002780Z 2024-02-04 14:37:04,732 DEBUG [net.mai.jav.uti.WeakCommonPool] (main) New WeakCommonPool created.
2024-02-04T14:37:05.3426445Z double free or corruption (out)
2024-02-04T14:37:34.8898881Z Aborted (core dumped)

compared to

2024-01-29T05:46:40.9058250Z 2024-01-29 05:46:40,897 DEBUG [net.mai.jav.uti.WeakCommonPool] (main) New WeakCommonPool created.
2024-01-29T05:46:43.4208098Z 2024-01-29 05:46:43,354 INFO  [net.mai.jav.sea.TrieGenerator] (ForkJoinPool-2-worker-1) Constructing trie took 2333 ms (trie: RankedConcurrentTrie, parallel: true)

This will require further investigation. (Could be related to low-level code)

@MaisiKoleni MaisiKoleni added the github_actions Pull requests that update GitHub Actions code label Feb 4, 2024
Copy link

sonarcloud bot commented Feb 4, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@MaisiKoleni MaisiKoleni marked this pull request as ready for review February 4, 2024 15:05
@MaisiKoleni MaisiKoleni self-assigned this Feb 4, 2024
@MaisiKoleni MaisiKoleni added bug Something isn't working java Pull requests that update Java code labels Feb 4, 2024
@MaisiKoleni MaisiKoleni merged commit c9cbe8c into main Feb 4, 2024
4 checks passed
@MaisiKoleni MaisiKoleni deleted the fix-broken-jdk-21-build branch February 4, 2024 15:18
@MaisiKoleni
Copy link
Owner Author

MaisiKoleni commented Feb 4, 2024

On Windows, I get with

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running net.maisikoleni.javadoc.search.RankedTrieSearchEngineTest
2024-02-04 16:34:17,569 INFO  [net.mai.jav.db.DBManager] (main) Initialize Database
2024-02-04 16:34:17,873 INFO  [one.mic.uti.log.Logging] (main) MicroStream Version 08.01.01-MS-GA
2024-02-04 16:34:17,889 INFO  [one.mic.sto.emb.typ.EmbeddedStorageFoundation$Default] (main) Creating embedded storage manager
2024-02-04 16:34:18,029 INFO  [one.mic.per.typ.PersistenceTypeHandlerManager$Default] (main) Initializing type handler manager
2024-02-04 16:34:18,114 INFO  [one.mic.sto.emb.typ.EmbeddedStorageManager$Default] (main) Starting embedded storage manager
2024-02-04 16:34:18,116 INFO  [one.mic.sto.typ.StorageSystem$Default] (main) Starting storage system
2024-02-04 16:34:18,119 INFO  [one.mic.sto.typ.StorageStructureValidator$Default] (main) Storage structure validated successfully.
2024-02-04 16:34:18,313 INFO  [one.mic.per.typ.PersistenceTypeHandlerManager$Default] (main) Initializing type handler manager
2024-02-04 16:34:18,334 INFO  [one.mic.sto.emb.typ.EmbeddedStorageManager$Default] (main) Embedded storage manager initialized
2024-02-04 16:34:18,335 INFO  [one.mic.per.typ.PersistenceTypeHandlerManager$Default] (main) Initializing type handler manager
2024-02-04 16:34:18,340 INFO  [net.mai.jav.db.DBManager] (main) Database successfully initialized
2024-02-04 16:34:18,511 INFO  [net.mai.jav.ser.JavadocImpl] (main) Creating JavadocImpl took 170 ms.
2024-02-04 16:34:18,521 INFO  [net.mai.jav.ser.JavadocImpl] (main) Creating JavadocImpl took 10 ms.
2024-02-04 16:34:18,521 INFO  [net.mai.jav.ser.JavadocImpl] (main) Creating JavadocImpl took 0 ms.
2024-02-04 16:34:18,527 DEBUG [net.mai.jav.uti.WeakCommonPool] (main) New WeakCommonPool created.
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[WARNING] Corrupted channel by directly writing to native stream in forked JVM 1. See FAQ web page and the dump file K:\Java\gitRep\javadoc-search\target\surefire-reports\2024-02-04T16-34-11_819-jvmRun1.dumpstream
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.875 s
[INFO] Finished at: 2024-02-04T16:34:18+01:00
[INFO] ------------------------------------------------------------------------

with JDK Temurin 21.0.2+13 (Hotspot).

@MaisiKoleni
Copy link
Owner Author

Apparently, the actual crash report is:

# 
# A fatal error has been detected by the Java Runtime Environment:
# 
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff872fb5bb6, pid=3908, tid=22876
# 
# JRE version: OpenJDK Runtime Environment Temurin-21.0.2+13 (21.0.2+13) (build 21.0.2+13-LTS)
# Java VM: OpenJDK 64-Bit Server VM Temurin-21.0.2+13 (21.0.2+13-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C  [ntdll.dll+0x25bb6]
# 
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
# 
# An error report file with more information is saved as:
# <<path to project>>\javadoc-search\hs_err_pid3908.log
[6.540s][warning][os] Loading hsdis library failed
# 
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
# 

(on Windows).

@MaisiKoleni
Copy link
Owner Author

Seems to relate to this bug reported by microstream / eclipse store here: adoptium/adoptium-support#1015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working github_actions Pull requests that update GitHub Actions code java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant