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

JPRT unable to clean-up after tests that leave file trees with loops

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b89
    • Verification:
      Verified

      Description

      Tim Bell writes:


      I found a Solaris JPRT client in the same state, so we have some better diagnostic tools:



      "ClientWork" prio=3 tid=0x00412800 nid=0xdf7 runnable [0xd68cf000]
         java.lang.Thread.State: RUNNABLE
              at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
              at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
              at java.io.File.isDirectory(File.java:754)
              at jprt.shared.NetworkFile.getDirectoryList(NetworkFile.java:781)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:834)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:835)
              at jprt.shared.NetworkFile.getAllFileList(NetworkFile.java:829)
              at jprt.shared.external.AbstractRunCommand.getAllCrashFiles(AbstractRunCommand.java:197)
              at jprt.shared.external.AbstractRunCommand.run(AbstractRunCommand.java:234)
              at jprt.shared.external.RunTestCommand.run(RunTestCommand.java:121)
              at jprt.client.ClientWork.testCurrentTarget(ClientWork.java:367)
              at jprt.client.ClientWork.run(ClientWork.java:217)
              at java.lang.Thread.run(Thread.java:662)










      truss quickly showed me:

      /3575: fcntl(15, F_SETFD, 0x00000001) = 0
      /3575: fstat64(15, 0xD68CEFA0) = 0
      /3575: brand_specific#131(0x0000000F, 0x001D1FAC, 0x00014C9C, 0x00000001, 0x00082500) = 0
      /3575: getdents64(15, 0xFF1B4000, 8192) = 192
      /3575: brand_specific#131(0x0000000F, 0xF127BF24, 0x00014C9C, 0x00000001, 0x00082500) = 0
      /3575: getdents64(15, 0xFF1B4000, 8192) = 0
      /3575: close(15) = 0
      /3575: stat64("/tmp/jprt/P1/060549.dan/io/solaris_sparc-product-c1-jdk_nio/tree4002765573426770684/dir2/dir4/link2/link1/link2/link1/link1/link1/link1/link1/link2/link2/link2/link1/link1/link2/link1/link2/link2/link1/link2/link1/file2", 0xD68CF020) = 0
      /3575: stat64("/tmp/jprt/P1/060549.dan/io/solaris_sparc-product-c1-jdk_nio/tree4002765573426770684/dir2/dir4/link2/link1/link2/link1/link1/link1/link1/link1/link2/link2/link2/link1/link1/link2/link1/link2/link2/link1/link2/link1/file3", 0xD68CF020) = 0
      /3575: stat64("/tmp/jprt/P1/060549.dan/io/solaris_sparc-product-c1-jdk_nio/tree4002765573426770684/dir2/dir4/link2/link1/link2/link1/link1/link1/link1/link1/link2/link2/link2/link1/link1/link2/link1/link2/link2/link1/link2/link1/file4", 0xD68CF020) = 0
      /3575: stat64("/tmp/jprt/P1/060549.dan/io/solaris_sparc-product-c1-jdk_nio/tree4002765573426770684/dir2/dir4/link2/link1/link2/link1/link1/link1/link1/link1/link2/link2/link2/link1/link1/link2/link1/link2/link2/link1/link2/link1/file8", 0xD68CF020) = 0
      /3575: stat64("/tmp/jprt/P1/060549.dan/io/solaris_sparc-product-c1-jdk_nio/tree4002765573426770684/dir2/dir4/link2/link1/link2/link1/link1/link1/link1/link1/link2/link2/link2/link1/link1/link2/link1/link2/link2/link1/link2/link1/link1", 0xD68CF020) Err#90 ELOOP
      /3575: stat64("/tmp/jprt/P1/060549.dan/io/solaris_sparc-product-c1-jdk_nio/tree4002765573426770684/dir2/dir4/link2/link1/link2/link1/link1/link1/link1/link1/link2/link2/link2/link1/link1/link2/link1/link2/link2/link1/link2/link1/link2", 0xD68CF020) Err#90 ELOOP
      /3575: stat64("/tmp/jprt/P1/060549.dan/io/solaris_sparc-product-c1-jdk_nio/tree4002765573426770684/dir2/dir4/link2/link1/link2/link1/link1/link1/link1/link1/link2/link2/link2/link1/link1/link2/link1/link2/link2/link1/link2/link1", 0xD68CF088) = 0
      /3575: open("/tmp/jprt/P1/060549.dan/io/solaris_sparc-product-c1-jdk_nio/tree4002765573426770684/dir2/dir4/link2/link1/link2/link1/link1/link1/link1/link1/link2/link2/link2/link1/link1/link2/link1/link2/link2/link1/link2/link1", O_RDONLY|O_NDELAY|O_LARGEFILE) = 15



      Taking a look at the job directory shows symlinks pointing back to the same place:

      jprtadm@sca00adw:/tmp/jprt/P1/060549.dan/io/solaris_sparc-product-c1-jdk_nio/tree4002765573426770684/dir2/dir4> pwd
      /tmp/jprt/P1/060549.dan/io/solaris_sparc-product-c1-jdk_nio/tree4002765573426770684/dir2/dir4
      jprtadm@sca00adw:/tmp/jprt/P1/060549.dan/io/solaris_sparc-product-c1-jdk_nio/tree4002765573426770684/dir2/dir4> ls -al
      total 64
      drwxrwxr-x 2 jprtadm jprtgrp 489 Apr 30 00:54 .
      drwxrwxr-x 3 jprtadm jprtgrp 366 Apr 30 00:54 ..
      -rw-rw-r-- 1 jprtadm jprtgrp 0 Apr 30 00:54 file2
      -rw-rw-r-- 1 jprtadm jprtgrp 0 Apr 30 00:54 file3
      -rw-rw-r-- 1 jprtadm jprtgrp 0 Apr 30 00:54 file4
      -rw-rw-r-- 1 jprtadm jprtgrp 0 Apr 30 00:54 file8
      lrwxrwxrwx 1 jprtadm jprtgrp 93 Apr 30 00:54 link1 -> /tmp/jprt/P1/060549.dan/io/solaris_sparc-product-c1-jdk_nio/tree4002765573426770684/dir2/dir4
      lrwxrwxrwx 1 jprtadm jprtgrp 93 Apr 30 00:54 link2 -> /tmp/jprt/P1/060549.dan/io/solaris_sparc-product-c1-jdk_nio/tree4002765573426770684/dir2/dir4


      I am thinking that when JPRT is in getAllCrashFiles() at the cleanup phase after a job, it should ignore symlinks.

        Attachments

          Activity

            People

            • Assignee:
              alanb Alan Bateman
              Reporter:
              alanb Alan Bateman
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: