atmosphere
  1. atmosphere
  2. ATMOSPHERE-152

java.lang.IllegalStateException: Broadcaster ID already assigned to SCOPE.REQUEST. Cannot change the id

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8
    • Component/s: None
    • Labels:
      None

      Description

      Consistently getting "java.lang.IllegalStateException: Broadcaster ID already assigned to SCOPE.REQUEST. Cannot change the id" under light load.

      http://atmosphere-users-mailling-list.2493822.n2.nabble.com/Correct-usage-of-suspend-resume-with-jersey-td6625131.html#a6635536

      Sample test maven project is attached.

      I ran the test with jMeter
      URL: /atmosphere-async-jersey-test/cowsservices/helloworld?delay=200&who=kha
      Number of Thread: 50
      Ramp-up Period: 1
      Loop Count: 10 to 20

      And I can consistently reproduce the problem. Occasionally, if running with higher number of threads, I also saw some NPE and other exceptions.

      I also modified the atmosphere-jersey and atmosphere-cpr source code (0.8-SNAPSHOT) to inject some debug logs (mainly in AtmosphereFilter, DefaultBroadcaster, DefaultBroadcasterFactory where Broadcasters are add/remove and ID are changed/added to factory) and noticed that when the error occurred, there were multiple threads working on the same Broadcaster ID at the same time.

        Activity

        Hide
        tmkha added a comment -

        The pom.xml of the first atmosphere-async-jersey-test.tgz is corrupted. Please use atmosphere-async-jersey-test-2.tgz.

        Show
        tmkha added a comment - The pom.xml of the first atmosphere-async-jersey-test.tgz is corrupted. Please use atmosphere-async-jersey-test-2.tgz.
        Hide
        jfarcand added a comment -

        Looking...

        Show
        jfarcand added a comment - Looking...
        Show
        jfarcand added a comment - Fixed https://github.com/Atmosphere/atmosphere/commit/7a71e99c2633bac4fcebcf1479e4843814c81236

          People

          • Assignee:
            Unassigned
            Reporter:
            tmkha
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: