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

Signed JWS application unexpectedly asks for permission to open a socket

    Details

    • Subcomponent:
    • Introduced In Version:
      9
    • Resolved In Build:
      b124
    • CPU:
      x86_64
    • OS:
      windows_7

      Backports

        Description

        FULL PRODUCT VERSION :
        java version "9-ea"
        Java(TM) SE Runtime Environment (build 9-ea+119)
        Java HotSpot(TM) Client VM (build 9-ea+119, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [Version 6.1.7601]

        A DESCRIPTION OF THE PROBLEM :
        A Java Web Start application occasionally and unexpectedly asks for permission to open a socket (application has been signed and granted all-permissions)

        REGRESSION. Last worked in version 8u92

        ADDITIONAL REGRESSION INFORMATION:
        java version "9-ea"
        Java(TM) SE Runtime Environment (build 9-ea+119)
        Java HotSpot(TM) Client VM (build 9-ea+119, mixed mode)

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Difficult to reduce to a reproducible test case unfortunately, although I hope the attached stack trace will be useful to you.
        When it happens it only seems to be when the web start application wasn't previously in the web start cache (as seen in Java Cache Viewer from the Control Panel).

        1. Create a Web Start application containing a JAXB translation layer (not sure this is a precondition, but it is where we observe)
        2. Deploy as a signed jar with all-permissions
        3. Creating the JAXB context will occasionally ask for permission to connect

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        A signed application should never ask for permission after initial launch
        ACTUAL -
        The application sometimes asks for permission to connect. See the attached stack trace for why it is asking.

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        AWT-EventQueue-2" #36 prio=6 os_prio=0 tid=0x06f9c000 nid=0x9f8 waiting on condition [0x2b59c000]
           java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@9-ea/Native Method)
        - parking to wait for <0x12599a58> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(java.base@9-ea/LockSupport.java:190)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@9-ea/AbstractQueuedSynchronizer.java:2064)
        at java.awt.EventQueue.getNextEvent(java.desktop@9-ea/EventQueue.java:557)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(java.desktop@9-ea/EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEventsForFilter(java.desktop@9-ea/EventDispatchThread.java:124)
        at java.awt.EventDispatchThread.pumpEventsForFilter(java.desktop@9-ea/EventDispatchThread.java:117)
        at java.awt.WaitDispatchSupport$2.run(java.desktop@9-ea/WaitDispatchSupport.java:190)
        at java.awt.WaitDispatchSupport$4.run(java.desktop@9-ea/WaitDispatchSupport.java:235)
        at java.awt.WaitDispatchSupport$4.run(java.desktop@9-ea/WaitDispatchSupport.java:233)
        at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
        at java.awt.WaitDispatchSupport.enter(java.desktop@9-ea/WaitDispatchSupport.java:233)
        at java.awt.Dialog.show(java.desktop@9-ea/Dialog.java:1070)
        at java.awt.Component.show(java.desktop@9-ea/Component.java:1694)
        at java.awt.Component.setVisible(java.desktop@9-ea/Component.java:1641)
        at java.awt.Window.setVisible(java.desktop@9-ea/Window.java:1013)
        at java.awt.Dialog.setVisible(java.desktop@9-ea/Dialog.java:1005)
        at com.sun.javaws.ui.JavawsSysRun.delegateFromEDT(jdk.javaws@9-ea/JavawsSysRun.java:161)
        at com.sun.javaws.ui.JavawsSysRun.delegate(jdk.javaws@9-ea/JavawsSysRun.java:203)
        at com.sun.deploy.util.DeploySysRun.execute(jdk.deploy@9-ea/DeploySysRun.java:31)
        at com.sun.deploy.util.DeploySysRun$1.run(jdk.deploy@9-ea/DeploySysRun.java:52)
        at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
        at com.sun.deploy.util.DeploySysRun.executePrivileged(jdk.deploy@9-ea/DeploySysRun.java:48)
        at com.sun.deploy.ui.UIFactory.showApiDialog(jdk.deploy@9-ea/UIFactory.java:791)
        at com.sun.deploy.uitoolkit.impl.awt.ui.UIFactoryImpl.showMessageDialog(jdk.deploy@9-ea/UIFactoryImpl.java:120)
        at com.sun.deploy.uitoolkit.impl.awt.ui.UIFactoryImpl.showMessageDialog(jdk.deploy@9-ea/UIFactoryImpl.java:46)
        at sun.plugin2.uitoolkit.ui.DelegatingPluginUIFactory.showMessageDialog(jdk.plugin@9-ea/DelegatingPluginUIFactory.java:38)
        at com.sun.deploy.uitoolkit.ui.UIFactory.showMessageDialog(jdk.deploy@9-ea/UIFactory.java:444)
        at com.sun.jnlp.ApiDialog.askUser(jdk.javaws@9-ea/ApiDialog.java:104)
        at com.sun.jnlp.ApiDialog.askUser(jdk.javaws@9-ea/ApiDialog.java:113)
        at com.sun.jnlp.ApiDialog.askConnect(jdk.javaws@9-ea/ApiDialog.java:42)
        at com.sun.javaws.security.JavaWebStartSecurity.checkConnectHelper(jdk.javaws@9-ea/JavaWebStartSecurity.java:207)
        at com.sun.javaws.security.JavaWebStartSecurity.checkConnect(jdk.javaws@9-ea/JavaWebStartSecurity.java:153)
        at java.net.InetAddress.getAllByName0(java.base@9-ea/InetAddress.java:1418)
        at java.net.InetAddress.getAllByName(java.base@9-ea/InetAddress.java:1329)
        at java.net.InetAddress.getAllByName(java.base@9-ea/InetAddress.java:1263)
        at java.net.InetAddress.getByName(java.base@9-ea/InetAddress.java:1213)
        at com.sun.deploy.net.CrossDomainXML.addAccess(jdk.deploy@9-ea/CrossDomainXML.java:181)
        at com.sun.deploy.net.CrossDomainXML.allowNoAccess(jdk.deploy@9-ea/CrossDomainXML.java:146)
        at com.sun.deploy.net.CrossDomainXML.check(jdk.deploy@9-ea/CrossDomainXML.java:287)
        at com.sun.javaws.security.JavaWebStartSecurity.checkConnectHelper(jdk.javaws@9-ea/JavaWebStartSecurity.java:199)
        at com.sun.javaws.security.JavaWebStartSecurity.checkConnect(jdk.javaws@9-ea/JavaWebStartSecurity.java:153)
        at java.net.InetAddress.getAllByName0(java.base@9-ea/InetAddress.java:1418)
        at java.net.InetAddress.getAllByName(java.base@9-ea/InetAddress.java:1329)
        at java.net.InetAddress.getAllByName(java.base@9-ea/InetAddress.java:1263)
        at java.net.InetAddress.getByName(java.base@9-ea/InetAddress.java:1213)
        at java.net.URLStreamHandler.getHostAddress(java.base@9-ea/URLStreamHandler.java:438)
        - locked <0x12373398> (a sun.net.www.protocol.http.Handler)
        at java.net.URLStreamHandler.hashCode(java.base@9-ea/URLStreamHandler.java:355)
        at java.net.URL.hashCode(java.base@9-ea/URL.java:953)
        - locked <0x167dbe90> (a java.net.URL)
        at com.sun.deploy.cache.CacheEntry$SessionSigningDataStorage$Pair.hashCode(jdk.deploy@9-ea/CacheEntry.java:730)
        at java.util.concurrent.ConcurrentHashMap.get(java.base@9-ea/ConcurrentHashMap.java:948)
        at java.util.concurrent.ConcurrentHashMap.containsKey(java.base@9-ea/ConcurrentHashMap.java:976)
        at com.sun.deploy.cache.CacheEntry$SessionSigningDataStorage.get(jdk.deploy@9-ea/CacheEntry.java:976)
        at com.sun.deploy.cache.CacheEntry.getJarSigningData(jdk.deploy@9-ea/CacheEntry.java:1005)
        - locked <0x1264f1c8> (a com.sun.deploy.cache.CacheEntry)
        at com.sun.deploy.cache.CachedJarFile.getSigningData(jdk.deploy@9-ea/CachedJarFile.java:286)
        - locked <0x14093ba8> (a com.sun.deploy.cache.CachedJarFile)
        at com.sun.deploy.cache.CachedJarFile.getCodeSource(jdk.deploy@9-ea/CachedJarFile.java:460)
        - locked <0x14093ba8> (a com.sun.deploy.cache.CachedJarFile)
        at com.sun.deploy.cache.DeployCacheJarAccessImpl.getCodeSource(jdk.deploy@9-ea/DeployCacheJarAccessImpl.java:76)
        at com.sun.deploy.security.CPCallbackHandler$ChildElement.checkResource(jdk.deploy@9-ea/CPCallbackHandler.java:609)
        at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(jdk.deploy@9-ea/DeployURLClassPath.java:872)
        at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(jdk.deploy@9-ea/DeployURLClassPath.java:924)
        at com.sun.deploy.security.DeployURLClassPath.getResource(jdk.deploy@9-ea/DeployURLClassPath.java:252)
        at com.sun.jnlp.JNLPClassLoader.getResourceAsResource(jdk.javaws@9-ea/JNLPClassLoader.java:412)
        at com.sun.deploy.security.DeployURLClassLoader.getResourceAsStream(jdk.deploy@9-ea/DeployURLClassLoader.java:645)
        at javax.xml.bind.ContextFinder.firstByServiceLoaderDeprecated(java.xml.bind@9-ea/ContextFinder.java:578)
        at javax.xml.bind.ContextFinder.find(java.xml.bind@9-ea/ContextFinder.java:329)
        at javax.xml.bind.JAXBContext.newInstance(java.xml.bind@9-ea/JAXBContext.java:467)
        at javax.xml.bind.JAXBContext.newInstance(java.xml.bind@9-ea/JAXBContext.java:430)
        at javax.xml.bind.JAXBContext.newInstance(java.xml.bind@9-ea/JAXBContext.java:341)
        at com.example.Interchange.init(Interchange.java:45)
        at com.example.Interchange.init(Interchange.java:34)
        at com.example.EntitiesExportWindow.<init>(EntitiesExportWindow.java:156)
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(java.base@9-ea/Native Method)
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(java.base@9-ea/NativeConstructorAccessorImpl.java:62)
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(java.base@9-ea/DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(java.base@9-ea/Constructor.java:453)
        at java.lang.Class.newInstance(java.base@9-ea/Class.java:551)
        at com.example.InstantiateUtil.getInstance(InstantiateUtil.java:260)
        at com.example.InstantiateUtil.getInstance(InstantiateUtil.java:178)
        at com.example.MainEntryJFrame.menuAction(MainEntryJFrame.java:1854)
        at com.example.WindowAction.actionPerformed(Customizer.java:860)
        at javax.swing.AbstractButton.fireActionPerformed(java.desktop@9-ea/AbstractButton.java:1967)
        at javax.swing.AbstractButton$Handler.actionPerformed(java.desktop@9-ea/AbstractButton.java:2308)
        at javax.swing.DefaultButtonModel.fireActionPerformed(java.desktop@9-ea/DefaultButtonModel.java:404)
        at javax.swing.DefaultButtonModel.setPressed(java.desktop@9-ea/DefaultButtonModel.java:261)
        at javax.swing.AbstractButton.doClick(java.desktop@9-ea/AbstractButton.java:369)
        at com.jidesoft.plaf.vsnet.VsnetMenuItemUI.doClick(Unknown Source)
        at com.jidesoft.plaf.vsnet.VsnetMenuItemUI$MouseInputHandler.mouseReleased(Unknown Source)
        at java.awt.Component.processMouseEvent(java.desktop@9-ea/Component.java:6601)
        at javax.swing.JComponent.processMouseEvent(java.desktop@9-ea/JComponent.java:3321)
        at java.awt.Component.processEvent(java.desktop@9-ea/Component.java:6366)
        at java.awt.Container.processEvent(java.desktop@9-ea/Container.java:2258)
        at java.awt.Component.dispatchEventImpl(java.desktop@9-ea/Component.java:4985)
        at java.awt.Container.dispatchEventImpl(java.desktop@9-ea/Container.java:2316)
        at java.awt.Component.dispatchEvent(java.desktop@9-ea/Component.java:4817)
        at java.awt.LightweightDispatcher.retargetMouseEvent(java.desktop@9-ea/Container.java:4895)
        at java.awt.LightweightDispatcher.processMouseEvent(java.desktop@9-ea/Container.java:4532)
        at java.awt.LightweightDispatcher.dispatchEvent(java.desktop@9-ea/Container.java:4473)
        at java.awt.Container.dispatchEventImpl(java.desktop@9-ea/Container.java:2302)
        at java.awt.Window.dispatchEventImpl(java.desktop@9-ea/Window.java:2754)
        at java.awt.Component.dispatchEvent(java.desktop@9-ea/Component.java:4817)
        at java.awt.EventQueue.dispatchEventImpl(java.desktop@9-ea/EventQueue.java:761)
        at java.awt.EventQueue.access$500(java.desktop@9-ea/EventQueue.java:97)
        at java.awt.EventQueue$3.run(java.desktop@9-ea/EventQueue.java:712)
        at java.awt.EventQueue$3.run(java.desktop@9-ea/EventQueue.java:706)
        at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base@9-ea/ProtectionDomain.java:77)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base@9-ea/ProtectionDomain.java:87)
        at java.awt.EventQueue$4.run(java.desktop@9-ea/EventQueue.java:734)
        at java.awt.EventQueue$4.run(java.desktop@9-ea/EventQueue.java:732)
        at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base@9-ea/ProtectionDomain.java:77)
        at java.awt.EventQueue.dispatchEvent(java.desktop@9-ea/EventQueue.java:731)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(java.desktop@9-ea/EventDispatchThread.java:199)
        at java.awt.EventDispatchThread.pumpEventsForFilter(java.desktop@9-ea/EventDispatchThread.java:124)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(java.desktop@9-ea/EventDispatchThread.java:113)
        at java.awt.EventDispatchThread.pumpEvents(java.desktop@9-ea/EventDispatchThread.java:109)
        at java.awt.EventDispatchThread.pumpEvents(java.desktop@9-ea/EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.run(java.desktop@9-ea/EventDispatchThread.java:90)


        REPRODUCIBILITY :
        This bug can be reproduced often.

        ---------- BEGIN SOURCE ----------
        Sorry :(
        ---------- END SOURCE ----------

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  almatvee Alexander Matveev
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: