I don't know why but sometimes my IDE hangs for some seconds, my settings are:
-Xms128m
-Xmx2046m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
-Dsun.io.useCanonPrefixCache=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Djdk.attach.allowAttachSelf=true
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
-Dawt.useSystemAAFontSettings=lcd
-Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine
-Dsun.tools.attach.tmp.only=true
Any ideas ?
Thanks
It's a known Kernel bug. See also a bug report in YouTrack.
The workaround is to downgrade kernel to 5.3.0-45 version. Check the linked issues for the other possible solutions.
The issue started to occur with 5.3.0-46 kernel update. IDE thread dumps will have something like this:
"AWT-EventQueue-0" prio=0 tid=0x0 nid=0x0 runnable
java.lang.Thread.State: RUNNABLE
(in native)
at java.desktop#11.0.6/sun.java2d.loops.Blit.Blit(Native Method)
at java.desktop#11.0.6/sun.java2d.xr.XRPMBlitLoops.cacheToTmpSurface(XRPMBlitLoops.java:158)
at java.desktop#11.0.6/sun.java2d.xr.XrSwToPMBlit.Blit(XRPMBlitLoops.java:366)
at java.desktop#11.0.6/sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:972)
at java.desktop#11.0.6/sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:583)
at java.desktop#11.0.6/sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:86)
at java.desktop#11.0.6/sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1043)
at java.desktop#11.0.6/sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:196)
at java.desktop#11.0.6/sun.java2d.SunGraphics2D.copyImage(SunGraphics2D.java:3325)
at java.desktop#11.0.6/sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3368)
at java.desktop#11.0.6/sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3310)
You will also see the following in the system logs (dmesg output):
[ 1177.290924] i915 0000:00:02.0: GPU HANG: ecode 11:1:0x85dffffb, in Xorg [1857], hang on rcs0
[ 1177.292069] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
[ 1488.251067] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
[ 1786.262953] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
Related
I'm using Selenium for testing from Java code, it's started automatically with maven, when I run mvn verify it uses gecko-driver to start new firefox instance for selenium:
final FirefoxOptions opts = new FirefoxOptions();
if (HEADLESS_MODE) {
opts.addArguments(ARG_HEADLESS);
}
return new FirefoxDriver(opts);
It's working fine on my machine (and on machines of other developers) in both modes "headless" and normal. Now I'm trying to run Selenium tests with CI builds in Alpine Linux Docker container. When I tried to run it as-is, I've got an error:
mozrunner::runner INFO Running command: "/usr/bin/firefox"
"-marionette" "--headless" "-foreground" "-no-remote"
"-profile" "/tmp/rust_mozprofile.pW1sbkcv98QN"
Error: GDK_BACKEND does not match available displays.
Then I installed all suggested tools (dbus and xvfb) from this post and started it before running tests:
apk add xvfb dbus
dbus-uuidgen > /etc/machine-id
export DISPLAY=:99
Xvfb $DISPLAY -ac &
mvn verify
but now Selenium tests are hadning for about 10 seconds and failing with error
1565433736375 mozrunner::runner INFO Running command: "/usr/bin/firefox" "-marionette" "--headless" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile.1ZMsJ0Hy95V0"
1565433738424 Marionette INFO Listening on port 2828
!!! [Child][MessageChannel] Error: (msgtype=0x3E0003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv
[Child 2191] ###!!! ABORT: Aborting on channel error.: file /home/buildozer/aports/community/firefox-esr/src/firefox-52.8.1esr/ipc/glue/MessageChannel.cpp, line 2152
[Child 2191] ###!!! ABORT: Aborting on channel error.: file /home/buildozer/aports/community/firefox-esr/src/firefox-52.8.1esr/ipc/glue/MessageChannel.cpp, line 2152
!!! [Child][MessageChannel] Error: (msgtype=0x3E0003,name=PCompositable::Msg_Destroy) Channel error: cannot send/recv
It seems I'm doing something wrong here, what is the correct way to run headless Selenium tests in Alpine Linux Docker container? I'd prefer to configure existing Docker image instead of using Selenium images, because the migration will be expensive.
Update:
Selenium version is 3.141.59
Gecko-driver version is v0.24.0-linux64
Firefox-ESR version is: 52.8.1-r0
Update2:
xvfb, dbus and exported DISPLAY are not actually needed to run Firefox in headless mode - just run firefox --headless and it's all.
As per Mozilla --headless flag is not supported in Firefox 52-esr.Headless flag was introduced in version 55 (for Linux) and 56 (Mac/Windows) . Please try on latest Firefox ESR release.
I'm currently trying to transition a project to Bazel, but I'm running into problems running the debugger for Python in IntelliJ. I have the current version of the Bazel plugin (v2019.06.17.0.1), and am using the current Bazel version (0.28.0). When I attempt to run a test in debug, I see
/usr/local/bin/python3.6 "/path/redacted" --multiproc --qt-support=auto --client 127.0.0.1 --port 53571 --file /path/also/redacted
pydev debugger: process 24526 is connecting
Connected to pydev debugger (build #.#.#.#)
Process finished with exit code 137 (interrupted by signal 9: SIGKILL)
Has anyone found a good solution to this problem?
I was having an issue starting Intellij Idea CE on my MacBook Pro. The error message is:
…/Contents/bin /Applications/IntelliJ\ IDEA\ CE.app/Contents/MacOS/idea
2019-05-20 22:12:32.647 idea[5029:86633] allVms required 1.8*,1.8+
2019-05-20 22:12:32.651 idea[5029:86638] Value of IDEA_VM_OPTIONS is (null)
2019-05-20 22:12:32.652 idea[5029:86638] Processing VMOptions file at /Users/pengxiao/Library/Preferences/IdeaIC2019.1/idea.vmoptions
2019-05-20 22:12:32.652 idea[5029:86638] Done
-Xms128m
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error occurred during initialization of VM
Could not find agent library yjpagent on the library path, with error: dlopen(libyjpagent.dylib, 1): image not found
I finally found the cause was the idea.vmoptions file. The content of the file was:
…/Contents/bin $ cat ~/Library/Preferences/IdeaIC2019.1/idea.vmoptions
-Xms128m
-Xmx750m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:MaxJavaStackTraceDepth=10000
-Xverify:none
-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof
-Xbootclasspath/a:../lib/boot.jar
-agentlib:yjpagent=probe_disable=*,disablealloc,disabletracing,onlylocal,disableexceptiontelemetry,delay=10000,sessionname=IntelliJIdea2017.2%
I believe it the last line of that file that has caused the issue. After I removed the file, I can start Idea without any issues.
I have a virtual machine with Centos7 in virtual box. I have installed there glassfish 5.0 from here: Full platform - glassfish 5.0. I simply unzipped the folder in /opt. I'm using "host-only".
The following is my java version:
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
I have enabled secure admin with the following command:
asadmin --host localhost --port 4848 enable-secure-admin
I go in vm shell and digit "ifconfig" to know the ip.
Then, I go in power shell (win + x) of my windows host and type, to connect via ssh:
ssh user#x.x.x.x
Then:
cd /opt/glassfish5/bin
./asadmin start-domain domain1
Then I come back to my host, I open google chrome and:
http://x.x.x.x:8080 seems fine
http://x.x.x.x:4848 forces to https and then the browser tells me it's impossible to reach the website
I have tried to uninstall secure-admin (at least before glassfish gave me the exception which said that secure-admin was needed for DAS or anything like that):
./asadmin --host localhost --port 4848 disable-secure-admin
but I get the following exception:
NCLS-ADMIN-00010
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
Command disable-secure-admin failed.
I get the following exception in my log after calling admin console:
[2018-05-16T16:35:59.644+0200] [glassfish 5.0] [WARNING] [] [org.glassfish.grizzly.filterchain.DefaultFilterChain] [tid: _ThreadID=42 _ThreadName=admin-listener(3)] [timeMillis: 1526481359644] [levelValue: 900] [[
GRIZZLY0013: Exception during FilterChain execution
java.lang.NoClassDefFoundError: sun/security/ssl/SupportedEllipticCurvesExtension
at sun.security.ssl.HelloExtensions.<init>(HelloExtensions.java:82)
at sun.security.ssl.HandshakeMessage$ClientHello.<init>(HandshakeMessage.java:362)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:223)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:984)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:924)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:921)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1379)
at org.glassfish.grizzly.ssl.SSLUtils.executeDelegatedTask(SSLUtils.java:274)
at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:708)
at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:622)
at org.glassfish.grizzly.ssl.SSLBaseFilter.handleRead(SSLBaseFilter.java:334)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:539)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573)
at java.lang.Thread.run(Thread.java:748)
]]
The answer is your version of Java is too new for GlassFish. I already answered this here: https://stackoverflow.com/a/49998266/212224
To stop the java.lang.NoClassDefFoundError you need to use a version of Java no higher than 8u151
This is due to a change in internal JDK classes which Grizzly uses for
HTTP/2.
GlassFish 5.0 does not have the latest version of Grizzly which is
compatible with the latest Java 8 updates. If you are using GlassFish
5.0 and see these errors, you have 2 choices:
Downgrade Java to 8u152 or earlier
Download the latest GlassFish 5.0.1 nightly, where this should be fixed
Ref:
https://github.com/javaee/glassfish/issues/22436#issuecomment-374829430
I am using Linux Mint 17.3 . i want to configure JBOSS server in my system. whenever i command sh.standalone.sh it is showing following screen but doesnot starting server.
indra#Jarvis ~/jboss-as-7.1.1.Final/bin $ sh standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/indra/jboss-as-7.1.1.Final
JAVA: /usr/lib/jvm/java-8-oracle/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
=========================================================================
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
09:45:02,152 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
09:45:02,517 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
09:45:02,629 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
^C09:47:05,537 INFO [org.jboss.as] JBAS015950: JBoss AS 7.1.1.Final "Brontes" stopped in 1ms
i wait for 15 min but it is not starting .
please someone guide me.
JBoss AS 7.1.1.Final does not work with Java 8, https://developer.jboss.org/message/926279#926279. You consider migrating to WildFly 10 as it requires Java 8.