Julian Hyde created CALCITE-6602: ------------------------------------ Summary: Deadlock while loading class SqlTypeFixture Key: CALCITE-6602 URL: https://issues.apache.org/jira/browse/CALCITE-6602 Project: Calcite Issue Type: Bug Affects Versions: 1.37.0 Reporter: Julian Hyde
I am seeing deadlocks during initialization of {{interface RelDataTypeSystem}} and {{class RelDataTypeSystemImpl}}. The command {{./gradlew :core:test --tests RelDataTypeSystemTest}} hangs about 90% of the time for me. Here's part of the thread dump running under JDK 21. {noformat} "ForkJoinPool-1-worker-7" #30 [1161671] daemon prio=5 os_prio=0 cpu=8.26ms elapsed=19.26s tid=0x00007d08b0000ff0 nid=1161671 waiting on condition [0x00007d098b3fd000] java.lang.Thread.State: RUNNABLE at org.apache.calcite.sql.type.SqlTypeFixture.<init>(SqlTypeFixture.java:28) - waiting on the Class initialization monitor for org.apache.calcite.rel.type.RelDataTypeSystem at org.apache.calcite.sql.type.RelDataTypeSystemTest$Fixture.<init>(RelDataTypeSystemTest.java:143) at org.apache.calcite.sql.type.RelDataTypeSystemTest.testCustomDecimalModReturnTypeInference(RelDataTypeSystemTest.java:310) at java.lang.invoke.LambdaForm$DMH/0x00007d0934160400.invokeVirtual(java.base@21/LambdaForm$DMH) ... at java.util.concurrent.ForkJoinWorkerThread.run(java.base@21/ForkJoinWorkerThread.java:188) "ForkJoinPool-1-worker-8" #31 [1161672] daemon prio=5 os_prio=0 cpu=7.33ms elapsed=19.26s tid=0x00007d08a8000ff0 nid=1161672 waiting on condition [0x00007d098b2fc000] java.lang.Thread.State: RUNNABLE at org.apache.calcite.rel.type.RelDataTypeSystem.<clinit>(RelDataTypeSystem.java:38) - waiting on the Class initialization monitor for org.apache.calcite.rel.type.RelDataTypeSystemImpl at org.apache.calcite.sql.type.SqlTypeFixture.<init>(SqlTypeFixture.java:28) at org.apache.calcite.sql.type.RelDataTypeSystemTest$Fixture.<init>(RelDataTypeSystemTest.java:143) at org.apache.calcite.sql.type.RelDataTypeSystemTest.testDecimalModReturnTypeInference(RelDataTypeSystemTest.java:229) ... {noformat} Occurs in current main (commit [a8802c7|https://github.com/apache/calcite/commit/a8802c721a2805159d166e45044c00364d1cb6c3]). Not a high priority. Just documenting that this bug exists. Hopefully it only exists when running tests. -- This message was sent by Atlassian Jira (v8.20.10#820010)