Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-374

Anomalous behavior when unloading scripts

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Won't Do
    • Major
    • None
    • 4.0.4
    • Trigger Injection
    • None

    Description

      I am working on project OpenTracing SpecialAgent that is trying to use Byteman to do some heavy lifting as a Java agent. In short, the use-case is to have the SpecialAgent automatically instrument all 3rd-party libraries in a target application for which there exist instrumentation plugins with Byteman rules implemented (these plugins and scripts get packaged into the SpecialAgent).

      The plugins and scripts are written by opensource contributors, and are not supposed to be coupled to the SpecialAgent.

      When the SpecialAgent is loaded into an application, it requires a 2-step process for the triggering of Byteman rules. For each rule, the SpecialAgent generates a precursor rule that is intended to be executed for the same entry point, in order to perform runtime validation before making a decision whether to allow the actual rule to execute or not. One such validation is a compatibility test that validates that the target classes of the instrumentation are compatible with the instrumentation plugin.

      If the validation is successful, the 2nd step is to execute the actual rule. If the validation is not successful, then the actual rule should not be executed.

      This bug isolates the scenario where the 1st step determines that the actual rule should not be executed, so it attempts to unload the actual rule. Though Byteman says the rule has been unloaded, it is still executed.

      This bug also shows that if the rule of step 1 is unloaded during the execution of step 1, then step 2 does not get executed, though it should.

      Please refer to this project for a demonstration of these 2 use-cases.

      Attachments

        Activity

          People

            rhn-engineering-adinn Andrew Dinn
            safris Seva Safris (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: