Created attachment 28057 [details] Test plan to reproduce the issue My test plan using IP aliasing. If a http request use "Embedded Ressources" and "Concurrent Pool Size" with IP Source defined as a variable, the sample failed with the following stack : java.net.UnknownHostException: ${IP_ADDR} at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849) at java.net.InetAddress.getAddressFromNameService(InetAddress.java: 1200) at java.net.InetAddress.getAllByName0(InetAddress.java:1153) at java.net.InetAddress.getAllByName(InetAddress.java:1083) at java.net.InetAddress.getAllByName(InetAddress.java:1019) at java.net.InetAddress.getByName(InetAddress.java:969) at org.apache.jmeter.protocol.http.sampler.HTTPHC3Impl.setupConnection(HTTPHC3Impl.java: 419) at org.apache.jmeter.protocol.http.sampler.HTTPHC3Impl.sample(HTTPHC3Impl.java: 237) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java: 62) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase $ASyncSample.call(HTTPSamplerBase.java:1708) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase $ASyncSample.call(HTTPSamplerBase.java:1693) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
Also on trunk
The issue is due to the fact the property is cached in JMeterContext which is thread local in Parent thread of Parallel Download threads. Quick fix would be to make ThreadLocal InheritableThreadLocal but as JMeterContext is not thread-safe it is not the right fix. Could Making JMeterContext cloneable a solution ? otherwise implement what sebb proposed on dev list to notify Executor threads of start/end.
(In reply to comment #2) > The issue is due to the fact the property is cached in JMeterContext which is > thread local in Parent thread of Parallel Download threads. > Quick fix would be to make ThreadLocal InheritableThreadLocal but as > JMeterContext is not thread-safe it is not the right fix. If the context is not mutated, then it should be OK to share.
Date: Sat Dec 10 10:40:18 2011 New Revision: 1212764 URL: http://svn.apache.org/viewvc?rev=1212764&view=rev Log: Bug 52310 - variable in IPSource failed HTTP request if "Concurrent Pool Size" is enabled Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java jmeter/trunk/xdocs/changes.xml
Date: Sat Dec 10 12:06:23 2011 New Revision: 1212778 URL: http://svn.apache.org/viewvc?rev=1212778&view=rev Log: Bug 52310 - variable in IPSource failed HTTP request if "Concurrent Pool Size" is enabled ROLLBACK Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java Date: Sat Dec 10 12:09:18 2011 New Revision: 1212779 URL: http://svn.apache.org/viewvc?rev=1212779&view=rev Log: Bug 52310 - variable in IPSource failed HTTP request if "Concurrent Pool Size" is enabled ROLLBACK (Oups one modification passed) Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java Log: Bug 52310 - variable in IPSource failed HTTP request if "Concurrent Pool Size" is enabled Fix by making child get context of the parent. Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContextService.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2676