Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1581

ConcurrentModificationException when running same script in multiple threads

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0-RC-1
    • 1.1-beta-1
    • None
    • None
    • 2-processor windows xp

    Description

      ConcurrentModificationException when running the same script file (with dependencies) in multiple threads on a multiprocessor machine with the same GroovyScriptEngine instance. Does not occur on singleprocessor machine.
      It does not happen every time when running the test case but most of the times.

      java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
      at java.util.HashMap$KeyIterator.next(Unknown Source)
      at groovy.util.GroovyScriptEngine.updateCacheEntry(GroovyScriptEngine.java:285)
      at groovy.util.GroovyScriptEngine.run(GroovyScriptEngine.java:376)
      at GroovyConcurrentTest$ScriptRunner.run(GroovyConcurrentTest.java:79)

      Attachments

        1. test.zip
          2 kB
          Mattias Reichel
        2. GroovyScriptEngine.java
          14 kB

        Activity

          People

            guillaume Guillaume Sauthier
            mattiasr Mattias Reichel
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: