We ran our static analysis tool ThreadSafe [1] on version 2.10 of JMeter, which appeared to uncover a couple of concurrency issues. One of the most interesting was a potential for unsynchronised concurrent accesses to the LinkedList stored in the field RespTimeGraphVisualizer.internalList. The list stored in this field can be read from the method RespTimeGraphVisualize.actionPerformed(..), which will be called by the Swing UI thread, and is also modified by the method RespTimeGraphVisualizer.add(..), is a call-graph descendent of the run() method of the thread AsynchSampleSender.Worker thread. Therefore, it is possible that incorrect data may be read from the list by the UI thread, due to the lack of synchronisation. We're not sure that this can actually result in a user-visible bug, but we thought you'd like to know. We are also planning to use this finding as an example of Android-related concurrency mistakes in an article about ThreadSafe. Obviously, if you, as the developers of JMeter, have any objections to our using this as an example, then we won't. [1] ThreadSafe is a static analysis tool for Java concurrency, developed by Contemplate Ltd.: http://www.contemplateltd.com/
I wrote: > We are also planning to use this finding as an example of Android-related > concurrency mistakes in an article about ThreadSafe. Obviously, "Android-related" was a mistake here. I meant to write "Java-related". Sorry about that.
Date: Fri Nov 29 22:29:00 2013 New Revision: 1546654 URL: http://svn.apache.org/r1546654 Log: Bug 55826 - Unsynchronised concurrent accesses to list in field RespTimeGraphVisualizer.internalList Bugzilla Id: 55826 Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/RespTimeGraphVisualizer.java jmeter/trunk/xdocs/changes.xml
Thanks for report. Regarding use of this example, can you ask the question on dev list ? Thank you
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3278