https://bz.apache.org/bugzilla/show_bug.cgi?id=55827

Felix Schumacher <felix.schumac...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #38218|0                           |1
        is obsolete|                            |

--- Comment #13 from Felix Schumacher <felix.schumac...@internetallee.de> ---
Created attachment 38219
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38219&action=edit
Slow down recoverRunningVersion to show problems

Now a working version of the "slow" recoverRunningVersion method.

When the threads are removed at the end (in my simple test plan) one Test
Element is getting flagged, only.

2022-03-08 21:55:40,771 WARN o.a.j.t.AbstractTestElement: Recover in different
threads: [Thread[Thread-53,6,main], Thread[Thread-54,6,main]]; Element:
org.apache.jmeter.reporters.ResultCollector@42f6fa63
java.lang.RuntimeException: Thread mismatch
>-------at 
>org.apache.jmeter.testelement.AbstractTestElement.recoverRunningVersion(AbstractTestElement.java:513)
> ~[ApacheJMeter_core.jar:5.5-SNAPSHOT]
>-------at 
>org.apache.jmeter.threads.SamplePackage.recoverRunningVersion(SamplePackage.java:110)
> ~[ApacheJMeter_core.jar:5.5-SNAPSHOT]
>-------at 
>org.apache.jmeter.threads.SamplePackage.recoverRunningVersion(SamplePackage.java:120)
> ~[ApacheJMeter_core.jar:5.5-SNAPSHOT]
>-------at org.apache.jmeter.threads.TestCompiler.done(TestCompiler.java:123) 
>~[ApacheJMeter_core.jar:5.5-SNAPSHOT]
>-------at 
>org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:593)
> ~[ApacheJMeter_core.jar:5.5-SNAPSHOT]
>-------at 
>org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:501) 
>~[ApacheJMeter_core.jar:5.5-SNAPSHOT]
>-------at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:268) 
>~[ApacheJMeter_core.jar:5.5-SNAPSHOT]
>-------at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_201]

The code for ResultCollector explicitly mentions, that it has to be thread-safe
(which recoverRunningVersion is not).

So maybe, we can make it for ResultCollector thread-safe instead of all? But on
the other hand, if we obtain a lock for a single thread, it is not that
expensive any more. So I think we could try to add it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to