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

Copy file with attributes failed to copy permissions on Mac

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • generic
    • os_x

      java/nio/file/Files/CopyAndMove.java failed with an assertion:

      #section:main
      ----------messages:(4/152)----------
      command: main CopyAndMove
      reason: User specified action: run main/othervm CopyAndMove
      Mode: othervm [/othervm specified]
      elapsed time (seconds): 0.821
      ----------configuration:(0/0)----------
      ----------System.out:(1/47)----------
      Seed from RandomFactory = 1472854907144459095L
      ----------System.err:(17/1004)----------
      java.lang.RuntimeException: Assertion failed
      at CopyAndMove.assertTrue(CopyAndMove.java:1113)
      at CopyAndMove.checkPosixAttributes(CopyAndMove.java:120)
      at CopyAndMove.copyAndVerify(CopyAndMove.java:661)
      at CopyAndMove.testCopyFileToFile(CopyAndMove.java:776)
      at CopyAndMove.main(CopyAndMove.java:69)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
      at java.base/java.lang.Thread.run(Thread.java:832)

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

      Looking at the code around the backtrace, it copied a file with COPY_ATTRIBUTES and unexpectedly found the permissions to be different.

      This failure happened on a Mac. This was a couple of days after JDK-8204576 was pushed.

        There are no Sub-Tasks for this issue.

            bpb Brian Burkhalter
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: