Details

    • Subcomponent:
    • Introduced In Version:
      9
    • CPU:
      x86_64
    • OS:
      linux

      Description

      FULL PRODUCT VERSION :
      JDK 1.9.0b71

      ADDITIONAL OS VERSION INFORMATION :
      OS X 10.10.3
      Linux codex 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
      A unit test from Elasticsearch tries to use the Joda-time library to parse a date string, "Jan 02 10:00:00" with the format "MMM dd HH:mm:ss". When running this test through a debugger, it can be seen that the call to find the length of the current subsection of the format using Math.min, when passed arguments 15 and 3, returns 13. This is on line 1761 of org.joda.time.format.DateTimeFormatterBuilder. It is possible this is due to stack corruption and that the debugger introspection cannot be trusted.

      REGRESSION. Last worked in version 9

      ADDITIONAL REGRESSION INFORMATION:
      The test passes on EA releases before b71. It also passes on Java 8. And the test fails on Java 9, when the build was done with either Java 8 or Java 9.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Clone https://github.com/elastic/elasticsearch/.

      Run the following command within core/
      mvn test -Dtests.seed=16358F4F01D5CE00 -Dtests.class=org.elasticsearch.index.mapper.date.SimpleDateMappingTests -Dtests.method=testDayWithoutYearFormat

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The test should pass. Specifically, Math.min(15, 3) should return 3.
      ACTUAL -
      The test fails. Math.min(15,3) returns 12, which cause the loop

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      There are no workarounds I have found so far. The test still fails using -Xint.

        Attachments

        1. Log_JDK9_Build_105.txt
          11 kB
        2. MathMin.java
          0.2 kB
        3. results.txt
          30 kB
        4. testDayWithoutYearFormat-log.txt
          15 kB

          Activity

            People

            • Assignee:
              bpb Brian Burkhalter
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: