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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 6
    • Affects Version/s: 6
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: