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

Build, test and ship with JDK 21 #225

Merged
merged 1 commit into from
Mar 22, 2024
Merged

Build, test and ship with JDK 21 #225

merged 1 commit into from
Mar 22, 2024

Conversation

wendigo
Copy link
Contributor

@wendigo wendigo commented Jan 31, 2024

On top of the #224

Fixes #79

@mosabua
Copy link
Member

mosabua commented Jan 31, 2024

We will discuss this as the next dev sync.

Probably also needs an update in the docker container build setup though.

@wendigo
Copy link
Contributor Author

wendigo commented Jan 31, 2024

@mosabua it's already updated.

@wendigo
Copy link
Contributor Author

wendigo commented Jan 31, 2024

It wouldn't work as the class file format have changed to 65. Docker build validates whether gateway starts.

.java-version Show resolved Hide resolved
@wendigo
Copy link
Contributor Author

wendigo commented Jan 31, 2024

And in the docker build logs:

#7 [jdk-download 2/2] RUN     set -xeuo pipefail &&     microdnf install -y tar gzip &&     echo "Downloading JDK from https://api.adoptium.net/v3/binary/version/jdk-21.0.1+12/linux/ppc64le/jdk/hotspot/normal/eclipse?project=jdk" &&     mkdir -p "/usr/lib/jvm/jdk-21.0" &&     curl -#LfS "https://api.adoptium.net/v3/binary/version/jdk-21.0.1+12/linux/ppc64le/jdk/hotspot/normal/eclipse?project=jdk" | tar -zx --strip 1 -C "/usr/lib/jvm/jdk-21.0"

.github/workflows/ci.yml Show resolved Hide resolved
.java-version Show resolved Hide resolved
Copy link
Member

@Chaho12 Chaho12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@@ -1 +1 @@
17.0.9
21.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is much convenient without having patch version 👍

@wendigo
Copy link
Contributor Author

wendigo commented Feb 21, 2024

@mosabua ready to merge?

@mosabua
Copy link
Member

mosabua commented Feb 21, 2024

We said we will hold for a few releases .. and just got 6 out. Maybe after 7 or 8 .. we did not agree to merge in todays dev sync so lets hold for now and put it on as discussion item for next dev sync

@willmostly
Copy link
Contributor

I observed a SEGV during the test phase when using OpenJDK 64-Bit Server VM Temurin-21.0.2+13 (build 21.0.2+13-LTS, mixed mode) in combination with Docker Desktop on an M1 Mac. Using Temurin Java 21 with Orbstack or Temurin Java 17 with Docker Desktop built successfully.

I don't think this should be a blocker, but it would be a good idea IMO for others to test.

In case it is interesting, the crash report included the below. I can share more if it is interesting to anyone

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_PROTECTION_FAILURE at 0x000000016ef33c80
Exception Codes:       0x0000000000000002, 0x000000016ef33c80

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [794]

VM Region Info: 0x16ef33c80 is in 0x16b730000-0x16ef34000;  bytes after start: 58735744  bytes before end: 895
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      MALLOC_MEDIUM (reserved)    167800000-168000000    [ 8192K] rw-/rwx SM=NUL  ...(unallocated)
      GAP OF 0x3730000 BYTES
--->  STACK GUARD                 16b730000-16ef34000    [ 56.0M] ---/rwx SM=NUL  ... for thread 0
      Stack                       16ef34000-16f730000    [ 8176K] rw-/rwx SM=PRV  thread 0

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000001268   x1: 0x00000001280574a0   x2: 0x000000000000dcd8   x3: 0x0000000000000e91
    x4: 0x00000001282a7d40   x5: 0x0000000000000088   x6: 0x0000000000005200   x7: 0x0000000000000000
    x8: 0x0000000000001d28   x9: 0x000000000000fa00  x10: 0x0000000128050000  x11: 0x000000000000007f
   x12: 0x0000000000000050  x13: 0x00000001590392f0  x14: 0x023e0001ea2481a1  x15: 0x00000001ea2481a0
   x16: 0xe26300018eaaef88  x17: 0x00000001007947a0  x18: 0x0000000000000000  x19: 0x000000016f72d0a0
   x20: 0x00000001280574a0  x21: 0x0000000000001268  x22: 0x0000000000000001  x23: 0x0000000000000000
   x24: 0x0000000000001d28  x25: 0xffffffffffffffff  x26: 0x00000000141300c9  x27: 0x0000600003c44190
   x28: 0x6d5900018fb6a390   fp: 0x000000016ef340e0   lr: 0xed0600010070a79c
    sp: 0x000000016ef33c90   pc: 0x000000018eaaef8c cpsr: 0x20001000
   far: 0x000000016ef33c80  esr: 0x92000047 (Data Abort) byte write Translation fault

@oneonestar
Copy link
Member

Can't reproduce the problem using OpenJDK 64-Bit Server VM Temurin-21.0.2+13 (build 21.0.2+13-LTS, mixed mode, sharing) on Ubuntu 22.04.4 LTS.

➜  trino-gateway git:(serafin/jdk-21) $JAVA_HOME/bin/java -version
openjdk version "21.0.2" 2024-01-16 LTS
OpenJDK Runtime Environment Temurin-21.0.2+13 (build 21.0.2+13-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.2+13 (build 21.0.2+13-LTS, mixed mode, sharing)

➜  trino-gateway git:(serafin/jdk-21) $ ./mvnw clean test
...
[INFO] Results:
[INFO] 
[INFO] Tests run: 98, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for trino-gateway-parent 6-SNAPSHOT:
[INFO] 
[INFO] trino-gateway-parent ............................... SUCCESS [  1.613 s]
[INFO] gateway-ha ......................................... SUCCESS [01:20 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:22 min
[INFO] Finished at: 2024-03-09T17:54:23+09:00
[INFO] ------------------------------------------------------------------------

@mosabua
Copy link
Member

mosabua commented Mar 22, 2024

Time to get this in! 💥

@mosabua mosabua merged commit 59469c6 into main Mar 22, 2024
2 checks passed
@mosabua mosabua deleted the serafin/jdk-21 branch March 22, 2024 16:13
@github-actions github-actions bot added this to the 8 milestone Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Update to Java 21
6 participants