Issue Details (XML | Word | Printable)

Key: JSIP-162
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: jsip-issues
Reporter: palob
Votes: 0
Watchers: 0
Operations

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

Mingled messages under high load

Created: 30/May/08 08:53 AM   Updated: 28/Jul/08 06:43 AM
Component/s: www
Affects Version/s: current
Fix Version/s: milestone 1

Time Tracking:
Not Specified

File Attachments: 1. Text File log.txt (16 kB) 30/May/08 08:55 AM - palob

Environment:

Operating System: All
Platform: All


Issuezilla Id: 162
Tags:
Participants: jsip-issues, mranga and palob


 Description  « Hide

This is related to #119, but I do not know how I could continue in that one.

I am testing race conditions in SIP server, thus my test application (SipUnit)
creates 100 threads to test simple scenario simultaneously. Sometimes I get
mingled responses from server. I have checked through Wireshark and they are
sent correctly.
Example (see more in attached log):

ERROR - Contact: <sip:gbcdff1973SIP/2.0 200 OK

Expecting >>>><<< got >>>/<<<
java.text.ParseException: Contact: <sip:gbcdff1973SIP/2.0 200 OK

Expecting >>>><<< got >>>/<<<
at gov.nist.core.LexerCore.match(LexerCore.java:270)
at gov.nist.javax.sip.parser.AddressParser.nameAddr
(AddressParser.java:63)
at gov.nist.javax.sip.parser.AddressParser.address
(AddressParser.java:112)
at gov.nist.javax.sip.parser.AddressParametersParser.parse
(AddressParametersParser.java:55)
at gov.nist.javax.sip.parser.ContactParser.parse(ContactParser.java:69)
at gov.nist.javax.sip.parser.StringMsgParser.processHeader
(StringMsgParser.java:398)
at gov.nist.javax.sip.parser.StringMsgParser.parseSIPMessage
(StringMsgParser.java:305)
at gov.nist.javax.sip.parser.PipelinedMsgParser.run
(PipelinedMsgParser.java:275)
at java.lang.Thread.run(Thread.java:595)

I have tried to apply patch suggested in issue #119 and it solves the problem.
I did not observe any problems caused by that patch, but my testing application
is limited to simple scenarios.

Additionally, after reviewing gov.nist.javax.sip.parser.Pipeline I suggest to
make another change to make it better (however it alone does not help to solve
problem with mingled messages):
1. instantiation of Buffer in both methods write() should be moved to
synchronized block, because mutable objects need to be safely published (Java
Concurrency in Practice, p54)

Pavel Bernhauser



palob added a comment - 30/May/08 08:55 AM

Created an attachment (id=58)
selection of 3 errors (instead of sending 3MB file)


mranga added a comment - 30/May/08 09:11 AM

Can you run the tck after applying this patch and see if the TCK works ok. If
so, please send me the patch.

Thanks

Ranga


mranga added a comment - 01/Jun/08 05:20 PM

Did you run with connection caching off or on?


palob added a comment - 02/Jun/08 07:39 AM

I am using default values for caching (default for SipUnit)
CACHE_SERVER_CONNECTIONS=false
CACHE_CLIENT_CONNECTIONS=true
BTW, javadoc for CACHE_SERVER_CONNECTIONS contradicts itself: "Default value is
true... If false (default action)..."

I have executed TCK and it fails in TCPRecordRouteTest.

Pavel Bernhauser


mranga added a comment - 28/Jul/08 06:43 AM

Please submit diff. I will get that failing test case to work. Thanks.