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

cannot truss jdk9 [ solaris ]

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 9
    • 9
    • hotspot
    • any solaris 10+ environment

    • b129
    • generic
    • solaris_10, solaris_11, solaris_12

    Description

      when attempting to truss a jvm ...

      truss -f java Main

      /2: mmap(0x00000000, 1048576, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE, 3, 0) = 0xFFFFFFFF792C0000
      /2: mmap(0xFFFFFFFF792C0000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFFFFFFFF792C0000
      /2: openat(AT_FDCWD, "/proc/self/ctl", O_WRONLY)
      Error: Could not find or load main class MainClass.java
              *** process otherwise traced, releasing ...

      this appears to be caused by

      bool os::enable_vtime() {
        int fd = ::open("/proc/self/ctl", O_WRONLY);
        if (fd == -1) {
          return false;
        }

        long cmd[] = { PCSET, PR_MSACCT };
        int res = ::write(fd, cmd, sizeof(long) * 2);
        ::close(fd);
        if (res != sizeof(long) * 2) {
          return false;
        }
        return true;
      }

      which is curious that since Solaris 10, PR_MSACCT is deprecated and no longer has any effect.

      this causes a serious loss of observability in the JDK

      Attachments

        Issue Links

          Activity

            People

              alanbur Alan Burlison
              ambowers Andy Bowers (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: