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

JDI: erm.deleteEventRequests(erm.breakpointRequests()); throws exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0
    • core-svc
    • None
    • beta2
    • generic
    • generic
    • Not verified

      As per the JDI documentation it says for EventRequestManger.
       deleteEventRequests() "Removes a list of EventRequests."
       
       ***When list obtained from EventRequestManager.breakpointRequests()
       is passed directly to deleteEventRequests(List) the debugger VM terminates.
       But when a user defined list of the same requests is created and passed
       as an argument the requests are correctly deleted and the debugger VM
       runs to completion.
       
       But a certain unexpected behaviour has been observed in this case.

       Scenario:
       ------------
       Debugger: TestBug.java
       Debugee: EventDebugee5.java

       Three BreakpointRequests are created and events obtained.
       requestManager.deleteEventRequests(requestManager.breakpointRequests())
       does not delete all the requests and terminates the debugger VM.

       When creating a UserDefined list with the same list of breakpoint requests
       the deleteEventRequests(UserDefinedlist) deletes all the requests and
       program execution continues normally.

       Windows Testing done in (1.3-0-Z) build Hotspot and Classic.
       Solaris Testing done in (1.3.0.Z) build Hotspot and Classic..
       The output logfiles are attached for both the Windows and Solaris

      Steps to reproduce the bug
       --------------------------
       The bug can be reproduced using the files in the location
       /net/sqesvr/export/disk5/toolsbugs/4331872
       Follow the instructions in README to reproduce the bug.


      tim.bell@Eng 2000-10-0
      New location of test is:
      /net/sqesvr/export/xlt/Tools/toolsbugs/4331872

      Added an ex.printStackTrace(); in the empty catch {} block.
      Please don't write empty catch {} blocks.

      The resulting error footprint is:

      % java TestBug EventDebugee5
      JVM version:1.4.0
      JDI version: 1.3
      JVM description: Java Debug Interface (Reference Implementation) version 1.3
      Java Debug Wire Protocol (Reference Implementation) version 1.4
      JVM Debug Interface version 1.0
      JVM version 1.4.0 (Java HotSpot(TM) Core VM, interpreted mode)
      ###@###.###(java.lang.String[])+8 in thread main
      In method first
      ###@###.###ndBreakpointMethod()+0 in thread main
      In method second
      ###@###.###dBreakpointMethod()+0 in thread main
       first [breakpoint request EventDebugee5:20 (enabled), breakpoint request EventDebugee5:30 (enabled), breakpoint request EventDebugee5:34 (enabled)]
      java.util.ConcurrentModificationException
              at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:445)
              at java.util.AbstractList$Itr.next(AbstractList.java:418)
              at java.util.Collections$1.next(Collections.java:593)
              at com.sun.tools.jdi.EventRequestManagerImpl.deleteEventRequests(EventRequestManagerImpl.java:657)
              at TestBug.testRequest(TestBug.java:86)
              at TestBug.runTests(TestBug.java:51)
              at JDIScaffold.startTests(JDIScaffold.java:186)
              at TestBug.main(TestBug.java:32)

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: