Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6602

Deadlock while loading class SqlTypeFixture

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.37.0
    • None
    • None
    • None

    Description

      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.
       

      "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)
      ... 

       
      Occurs in current main (commit a8802c7).

      Not a high priority. Just documenting that this bug exists. Hopefully it only exists when running tests.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            julianhyde Julian Hyde

            Dates

              Created:
              Updated:

              Slack

                Issue deployment