I found a similar problem testing on a system with multiple CPUs a few months ago, and checked in a fix in version 1.36 of the source file (2003-10-22)
As far as I can see, all accesses to the pairing HashSet are now synchronized, so I don't understand how changing to a synchronizedSet would help - but perhaps I'm missing something. Which version of JMeter (and TestCompiler.java) are you using? S. ----- Original Message ----- From: "Jun Zhong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 05, 2004 12:29 AM Subject: Should the HashSet used in org/apache/jmeter/threads/TestCompiler.java be synchronized ? Should the variable "pairing" in org/apache/jmeter/threads/TestCompiler.java be synchronized ? I am evaluating JMeter as a stress tool to test Tomcat. I configurated 200 threads, each thread repeated 30 times. The test plan was run in an endless while loop. After a while (usually within half an hour), the test hangs. Furthur investigation revealed that the state of the variable "pairing" was corrupted by concurrent access and modification by multiple threads. I modified the line private static pairing = new HashSet(); to private static pairing = Collections.synchronizedSet(new HashSet()); The problem disappeared with the change. The test lasted for more than 24 hours before I interruped it. Thanks, June Zhong --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
