Chromedriver hangs when creating multiple instances

I am using selenium chrome reverse for testing the web interface. I am writing one test for one java class. For each test, I create one instance of the chrome rib. I am running all my tests on 10 threads. I have 700 tests.

Problem: When I run a build config with all tests, the chrome grid sometimes hangs when randomly testing. I am getting a thread dump in this case, please help me to read this, I cannot figure out the cause of this problem:

Attaching to process ID 8901, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.25-b02
Deadlock Detection:

No deadlocks found.

Thread 10095: (state = IN_NATIVE)
 - java.io.FileInputStream.readBytes(byte[], int, int) @bci=0 (Compiled frame; information may be imprecise)
 - java.io.FileInputStream.read(byte[], int, int) @bci=4, line=246 (Compiled frame)
 - java.io.BufferedInputStream.fill() @bci=214, line=246 (Interpreted frame)
 - java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=286 (Interpreted frame)
 - java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=345 (Interpreted frame)
 - java.io.FilterInputStream.read(byte[]) @bci=5, line=107 (Interpreted frame)
 - org.apache.commons.exec.StreamPumper.run() @bci=31, line=105 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 10094: (state = IN_NATIVE)
 - java.io.FileInputStream.readBytes(byte[], int, int) @bci=0 (Compiled frame; information may be imprecise)
 - java.io.FileInputStream.read(byte[], int, int) @bci=4, line=246 (Compiled frame)
 - java.io.BufferedInputStream.fill() @bci=214, line=246 (Interpreted frame)
 - java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=286 (Interpreted frame)
 - java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=345 (Interpreted frame)
 - java.io.FilterInputStream.read(byte[]) @bci=5, line=107 (Interpreted frame)
 - org.apache.commons.exec.StreamPumper.run() @bci=31, line=105 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 10091: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.Object.wait() @bci=2, line=502 (Interpreted frame)
 - java.lang.UNIXProcess.waitFor() @bci=8, line=264 (Interpreted frame)
 - org.apache.commons.exec.DefaultExecutor.executeInternal(org.apache.commons.exec.CommandLine, java.util.Map, java.io.File, org.apache.commons.exec.ExecuteStreamHandler) @bci=106, line=347 (Interpreted frame)
 - org.apache.commons.exec.DefaultExecutor.access$200(org.apache.commons.exec.DefaultExecutor, org.apache.commons.exec.CommandLine, java.util.Map, java.io.File, org.apache.commons.exec.ExecuteStreamHandler) @bci=6, line=46 (Interpreted frame)
 - org.apache.commons.exec.DefaultExecutor$1.run() @bci=29, line=188 (Interpreted frame)


Thread 10090: (state = IN_NATIVE)
 - java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Interpreted frame)
 - java.net.SocketInputStream.read(byte[], int, int, int) @bci=79, line=150 (Interpreted frame)
 - java.net.SocketInputStream.read(byte[], int, int) @bci=11, line=121 (Interpreted frame)
 - org.apache.http.impl.io.SessionInputBufferImpl.streamRead(byte[], int, int) @bci=16, line=136 (Interpreted frame)
 - org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer() @bci=68, line=152 (Interpreted frame)
 - org.apache.http.impl.io.SessionInputBufferImpl.readLine(org.apache.http.util.CharArrayBuffer) @bci=130, line=270 (Compiled frame)
 - org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(org.apache.http.io.SessionInputBuffer) @bci=16, line=140 (Interpreted frame)
 - org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(org.apache.http.io.SessionInputBuffer) @bci=2, line=57 (Interpreted frame)
 - org.apache.http.impl.io.AbstractMessageParser.parse() @bci=38, line=260 (Interpreted frame)
 - org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader() @bci=8, line=161 (Interpreted frame)
 - sun.reflect.GeneratedMethodAccessor8.invoke(java.lang.Object, java.lang.Object[]) @bci=36 (Interpreted frame)
 - sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=43 (Compiled frame)
 - java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=56, line=483 (Compiled frame)
 - org.apache.http.impl.conn.CPoolProxy.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) @bci=91, line=138 (Compiled frame)
 - com.sun.proxy.$Proxy10.receiveResponseHeader() @bci=9 (Interpreted frame)
 - org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(org.apache.http.HttpRequest, org.apache.http.HttpClientConnection, org.apache.http.protocol.HttpContext) @bci=41, line=271 (Interpreted frame)
 - org.apache.http.protocol.HttpRequestExecutor.execute(org.apache.http.HttpRequest, org.apache.http.HttpClientConnection, org.apache.http.protocol.HttpContext) @bci=39, line=123 (Interpreted frame)
 - org.apache.http.impl.execchain.MainClientExec.execute(org.apache.http.conn.routing.HttpRoute, org.apache.http.client.methods.HttpRequestWrapper, org.apache.http.client.protocol.HttpClientContext, org.apache.http.client.methods.HttpExecutionAware) @bci=714, line=254 (Interpreted frame)
 - org.apache.http.impl.execchain.ProtocolExec.execute(org.apache.http.conn.routing.HttpRoute, org.apache.http.client.methods.HttpRequestWrapper, org.apache.http.client.protocol.HttpClientContext, org.apache.http.client.methods.HttpExecutionAware) @bci=436, line=195 (Interpreted frame)
 - org.apache.http.impl.execchain.RetryExec.execute(org.apache.http.conn.routing.HttpRoute, org.apache.http.client.methods.HttpRequestWrapper, org.apache.http.client.protocol.HttpClientContext, org.apache.http.client.methods.HttpExecutionAware) @bci=39, line=86 (Interpreted frame)
 - org.apache.http.impl.execchain.RedirectExec.execute(org.apache.http.conn.routing.HttpRoute, org.apache.http.client.methods.HttpRequestWrapper, org.apache.http.client.protocol.HttpClientContext, org.apache.http.client.methods.HttpExecutionAware) @bci=85, line=108 (Interpreted frame)
 - org.apache.http.impl.client.InternalHttpClient.doExecute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) @bci=167, line=186 (Interpreted frame)
 - org.apache.http.impl.client.CloseableHttpClient.execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) @bci=4, line=72 (Interpreted frame)
 - org.apache.http.impl.client.CloseableHttpClient.execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) @bci=4, line=57 (Interpreted frame)
 - org.openqa.selenium.remote.HttpCommandExecutor.fallBackExecute(org.apache.http.protocol.HttpContext, org.apache.http.client.methods.HttpUriRequest) @bci=10, line=215 (Interpreted frame)
 - org.openqa.selenium.remote.HttpCommandExecutor.execute(org.openqa.selenium.remote.Command) @bci=269, line=184 (Interpreted frame)
 - org.openqa.selenium.remote.service.DriverCommandExecutor.execute(org.openqa.selenium.remote.Command) @bci=21, line=66 (Interpreted frame)
 - org.openqa.selenium.remote.RemoteWebDriver.execute(java.lang.String, java.util.Map) @bci=74, line=572 (Interpreted frame)
 - org.openqa.selenium.remote.RemoteWebDriver.startSession(org.openqa.selenium.Capabilities, org.openqa.selenium.Capabilities) @bci=39, line=240 (Interpreted frame)
 - org.openqa.selenium.remote.RemoteWebDriver.<init>(org.openqa.selenium.remote.CommandExecutor, org.openqa.selenium.Capabilities, org.openqa.selenium.Capabilities) @bci=88, line=126 (Interpreted frame)
 - org.openqa.selenium.remote.RemoteWebDriver.<init>(org.openqa.selenium.remote.CommandExecutor, org.openqa.selenium.Capabilities) @bci=4, line=139 (Interpreted frame)
 - org.openqa.selenium.chrome.ChromeDriver.<init>(org.openqa.selenium.chrome.ChromeDriverService, org.openqa.selenium.Capabilities) @bci=10, line=171 (Interpreted frame)
 - org.openqa.selenium.chrome.ChromeDriver.<init>(org.openqa.selenium.chrome.ChromeDriverService, org.openqa.selenium.chrome.ChromeOptions) @bci=6, line=160 (Interpreted frame)
 - org.openqa.selenium.chrome.ChromeDriver.<init>(org.openqa.selenium.chrome.ChromeDriverService) @bci=9, line=128 (Interpreted frame)
 - com.wrike.qa.common.Environment$Browser$ChromeDriverInitializer.init() @bci=66, line=151 (Interpreted frame)
 - com.wrike.qa.common.Environment$Browser.getDrv() @bci=12, line=230 (Interpreted frame)
 - com.wrike.qa.tests.base.BaseDriverTest.setUp() @bci=39, line=72 (Interpreted frame)
 - sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) @bci=0 (Interpreted frame)
 - sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=100, line=62 (Interpreted frame)
 - sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) @bci=6, line=43 (Compiled frame)
 - java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) @bci=56, line=483 (Compiled frame)
 - org.junit.runners.model.FrameworkMethod$1.runReflectiveCall() @bci=15, line=44 (Interpreted frame)
 - org.junit.internal.runners.model.ReflectiveCallable.run() @bci=1, line=15 (Interpreted frame)
 - org.junit.runners.model.FrameworkMethod.invokeExplosively(java.lang.Object, java.lang.Object[]) @bci=10, line=41 (Interpreted frame)
 - org.junit.internal.runners.statements.RunBefores.evaluate() @bci=38, line=27 (Interpreted frame)
 - org.junit.internal.runners.statements.RunAfters.evaluate() @bci=18, line=31 (Interpreted frame)
 - org.junit.internal.runners.statements.FailOnTimeout$1.run() @bci=7, line=28 (Interpreted frame)


Thread 8948: (state = IN_NATIVE)
 - java.lang.UNIXProcess.waitForProcessExit(int) @bci=0 (Interpreted frame)
 - java.lang.UNIXProcess.access$500(java.lang.UNIXProcess, int) @bci=2, line=55 (Interpreted frame)
 - java.lang.UNIXProcess$4.run() @bci=11, line=228 (Interpreted frame)
 - java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1142 (Interpreted frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 8928: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.util.TimerThread.mainLoop() @bci=201, line=552 (Interpreted frame)
 - java.util.TimerThread.run() @bci=1, line=505 (Interpreted frame)


Thread 8927: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.Thread.join(long) @bci=70, line=1253 (Interpreted frame)
 - org.junit.internal.runners.statements.FailOnTimeout.evaluate() @bci=18, line=36 (Interpreted frame)
 - org.junit.runners.BlockJUnit4ClassRunner.runChild(org.junit.runners.model.FrameworkMethod, org.junit.runner.notification.RunNotifier) @bci=31, line=76 (Interpreted frame)
 - org.junit.runners.BlockJUnit4ClassRunner.runChild(java.lang.Object, org.junit.runner.notification.RunNotifier) @bci=6, line=50 (Interpreted frame)
 - org.junit.runners.ParentRunner$3.run() @bci=12, line=193 (Interpreted frame)
 - org.junit.runners.ParentRunner$1.schedule(java.lang.Runnable) @bci=1, line=52 (Interpreted frame)
 - org.junit.runners.ParentRunner.runChildren(org.junit.runner.notification.RunNotifier) @bci=40, line=191 (Interpreted frame)
 - org.junit.runners.ParentRunner.access$000(org.junit.runners.ParentRunner, org.junit.runner.notification.RunNotifier) @bci=2, line=42 (Interpreted frame)
 - org.junit.runners.ParentRunner$2.evaluate() @bci=8, line=184 (Interpreted frame)
 - org.junit.runners.ParentRunner.run(org.junit.runner.notification.RunNotifier) @bci=20, line=236 (Interpreted frame)
 - junit.framework.JUnit4TestAdapter.run(junit.framework.TestResult) @bci=13, line=39 (Interpreted frame)
 - org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run() @bci=693, line=518 (Interpreted frame)
 - org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest) @bci=379, line=1420 (Interpreted frame)
 - org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest) @bci=80, line=848 (Interpreted frame)
 - org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(java.util.Enumeration, boolean) @bci=55, line=1899 (Interpreted frame)
 - org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute() @bci=55, line=800 (Interpreted frame)
 - com.wrike.qa.launcher.TestTask.call() @bci=157, line=114 (Interpreted frame)
 - com.wrike.qa.launcher.TestTask.call() @bci=1, line=24 (Interpreted frame)
 - java.util.concurrent.FutureTask.run() @bci=42, line=266 (Interpreted frame)
 - java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1142 (Interpreted frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 8914: (state = BLOCKED)


Thread 8913: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.ref.ReferenceQueue.remove(long) @bci=44, line=142 (Compiled frame)
 - java.lang.ref.ReferenceQueue.remove() @bci=2, line=158 (Compiled frame)
 - java.lang.ref.Finalizer$FinalizerThread.run() @bci=36, line=209 (Interpreted frame)


Thread 8912: (state = BLOCKED)
 - java.lang.Object.wait(long) @bci=0 (Interpreted frame)
 - java.lang.Object.wait() @bci=2, line=502 (Interpreted frame)
 - java.lang.ref.Reference$ReferenceHandler.run() @bci=36, line=157 (Interpreted frame)


Thread 8902: (state = BLOCKED)
 - sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
 - java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Interpreted frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Interpreted frame)
 - java.util.concurrent.ThreadPoolExecutor.awaitTermination(long, java.util.concurrent.TimeUnit) @bci=68, line=1465 (Interpreted frame)
 - com.wrike.qa.launcher.Runner.main(java.lang.String[]) @bci=429, line=120 (Interpreted frame)

      

+3


source to share





All Articles