Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8276135

Intermittent failure of java/nio/file/WatchService/MayFlies.java missing DELETE events

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 18
    • Fix Version/s: tbd
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_10

      Description

      Example failure is that the test throws RuntimeException
      102 ENTRY_CREATE events read
      result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Missed 3 DELETE event(s)


      test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Missed 3 DELETE event(s)

      while additional log details show

      ----------System.err:(29/1791)*----------
      Unable to visit t:\\testoutput\\test-support\\jtreg_open_test_jdk_tier2\\tmp\\name14574152795987159851\\swimmer30: java.nio.file.NoSuchFileException: t:\\testoutput\\test-support\\jtreg_open_test_jdk_tier2\\tmp\\name14574152795987159851\\swimmer30
      java.lang.RuntimeException: Missed 3 DELETE event(s)
      at MayFlies.main(MayFlies.java:168)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:51)
      at java.base/java.lang.reflect.Method.invoke(Method.java:569)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
      at java.base/java.lang.Thread.run(Thread.java:833)

      JavaTest Message: Test threw exception: java.lang.RuntimeException
      JavaTest Message: shutting down test

      java.lang.InterruptedException: sleep interrupted
      at java.base/java.lang.Thread.sleep(Native Method)
      at MayFlies$MayFlyHatcher.run(MayFlies.java:73)
      at java.base/java.lang.Thread.run(Thread.java:833)
      java.lang.InterruptedException: sleep interrupted
      at java.base/java.lang.Thread.sleep(Native Method)
      at MayFlies$MayFlyHatcher.run(MayFlies.java:73)
      at java.base/java.lang.Thread.run(Thread.java:833)
      java.lang.InterruptedException: sleep interrupted
      at java.base/java.lang.Thread.sleep(Native Method)
      at MayFlies$MayFlyHatcher.run(MayFlies.java:73)
      at java.base/java.lang.Thread.run(Thread.java:833)
      java.lang.InterruptedException: sleep interrupted
      at java.base/java.lang.Thread.sleep(Native Method)
      at MayFlies$MayFlyHatcher.run(MayFlies.java:73)
      at java.base/java.lang.Thread.run(Thread.java:833)

      there appears to be a potential synchronicity issue across the threads in the test. The hatcher threads are sleeping when the stop is delivered, and by the time they run, the main has processed the test outcomes, but some hatchers have yet to delete existing files and so the watchers appear to miss DELETE events.

      some tidy up of the FINISH state in the main, to reap the hatcher threads and do a final processing of polled events

        Attachments

          Activity

            People

            Assignee:
            msheppar Mark Sheppard
            Reporter:
            msheppar Mark Sheppard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: