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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8, 18, 19, 20
    • core-libs
    • x86_64
    • windows_10

      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

            msheppar Mark Sheppard
            msheppar Mark Sheppard
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: