A fatal error has been detected by the Java Runtime Environment in JMETER - jmeter

I'm trying to run a test from jmeter using "webdriver sampler" with 1500 users with a ramp-up 60 sec in one hour...
everything is going well, but at one point, for example, 15 minutes later... I get this error
ChromeDriver was started successfully.
Java HotSpot(TM) 64-Bit Server VM warning: Attempt to allocate stack guard pages failed.
Java HotSpot(TM) 64-Bit Server VM warning: Attempt to unguard stack red zone failed.
An unrecoverable stack overflow has occurred.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_STACK_OVERFLOW (0xc00000fd) at pc=0x000000006671bbfb, pid=12248, tid=0x0000000000000358
#
# JRE version: Java(TM) SE Runtime Environment (8.0_341-b10) (build 1.8.0_341-b10)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.341-b10 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# V [jvm.dll+0x20bbfb]
#
# Failed to write core dump. Call to MiniDumpWriteDump() failed (Error 0x800705af: The paging file is too small for this operation to complete.
)
#
# An error report file with more information is saved as:
# D:\workspace\test\hs_err_pid12248.log
errorlevel=-1073741819
Press any key to continue . . .
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
I use chromedriver headless
This is the command line that I use in jenkins
apache-jmeter-5.5/bin/jmeter.bat -n -t "test.jmx"
jmeter version 5.5
what is the problem and possible cause
also i get this message sometimes in the output
WARNING: Unable to find version of CDP to use for . You may need to include a dependency on a specific version of the CDP using something similar to `org.seleniumhq.selenium:selenium-devtools-v86:4.5.0` where the version ("v86") matches the version of the chromium-based browser you're using and the version number of the artifact is the same as Selenium's.

An unrecoverable stack overflow has occurred
it means that either you have an endless loop somewhere or create a large object which exceeds the thread stack size
The solutions are in:
inspect your code for any loop instances (for, foreach, while) which may fail to exit
increase stack size by passing the relevant -Xss argument
allocate another machine and switch to distributed testing mode with 750 users per machine
In general using Selenium for performance testing is not recommended, it might be a better idea to conduct the main load using JMeter's HTTP Request samplers and use 1-2 threads in another Thread Group running WebDriver Samplers to measure frontend performance, rendering speed, scripts execution time, collecting web vitals metrics and so on.

Related

Getting started on Corda on Windows

I am trying to get started on Corda on Windows and I am following the started guides using the following docs:
https://docs.corda.net/quickstart-index.html#setting-up-a-development-environment
https://vimeo.com/217462250
https://docs.corda.net/getting-set-up.html
I have downloaded all the latest version (as of 22.09.19) of Git (2.23.0, 64-bit version) / Java JDK (jdk-8u221-windows-x64.exe) / and the latest IntelliJ.
However I am facing the following issues:
When I open the 'Event Log' I don't see any messages event gradle message
Also when I try and run the Nodes from Intellj > Run CordaApps Kotlin I get the following error message:
When I try and run the nodes from the Git bash terminal
Jatin#LAPTOP-16QRBJDJ MINGW64 ~/cordapp-tutorial (release-V3)
$ ./gradlew.bat deployNodes
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
:java-source:compileJava UP-TO-DATE
:java-source:processResources UP-TO-DATE
:java-source:classes UP-TO-DATE
:java-source:configureCordappFatJar
:java-source:jar UP-TO-DATE
:java-source:deployNodes
Bootstrapping local network in C:\Users\Jatin\cordapp-tutorial\java-source\build\nodes
Node config files found in the root directory - generating node directories
Generating directory for Notary
Generating directory for PartyA
Generating directory for PartyB
Generating directory for PartyC
Nodes found in the following sub-directories: [Notary, PartyA, PartyB, PartyC]
Waiting for all nodes to generate their node-info files...
:java-source:deployNodes FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':java-source:deployNodes'.
> Node in Notary exited with 1 when generating its node-info - see logs in C:\Users\Jatin\cordapp-tutorial\java-source\build\nodes\Notary\logs
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 23s
5 actionable tasks: 2 executed, 3 up-to-date
The log:
CAPSULE EXCEPTION: Illegal char <"> at index 34: C:\Program Files\Java\jdk1.7.0\bin" (for stack trace, run with -Dcapsule.log=verbose)
USAGE: <options> corda.jar
Actions:
capsule.version - Prints the capsule and application versions.
capsule.modes - Prints all available capsule modes.
capsule.jvms - Prints a list of all JVM installations found.
capsule.help - Prints this help message.
Options:
capsule.mode=<value> - Picks the capsule mode to run.
capsule.reset - Resets the capsule cache before launching. The capsule to be re-extracted (if applicable), and other possibly cached files will `enter code here`be recreated.
capsule.log=<value> (default: quiet) - Picks a log level. Must be one of none, quiet, verbose, or debug.
capsule.java.home=<value> - Sets the location of the Java home (JVM installation directory) to use; If 'current' forces the use of the JVM that launched the capsule.
capsule.java.cmd=<value> - Sets the path to the Java executable to use.
capsule.jvm.args=<value> - Sets additional JVM arguments to use when running the application."
Have you set Java classpath to point to jdk1.8.0_221?
From the log record it seems that the jdk is 1.7. Corda require at least version 8u171. Please check the classpath and installed java version.
You should add Java to the PATH environment variable by following the instructions in the Oracle documentation - "https://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html#path"
Which java variant you are using?
If it is Adopt OpenJDK 8, use HotSpot JVM not the OpenJ9 Version.
Here is the link for windows x64 AdoptOpenJDK 8

Issue installing openwhisk with incubator-openwhisk-devtools

I have a blocking issue installing openwhisk with docker
I typed make quick-start right after a git pull of the project incubator-openwhisk-devtools. My OS is Fedora 29, docker version is 18.09.0, docker-compose version is 1.22.0. JDk 8 Oracle.
I get the following error:
[...]
adding the function to whisk ...
ok: created action hello
invoking the function ...
error: Unable to invoke action 'hello': The server is currently unavailable (because it is overloaded or down for maintenance). (code ciOZDS8VySDyVuETF14n8QqB9wifUboT)
[...]
[ERROR] [#tid_sid_unknown] [Invoker] failed to ping the controller: org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for health-0: 30069 ms has passed since batch creation plus linger time
[ERROR] [#tid_sid_unknown] [KafkaProducerConnector] sending message on topic 'health' failed: Expiring 1 record(s) for health-0: 30009 ms has passed since batch creation plus linger time
Please note that controller-local-logs.log is never created.
If I issue a touch controller-local-logs.log in the right directory the log file is always empty after I try to issue make quick-start again.
http://localhost:8888/ping gives me the right answer: pong.
http://localhost:9222 is not reacheable.
Where am I wrong?
Thank you in advance

Sonarqube : The 'report' parameter is missing

I am using MSBuild. I have Java 8 installed.
I am running the following commands:
SonarQube.Scanner.MSBuild.exe begin /k:"ABC" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="8b839xxxxxxxxxxxxxxxxxxxxxxx6b00125bf92" /d:sonar.verbose=true
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe" /t:rebuild
SonarQube.Scanner.MSBuild.exe end /d:sonar.login="8b839xxxxxxxxxxxxxxxxxxxxxxx6b00125bf92"
The last step fails:
ERROR: Error during SonarQube Scanner execution
ERROR: The 'report' parameter is missing
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
The SonarQube Scanner did not complete successfully
12:53:21.909 Creating a summary markdown file...
12:53:21.918 Post-processing failed. Exit code: 1
The MSBuild version is greater than 14.
Java 8 is properly installed. Documentation indicates that Java 8 is adequate.
Any idea on what could be wrong?
Where do I add the -X switch? I tried on all 3 statements
Update :I installed Java SDK 9. Still same issue.
Update :With verbose logging and using /n naming parameter:
INFO: Analysis report generated in 992ms, dir size=4 MB
INFO: Analysis reports compressed in 549ms, zip size=1 MB
INFO: Analysis report generated in C:\ABC\.sonarqube\out\.sonar\scanner-report
DEBUG: Upload report
DEBUG: POST 400 http://localhost:9000/api/ce/submit?projectKey=ABC | time=1023ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 54.833s
INFO: Final Memory: 51M/170M
INFO: ------------------------------------------------------------------------
DEBUG: Execution getVersion
DEBUG: Execution stop
ERROR: Error during SonarQube Scanner execution
ERROR: The 'report' parameter is missing
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
Process returned exit code 1
The SonarQube Scanner did not complete successfully
Creating a summary markdown file...
Post-processing failed. Exit code: 1
I've struggled the same problem with SonarQube and I've finally found a solution:
You need to restart sonar service after using evaluation token.
Please note this isn't the answer, however I feel this feedback is valuable to getting this question answered.
I can reproduce this issue in POSTMan with a POST request to:
http://localhost:9000/api/ce/submit?projectKey=myProjectKey
This returns
{
"errors": [
{
"msg": "The 'report' parameter is missing"
}
]
}
You can get a similar error by removing the projectKey query parameter. I tried adding a report query parameter and received the same error:
http://localhost:9000/api/ce/submit?projectKey=brian3016&report=report
Given this, I feel there is a problem with their code. It should have included a report parameter when creating the POST request, but it failed to do so.
Verbose output seems to have changed from using the -X switch to /d:sonar.verbose=true. E.G.
SonarScanner.MSBuild.exe begin /k:"myProjectKey" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="myLogin" /d:sonar.verbose=true
Note the verbose logging didn't give me any valuable insight.
(Also note that the documentation currently says to use SonarQube.Scanner.MSBuild.exe, but the verbose logger told me to switch to SonarScanner.MSBuild.exe)
SO...how we we report this issue to someone that can fix it? Their documentation says to go to Stackoverflow. So here we are.
I thought it may have been an issue with a project. So I created a new project with nothing other than the startup template Console Application. Same error.
In my case SonarQube 7.9.1 (deployed with Helm to Kubernetes cluster) was missing temp directory /opt/sonarqube/temp/tc/work/Tomcat/localhost/ROOT after Helm rollback. No idea what happened to it.
Logfile /opt/sonarqube/logs/web.log inside SonarQube pod had this error:
2021.02.02 06:57:03 WARN web[AXdZ6l6MParQCncJACv3][o.s.s.w.ServletRequest] Can't read file part for parameter report
java.io.IOException: The temporary upload location [/opt/sonarqube/temp/tc/work/Tomcat/localhost/ROOT] is not valid
The fix was to exec into pod and create the missing directory. Would like to know the reason though...
The issue is with the sonar service starting up.
First try to stop the SonarStart.bat by using Ctrl+c, and then try to open localhost:9000 ( or whichever port you configured sonar server).
If it is still opening then go to task manager and search for wrapper.exe service and stop the service. If no service is found then go to:
Task manager>Details> and stop all java.exe process.
Note: If you running many Java applications, right-click the java.exe and choose goto service, and stop only those java.exe that belongs to AppX deployment.services
Now start sonarstart.bat as administrator..
today i face the same error when using jenkins to scanner the code.
get the error when POST /api/ce/submit and get 400 code by add the sonar.verbose=true
i use the below step to check reason
first to restart the sonarqube => failed
check the report file size by using "du -sh" get 108m and DB server support 1G => failed
login the sonar-qube server and check the access.log, web.log and another log, finally find the error reason " Processing of multipart/form-data request failed. No space left on device", so i check the server by command "df -h", some devices are used 100% => so i remove some no-using file and fix it!!!
check if you have enough memory
ex: free -m
In my case I had to upgrade memory.

sonarqube OutOfMemoryError (PermGen space)

I use Sonarqube 4.5.1 (new install) with jdk7u55.
Installed on Windows server 2012 (4 GB internal memory)
I get this message in the sonar.log on the server where sonarqube-webserver is installed.
Error occured while clicking in the pages of the webserver of sonarqube
I tried to raise the value wrapper.java.maxmemory= from 32 to 512 to 2048 but OutOfMemoryError keep occuring.
complete error message:
Exception in thread "http-bio-10.2.31.127-80-exec-3" Exception in thread "http-bio-10.2.31.127-80-exec-1" 2014.11.04 14:19:02 ERROR web[rails]
Java::JavaLang::OutOfMemoryError (PermGen space):
Exception in thread "http-bio-10.2.31.127-80-exec-2" 2014.11.04 14:19:06 ERROR web[o.s.s.ui.JRubyFacade] Fail to render: localhost/sonar/drilldown/issues/10000?severity=MAJOR
PermGen space
In app/views/layouts/_breadcrumb.html.erb
As you can read in the "Tuning the Web server" part of the install documentation, the correct place to specify JVM parameters for the Web server is the <install_directory>/conf/sonar.properties file and more specifically the sonar.web.javaOpts property.
Since SonarQube 4.5, the wrapper configuration file is used only to force the path to the Java command.

Jenkins build fails after running Cucumber tests on Java heap space exception

I get following exception when building using Jenkins. This exception raises after running Cucumber tests.
Can anyone tell the exact spot that fails on the java heap space?
Do you have any idea what can be done in order to solve it?
Some background: I had a java heap space during the Cucumber tests, after I increased the memory, Cucumber tests pass, but I get this java heap space right after.
Thanks,
Lior
mojoSucceeded org.apache.maven.plugins:maven-surefire-plugin:2.9(default-test)
[JENKINS] Recording test results
mavenExecutionResult exceptions not empty
message : Java heap space
Stack trace :
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:3209)
at java.lang.String.<init>(String.java:215)
at com.sun.org.apache.xerces.internal.xni.XMLString.toString(XMLString.java:185)
at com.sun.org.apache.xerces.internal.util.XMLAttributesImpl.getValue(XMLAttributesImpl.java:537)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser$AttributesProxy.getValue(AbstractSAXParser.java:2319)
at org.dom4j.tree.AbstractElement.setAttributes(AbstractElement.java:543)
at org.dom4j.io.SAXContentHandler.addAttributes(SAXContentHandler.java:916)
at org.dom4j.io.SAXContentHandler.startElement(SAXContentHandler.java:249)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.dom4j.io.SAXReader.read(SAXReader.java:264)
at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:112)
at hudson.tasks.junit.TestResult.parse(TestResult.java:227)
at hudson.tasks.junit.TestResult.parse(TestResult.java:163)
at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:141)
at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:421)
at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:403)
at org.jfrog.build.extractor.maven.BuildInfoRecorder.mojoSucceeded(BuildInfoRecorder.java:241)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87)
at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228)
channel stopped
Go into the Jenkins settings and add the environment variable MAVEN_OPTS to -Xmx512m -XX:MaxPermSize=256m. It looks like after your tests are finished it's trying to parse the results but the XML file is too large.
I'm not sure what your CI environment is like, but if you're running Jenkins as a Windows Service, you could also try increasing the heap size that's available to it.
To do this, locate the file at ${JENKINS_HOME}\jenkins.xml and update the command line arguments appropriately. (ie, change "-Xmx256m" to a larger value such as "-Xmx512m").
I would first try to analyze the reason for the longer output from the cucumber.
In my case it was same stack trace which was reported by the cucumber for too many tests.

Resources