Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9083

TestIOUtils false failures on Linux due to StackOverflowError when Lucene is installed under /dev/shm

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: main (9.0)
    • Fix Version/s: 8.5
    • Component/s: core/store
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      I'm testing Lucene's performance on the new Graviton2 ARM EC2 instances, specifically on an m6g.8xlarge instance.

      But several test cases in TestIOUtils failed due to StackOverflowError, e.g.:

         [junit4] <JUnit4> says aloha! Master seed: 7AF4595BAD680884
         [junit4] Executing 1 suite with 1 JVM.
         [junit4]
         [junit4] Started J0 PID(28011@localhost).
         [junit4] Suite: org.apache.lucene.util.TestIOUtils
         [junit4] OK      0.03s | TestIOUtils.testDeleteFileIgnoringExceptions
         [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestIOUtils -Dtests.method=testRotatingPlatters -Dtests.seed=7AF4595BAD680884 -Dtests.slow=true -Dtests.badapples=true -D\
      tests.locale=lu -Dtests.timezone=America/Lower_Princes -Dtests.asserts=true -Dtests.file.encoding=US-ASCII
         [junit4] ERROR   65.1s | TestIOUtils.testRotatingPlatters <<<
         [junit4]    > Throwable #1: java.lang.StackOverflowError
         [junit4]    >        at __randomizedtesting.SeedInfo.seed([7AF4595BAD680884:ADC8742ECA7CAFC1]:0)
         [junit4]    >        at java.base/sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:564)
         [junit4]    >        at java.base/java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:576)
         [junit4]    >        at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:136)
         [junit4]    >        at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)
         [junit4]    >        at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:280)
         [junit4]    >        at java.base/java.nio.file.Path.startsWith(Path.java:379)
         [junit4]    >        at org.apache.lucene.mockfile.FilterPath.startsWith(FilterPath.java:130)
         [junit4]    >        at org.apache.lucene.util.TestIOUtils$MockLinuxFileSystemProvider.maybeChroot(TestIOUtils.java:246)
         [junit4]    >        at org.apache.lucene.util.TestIOUtils$MockLinuxFileSystemProvider$MockLinuxPath.toRealPath(TestIOUtils.java:266)
         [junit4]    >        at org.apache.lucene.util.TestIOUtils$MockLinuxFileSystemProvider$MockLinuxPath.toRealPath(TestIOUtils.java:270)
         [junit4]    >        at org.apache.lucene.util.TestIOUtils$MockLinuxFileSystemProvider$MockLinuxPath.toRealPath(TestIOUtils.java:270)
         [junit4]    >        at org.apache.lucene.util.TestIOUtils$MockLinuxFileSystemProvider$MockLinuxPath.toRealPath(TestIOUtils.java:270)
      

      Also, I've installed Lucene on tmpfs (/dev/shm), and maybe that (and not ARM Linux) is to blame? Maybe it's just a silly bug in the MockLinuxPath in TestIOUtils.java .. it calls maybeChroot which looks to special case any path starting with /dev ... I'll try Lucene on /dev/shm on an x64 Linux to see ... all other core tests seem to pass at least once!

      I'm using OpenJDK11 build from https://adoptopenjdk.net

        Attachments

        1. LUCENE-9083.patch
          2 kB
          Robert Muir

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikemccand Michael McCandless
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: