Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: tmkha
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

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

Created: 30/Jul/11 03:35 AM   Updated: 29/Sep/11 05:33 PM   Resolved: 29/Sep/11 05:33 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 0.8

Time Tracking:
Not Specified

File Attachments: 1. File atmosphere-async-jersey-test-2.tgz (32 kB) 30/Jul/11 05:11 AM - tmkha
2. File atmosphere-async-jersey-test.tgz (63 kB) 30/Jul/11 03:35 AM - tmkha

Participants: jfarcand and tmkha

 Description  « Hide

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

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.

tmkha added a comment - 30/Jul/11 05:11 AM

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

jfarcand added a comment - 29/Sep/11 05:19 PM