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

retransform/redefine a method multiple times sometimes results in a seg fault.

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description

      FULL PRODUCT VERSION :
      java version "1.6.0_10-rc2"

      Also occurs on 1.7b, 1.6.0_07 ...

      FULL OS VERSION :
      Linux fred3 2.6.24-1-amd64 #1 SMP Thu May 1 13:43:59 EDT 2008 x86_64 GNU/Linux

      (Crash happens on other OS's as well)

      A DESCRIPTION OF THE PROBLEM :
      Using retransform or redefine multiple times for a class will eventually generate a seg fault, generally in code that is maintaining the osr list.

      Looking at things, it appears that memory has been corrupted (the osr list is corrupt).

      My suspicion is that the code in nmethod::make_not_entrant_or_zombie that is commented for handling osr methods not being removed. The check for being an osr method looks for entry_bci being InvocationEntryBci, but it actually can be either that or InvalidOSREntryBci. Otherwise the code in make_not_entrant... makes no sense: it effectively checks if osr_entry_bci == InvocationEntryBci and then checks if osr_entry_bci != InvalidOSREntryBci (which it is guaranteed to be) .

      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      This happens in a large application suite that is difficult to provide.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Attached seperatly



      REPRODUCIBILITY :
      This bug can be reproduced often.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: