Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-2524

scalafmt incompatible with jdk8 older than u25

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.8.0
    • None
    • java
    • None

    Description

      We're seeing a fair number of Gradle build failures in scalafmt with the following output:

      1: Task failed with an exception.
      -----------
      * What went wrong:
      Execution failed for task ':kudu-spark:scalafmt'.
      > Uninitialized object exists on backward branch 209
        Exception Details:
          Location:
            scala/collection/immutable/HashMap$HashTrieMap.split()Lscala/collection/immutable/Seq; @249: goto
          Reason:
            Error exists in the bytecode
          Bytecode:
            0000000: 2ab6 005b 04a0 001e b200 b3b2 00b8 04bd
            0000010: 0002 5903 2a53 c000 bab6 00be b600 c2c0
            0000020: 00c4 b02a b600 31b8 003b 3c1b 04a4 015e
            0000030: 1b05 6c3d 2a1b 056c 2ab6 0031 b700 c63e
            0000040: 2ab6 0031 021d 787e 3604 2ab6 0031 0210
            0000050: 201d 647c 7e36 05bb 0014 59b2 00b8 2ab6
            0000060: 0033 c000 bab6 00ca b700 cd1c b600 d13a
            0000070: 0619 06c6 001a 1906 b600 d5c0 0081 3a07
            0000080: 1906 b600 d8c0 0081 3a08 a700 0dbb 00da
            0000090: 5919 06b7 00dd bf19 073a 0919 083a 0abb
            00000a0: 0002 5915 0419 09bb 0014 59b2 00b8 1909
            00000b0: c000 bab6 00ca b700 cd03 b800 e33a 0e3a
            00000c0: 0d03 190d b900 e701 0019 0e3a 1136 1036
            00000d0: 0f15 0f15 109f 0027 150f 0460 1510 190d
            00000e0: 150f b900 ea02 00c0 0005 3a17 1911 1917
            00000f0: b800 ee3a 1136 1036 0fa7 ffd8 1911 b800
            0000100: f2b7 0060 3a0b bb00 0259 1505 190a bb00
            0000110: 1459 b200 b819 0ac0 00ba b600 cab7 00cd
            0000120: 03b8 00e3 3a13 3a12 0319 12b9 00e7 0100
            0000130: 1913 3a16 3615 3614 1514 1515 9f00 2715
            0000140: 1404 6015 1519 1215 14b9 00ea 0200 c000
            0000150: 053a 1819 1619 18b8 00f5 3a16 3615 3614
            0000160: a7ff d819 16b8 00f2 b700 603a 0cb2 00fa
            0000170: b200 b805 bd00 0259 0319 0b53 5904 190c
            0000180: 53c0 00ba b600 beb6 00fd b02a b600 3303
            0000190: 32b6 00ff b0                           
          Stackmap Table:
            same_frame(@35)
            full_frame(@141,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#109]},{})
            append_frame(@151,Object[#129],Object[#129])
            full_frame(@209,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#109],Object[#129],Object[#129],Object[#129],Object[#129],Top,Top,Object[#20],Object[#55],Integer,Integer,Object[#107]},{Uninitialized[#159],Uninitialized[#159],Integer,Object[#129]})
            full_frame(@252,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#109],Object[#129],Object[#129],Object[#129],Object[#129],Top,Top,Object[#20],Object[#55],Integer,Integer,Object[#107]},{Uninitialized[#159],Uninitialized[#159],Integer,Object[#129]})
            full_frame(@312,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#109],Object[#129],Object[#129],Object[#129],Object[#129],Object[#2],Top,Object[#20],Object[#55],Integer,Integer,Object[#107],Object[#20],Object[#55],Integer,Integer,Object[#107]},{Uninitialized[#262],Uninitialized[#262],Integer,Object[#129]})
            full_frame(@355,{Object[#2],Integer,Integer,Integer,Integer,Integer,Object[#109],Object[#129],Object[#129],Object[#129],Object[#129],Object[#2],Top,Object[#20],Object[#55],Integer,Integer,Object[#107],Object[#20],Object[#55],Integer,Integer,Object[#107]},{Uninitialized[#262],Uninitialized[#262],Integer,Object[#129]})
            full_frame(@395,{Object[#2],Integer},{})

      This appears to be due to this JDK issue, which was fixed in JDK 8u25.

      And sure enough, here's the JDK version for failing builds:

      -- Found Java: /opt/toolchain/sun-jdk-64bit-1.8.0.05/bin/java (found suitable version "1.8.0.05", minimum required is "1.7")
      

      And here it is for successful builds:

      19:06:12 -- Found Java: /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java (found suitable version "1.8.0.111", minimum required is "1.7") 
      

      We either need to blacklist JDK8 versions older than u25, or we need to condition the scalafmt step on the JDK version.

      Attachments

        Activity

          People

            Unassigned Unassigned
            adar Adar Dembo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: