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

SocketPermission not thread safe

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 7
    • core-libs
    • x86
    • windows_7

      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      All versions

      A DESCRIPTION OF THE PROBLEM :
      SocketPermission doesn't comply with Permission immutability contract.

      SocketPermission resolves dns, and caches this data internally, when shared among multiple threads the cache isn't visible to other threads and not thread safe, resulting in unnecessary duplicated dns network calls. This occurs when SocketPermission objects are shared among separate SocketPermissionCollections for separate ProtectionDomains and policy caches. Dns lookup calls are expensive and should me minimised as much as possible.

        Suggested fix: make immutable fields final and any temporary cache fields volatile or synchronized.

      Dns lookup has a significant performance penality in our distributed network software.


      REPRODUCIBILITY :
      This bug can be reproduced always.

            vtewari Vyom Tewari
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: