Random CSV Data Set Config version 0.7 - Issue

328 views
Skip to first unread message

0pp...@gmail.com

unread,
Jan 20, 2021, 6:26:40 AM1/20/21
to jmeter-plugins
Hi,

We have noticed a strange situation in the latest version of the bzm - Random CSV Data Set Config plugin.

It appears that JMeter is starting some threads before its read the CSV file, which then causes the thread to end, once the files have been read the remaining threads continue to work.  The JMeter log has entries like the below :

2021-01-20 11:12:21,137 INFO o.a.j.t.JMeterThread: Stop Thread seen for thread Catalogue Mix 1-25, reason: org.apache.jorphan.util.JMeterStopThreadException: All records in the CSV file have been passed.
2021-01-20 11:12:21,137 INFO o.a.j.t.JMeterThread: Thread finished: Catalogue Mix 1-25

In version 0.6 of the plugin this does not happen, all the CSV files in the Test Plan are read before the threads are started.

This is causing our test to run with less threads than expected.  Has anyone seen this before?  This also happens when running through the Taurus Framework.

I can provide full logs if required.

Many thanks

Ben

Asanke Galgomuwa

unread,
Feb 15, 2021, 11:58:59 PM2/15/21
to jmeter-plugins
Further to this , the Jmter log shows.


This is affecting both JMeter and Blazemeter

2021-02-10 17:13:30,104 ERROR o.a.j.t.JMeterThread: Test failed!
java.lang.NullPointerException: null
at com.blazemeter.jmeter.RandomCSVDataSetConfig.readConsistent(RandomCSVDataSetConfig.java:118) ~[jmeter-plugins-random-csv-data-set-0.7.jar:?]
at com.blazemeter.jmeter.RandomCSVDataSetConfig.iterationStart(RandomCSVDataSetConfig.java:70) ~[jmeter-plugins-random-csv-data-set-0.7.jar:?]
at org.apache.jmeter.control.GenericController.fireIterationStart(GenericController.java:399) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.control.GenericController.fireIterEvents(GenericController.java:391) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.control.GenericController.next(GenericController.java:160) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.control.LoopController.next(LoopController.java:135) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:92) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255) [ApacheJMeter_core.jar:5.2.1]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]


The workaround I used is below.

[1] JMtere - Replace the jar v0.7 with older version v0.6 in Jmeter lib/ext

[2] For Blaxemeter use a yml config file to drive the JMeter JMX and use a script to replace the latest (v0.7) jar with older (v0.6) jar (Which we have to provide with the project) before the test preperation.

Code: Taurus.yml

services:
- module: shellexec
  prepare:
  - command: /bin/bash /tmp/artifacts/random-csv-override.bash

Here is the bash to override the jar version.

Code:  random-csv-override.bash
#!/bin/bash

# stderr to stdout
exec 2>&1

# Sane default permmissions.
umask 022

# This is the jar we want to use to replace the other one from JMeter.  It
# must be uploaded alongside your script.
my_jar="/tmp/artifacts/jmeter-plugins-random-csv-data-set-0.6.jar"

# The YAML file will set and environment variable that is 
# version of JMeter you wish to run your script.  Bear in
# mind that BlazeMeter maintains many multiple versions of
# JMeter on the filesystem.  You should only modify the one
# that you actually need.
lib_dir="/shared/.bzt/jmeter-taurus/${MY_JMETER_VERSION}/lib/ext"


# Code to basically remove the old driver and copy in the new
# driver.
echo "Changing directory to $lib_dir to do the rm and cp"
cd "$lib_dir"
rm -fv jmeter-plugins-random-csv-data*jar
cp -fv "$my_jar" . 


NOTE: Above code solution provided by the Blazemerer support

Please consider the fix to this issue is important and URGENT

0pp...@gmail.com

unread,
Sep 20, 2021, 3:42:35 AM9/20/21
to jmeter-plugins
Hi,

I know this is an old thread but the above issue has now been fixed, not sure when the next release is scheduled though.

Thanks

Ben

Keith Warno

unread,
Sep 24, 2021, 10:30:34 AM9/24/21
to jmeter-plugins
Thanks Ben, looking forward to that fix!

I was the BlazeMeter support tech that suggested the Taurus YAML workaround for Asanke above back in Feb and that workaround remains necessary even today on BlazeMeter.  We occasionally get new reports of this problem from customers but to this date BlazeMeter engines still do not hard-code the usage of the 0.6 RandomCSV plugin.  They still try to use the 0.7 version, thus the workaround is still needed.

0pp...@gmail.com

unread,
Sep 28, 2021, 9:53:39 AM9/28/21
to jmeter-plugins
Hi Keith,

Our work around was to bake version 0.6 into our container image but I agree it will be nice to have this fixed.  Blazemeter own the repository, do you know the release cadence for this project?  The fix was submitted and merged 12 days ago.

Thanks

Ben

Keith Warno

unread,
Oct 4, 2021, 11:27:41 AM10/4/21
to jmeter-plugins
Hi Ben,

I unfortunately do not immediately know the release cadence but I may be able to find out and maybe get that to happen sooner than later.  I caught another one of these NPE cases regarding this plugin in Support today and although we do have various workarounds it would be better for everyone to just have this fixed.

If I learn anything new I'll share what I can here.  Thanks!

Keith'

Keith Warno

unread,
Oct 22, 2021, 10:31:07 AM10/22/21
to jmeter-plugins
FYI this plugin was updated to 0.8 recently.  I haven't tested it myself just yet but I believe this should resolve the NPE issue.

Валентин Гордеев

unread,
Dec 23, 2021, 12:49:44 PM12/23/21
to jmeter-plugins
Unfortunately, I ran into the same problem and can't solve it (it still doesn't work on 0.6). The only option that worked for me was to reduce the number of bmz random data set  components :(
пятница, 22 октября 2021 г. в 19:31:07 UTC+5, Keith Warno:
Reply all
Reply to author
Forward
0 new messages