【问题标题】:Jmeter Script Execution hangs - The JVM should have exited but did notJmeter 脚本执行挂起 - JVM 应该已经退出但没有
【发布时间】:2021-01-03 06:41:39
【问题描述】:

我们正在运行jmeter 性能测试脚本。它执行并产生结果,但之后它只是挂起(无限等待)显示The JVM should have exited but did not.

完整的执行日志 -

jmeter -n -t myScript01.jmx -l myScript01-results.jtl
Creating summariser <summary>
Created the tree successfully using myScript.jmx
Starting standalone test @ Sun Jan 03 05:07:06 UTC 2021 (1609650426432)
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4447

summary =      0 in 00:00:00 = ******/s Avg:     0 Min: 9223372036854775807 Max: -9223372036854775808 Err:     0 (0.00%)
Tidying up ...    @ Sun Jan 03 05:19:01 UTC 2021 (1609651141694)
... end of run
The JVM should have exited but did not.
The following non-daemon threads are still running (DestroyJavaVM is OK):
Thread[AWT-EventQueue-0,6,main], stackTrace:sun.misc.Unsafe#park
java.util.concurrent.locks.LockSupport#park at line:175
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject#await at line:2039
java.awt.EventQueue#getNextEvent at line:554
java.awt.EventDispatchThread#pumpOneEventForFilters at line:187
java.awt.EventDispatchThread#pumpEventsForFilter at line:116
java.awt.EventDispatchThread#pumpEventsForHierarchy at line:105
java.awt.EventDispatchThread#pumpEvents at line:101
java.awt.EventDispatchThread#pumpEvents at line:93
java.awt.EventDispatchThread#run at line:82
Thread[DestroyJavaVM,5,main], stackTrace:
Thread[AWT-Shutdown,5,system], stackTrace:java.lang.Object#wait
sun.awt.AWTAutoShutdown#run at line:314
java.lang.Thread#run at line:748

操作系统-

$ cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.8 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.8"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.8 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.8:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.8
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.8"

java版本-

$ java -version
openjdk version "1.8.0_272"
OpenJDK Runtime Environment (build 1.8.0_272-b10)
OpenJDK 64-Bit Server VM (build 25.272-b10, mixed mode)

jmeter 版本 - 5.3

$ jmeter -v
    _    ____   _    ____ _   _ _____       _ __  __ _____ _____ _____ ____
   / \  |  _ \ / \  / ___| | | | ____|     | |  \/  | ____|_   _| ____|  _ \
  / _ \ | |_) / _ \| |   | |_| |  _|    _  | | |\/| |  _|   | | |  _| | |_) |
 / ___ \|  __/ ___ \ |___|  _  | |___  | |_| | |  | | |___  | | | |___|  _ <
/_/   \_\_| /_/   \_\____|_| |_|_____|  \___/|_|  |_|_____| |_| |_____|_| \_\ 5.3

Copyright (c) 1999-2020 The Apache Software Foundation

感谢任何指导!

【问题讨论】:

    标签: java jmeter performance-testing rhel


    【解决方案1】:

    它看起来像是JMeter Bug 64479 的副作用,所以选项位于:

    1. 升级到JMeter 5.4 修复了错误
    2. 从您的测试计划中删除 HTTP(S) Test Script Recorder(这是您无论如何都应该做的事情,它会减少脚本处理时间,并且在您完成录制后不会增加任何价值)
    3. jmeterengine.force.system.exit property 设置为true

    【讨论】:

    • 感谢您的建议德米特里!我会试试这个并恢复。
    • 我们删除了HTTP(S) Test Script Recorder。我们还发现该脚本启用了infinite。我们禁用它,然后脚本成功执行。非常感谢@Dmitri !!
    猜你喜欢
    • 2019-03-29
    • 1970-01-01
    • 2022-06-17
    • 2013-03-11
    • 2016-08-19
    • 1970-01-01
    • 2019-06-23
    相关资源
    最近更新 更多