- 
    Bug 
- 
    Resolution: Fixed
- 
     P2 P2
- 
    9
- 
    any solaris 10+ environment 
- 
        b129
- 
        generic
- 
        solaris_10, solaris_11, solaris_12
                    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
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
- relates to
- 
                    JDK-8160887 os::elapsedVTime() is not consistent across platforms -           
- Closed
 
-