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

java.lang.instrument: multiple agent attach -- first one wins capabilities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 6
    • core-svc
    • None
    • b92
    • generic
    • generic

      Background:
      Optional capabilities of java.lang.instrument (JLI) agents are specified as attributes in the JAR manifest. They cannot (currently) be set dynamically by agent code. The current implementation of JLI always uses a single implementation of "Instrumentation" which holds the capabilities.

      The bug:
      As a result, if multiple JLI agents are loaded (either at the command line or via attach) the first loaded agent creates the "Instrumentation" instance and sets its capabilities. A subsequent agent, with possibly greater capabilities specified in its attributes then has these capabilities ignored. So the bug is first one wins.

            rfield Robert Field (Inactive)
            rfield Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: