xinbc / jdiameter

Automatically exported from code.google.com/p/jdiameter
0 stars 0 forks source link

Diameter Stack Peer FSM multithread problem (Statistics Race Condition) #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The multi-thread FSM additions cause a race condition where 
org.jdiameter.server.impl.PeerImpl.java line 115
StatisticRecord[] records = ((IStateMachine) fsm).getStatistic().getRecords();

This occassionally throws a NULL pointer exception as the getStatistic method 
return null.

A patch is included for org.jdiameter.client.impl.fsm.PeerFSMImpl.java that 
makes the queue stat variable threadsafe.

What is the expected output? What do you see instead?
Run fine - instead we get a Null pointer exception

What version of the product are you using? On what operating system?
jdiameter 1.40.FINAL and JSLEE 2.7.0.FINAL

Please provide any additional information below.

Original issue reported on code.google.com by richard....@smilecoms.com on 22 Jan 2013 at 6:43

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for this report and patch, Richard.

Attaching a patch for current git master, which I will be testing shortly.

If you can please test from our current git master (and apply this patch as 
well) to let us know how it's working for you, namely how is current SCTP 
support working, it would be great. Thanks!

Original comment by brainslog on 22 Jan 2013 at 10:35

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 3699d5a95ceb.

Applied patch.

Original comment by brainslog on 24 Jan 2013 at 3:59