JDK-6361135 : TEST_BUG: com/sun/tools/attach/PermissionTests.sh fails
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux_redhat_3.0
  • CPU: x86
  • Submitted: 2005-12-09
  • Updated: 2010-04-02
  • Resolved: 2005-12-22
Related Reports
Duplicate :  
Description
JDK		    : Fails:  Mustang b59a
                      Passes: Mustang b59
Platform[s]         : Fails On: Red Hat AS 4 (amd64)
Failing Test [s]    : com/sun/tools/attach/PermissionTests.sh


    Test source location:
    =====================
/net/cady/export/jdk1.6.0/promoted/all/b59b/ws/j2se/test/com/sun/tools/attach/PermissionTests.sh

    Test Machine:
    =============
Linux opteron002 2.6.9-22.EL #1 Mon Sep 19 17:49:49 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux

*** /etc/lsb-release.d: directory ***

::::::::::::::
/etc/redhat-release
::::::::::::::
Red Hat Enterprise Linux AS release 4 (Nahant Update 2)


    jtr file location:
    ==================
/net/cady/export6/results/mustang/b59b/reg/regression-reg-mustang-RHAS-amd-2005-12-05-11-47-34-0942/workDir/com/sun/tools/attach/PermissionTests.jtr

    How to reproduce:
    ====================
    - Set JAVA_HOME to Mustang b59a linux-amd64
    - cd /net/cady/export/jdk1.6.0/promoted/all/b59b/ws/j2se/test/com/sun/tools/attach
    - /net/koori.sfbay/onestop/jct-tools/2.1.6/archive/fcs/binaries/linux/bin/jtreg -r:/tmp -w:/tmp ./PermissionTests.sh

    Test output:
    =============
----------System.out:(13/761)----------
Waiting for Application to initialize...
32873
Application is process 6016, shutdown port is 32873
Deny test
sun.misc.ServiceConfigurationError: com.sun.tools.attach.spi.AttachProvider: Provider sun.tools.attach.LinuxAttachProvider could not be instantiated: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jvmstat.monitor)
 - exception thrown as expected.
Allow test
Exception in thread "main" com.sun.tools.attach.AttachNotSupportedException: none of the installed providers knows how to attach to: 6016
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:197)
        at PermissionTest.main(PermissionTest.java:22)
Connecting to port 32873 to shutdown Application ...
1 test(s) failed:
32873

Comments
EVALUATION -- As noted, this issue was resolved with the test updates done by 6335921 so I will close it as a dup.
22-12-2005

EVALUATION As part of the fix for 6348630 we added a check to verify that the target VM is a 1.6+ VM. This check required an updated to the security policy used by PermissionTests.sh but I didn't included it in the changes for 6348630 that went into b59a. It's not an issue for the RC workspace as the check was subsequently changed (and the security policy updated).
09-12-2005

SUGGESTED FIX ------- java.policy.allow ------- 13c13,15 < permission java.lang.RuntimePermission "accessClassInPackage.sun.jvmstat.monitor"; --- > permission java.lang.RuntimePermission "accessClassInPackage.sun.jvmstat.*"; > permission java.lang.RuntimePermission "accessClassInPackage.sun.management.*"; > permission java.lang.RuntimePermission "sun.misc.Perf.getPerf" *** (#1 of 1): [ UNSAVED ] ###@###.###
09-12-2005