Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check to vurun for pre-existing threads #644

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

sm-shaw
Copy link
Contributor

@sm-shaw sm-shaw commented Nov 28, 2023

Fixes CLI error:
Error: can't read "threadscreated(0)": no such variable
and replaces with message:
Error: Cannot call vurun with Virtual Users already active

Fix checks if threadscreated() array exists (unset by vudestroy) but thread names check is greater than 0 meaning threads remain running. If this is the case vurun returns and does not run.
In most cases this will be because keepalive_margin is shorter than the time for a thread to finish and can be resolved by increasing keepalive_margin.

Example with fix:

Vuser 1:TEST RESULT : System achieved 12527 NOPM from 29070 MariaDB TPM
Vuser 1:Gathering timing data from Active Virtual Users...
29280 MariaDB tpm
Vuser 2:FINISHED SUCCESS
Vuser 1:Calculating timings...
Vuser 1:Writing timing data to /tmp/hdbxtprofile.log
Vuser 1:Starting purge: history list length 1919
1806 MariaDB tpm
doing vudestory
Transaction Counter thread running with threadid:tid0x7f85213ea700
Stopping Transaction Counter
Virtual Users remain running in background or shutting down, retry
Transaction Counter Started
doing vuset
Error: Virtual Users exist, destroy with vudestroy before changing settings
doing vucreate
Error: Virtual Users exist, destroy with vudestroy before creating
Transaction Counter thread running with threadid:tid0x7f85213ea700
doing vurun
Error: Cannot call vurun with Virtual Users already active
doing vudestory
Transaction Counter thread running with threadid:tid0x7f85213ea700
Stopping Transaction Counter
Virtual Users remain running in background or shutting down, retry
Transaction Counter thread already running with threadid:tid0x7f85213ea700
doing vuset
Error: Virtual Users exist, destroy with vudestroy before changing settings
doing vucreate
Error: Virtual Users exist, destroy with vudestroy before creating
Transaction Counter thread running with threadid:tid0x7f85213ea700
doing vurun
Error: Cannot call vurun with Virtual Users already active
doing vudestory
Transaction Counter thread running
Stopping Transaction Counter
0 MariaDB tpm
Virtual Users remain running in background or shutting down, retry

@sm-shaw sm-shaw requested a review from a team as a code owner November 28, 2023 14:50
@sm-shaw sm-shaw linked an issue Nov 28, 2023 that may be closed by this pull request
@sm-shaw sm-shaw added the bug Something isn't working label Nov 28, 2023
@abondvt89
Copy link
Contributor

Merging after reviews and approval of the three members of the code maintenance team.

@abondvt89 abondvt89 merged commit d662d78 into TPC-Council:master Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: can't read "threadscreated(0)": no such variable
3 participants