Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

OutOfMemoryError: unable to create new native thread - on starting Safari WebDriver v 2.38 #6733

Open
lukeis opened this issue Mar 4, 2016 · 6 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 6733

On launching Safari browser on v 2.38, the following exception is thrown.
OutOfMemoryError: unable to create new native thread...

What steps will reproduce the problem?
1. Use the selenium standalone server 2.38.jar.
2. Create the safari webdriver instance and try loading the url. say: www.google.com
3. The following exception is thrown on creating the safari instance. This exception
is thrown only on servers.. (say: Jenkins). Locally it is working fine.

java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Thread.java:658)
    at java.util.concurrent.ThreadPoolExecutor.addThread(ThreadPoolExecutor.java:681)
    at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:655)
    at org.jboss.netty.util.internal.DeadLockProofWorker.start(DeadLockProofWorker.java:38)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.openSelector(AbstractNioWorker.java:204)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.<init>(AbstractNioWorker.java:127)
    at org.jboss.netty.channel.socket.nio.NioWorker.<init>(NioWorker.java:40)
    at org.jboss.netty.channel.socket.nio.NioWorkerPool.createWorker(NioWorkerPool.java:34)
    at org.jboss.netty.channel.socket.nio.NioWorkerPool.createWorker(NioWorkerPool.java:26)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorkerPool.<init>(AbstractNioWorkerPool.java:56)
    at org.jboss.netty.channel.socket.nio.NioWorkerPool.<init>(NioWorkerPool.java:29)
    at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.<init>(NioServerSocketChannelFactory.java:131)
    at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.<init>(NioServerSocketChannelFactory.java:115)
    at org.openqa.selenium.safari.SafariDriverServer.start(SafariDriverServer.java:81)
    at org.openqa.selenium.safari.SafariDriverServer.start(SafariDriverServer.java:70)
    at org.openqa.selenium.safari.SafariDriverCommandExecutor.start(SafariDriverCommandExecutor.java:93)
    at org.openqa.selenium.safari.SafariDriver.startClient(SafariDriver.java:77)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:115)
    at org.openqa.selenium.safari.SafariDriver.<init>(SafariDriver.java:63)
    at org.openqa.selenium.safari.SafariDriver.<init>(SafariDriver.java:47)

In the same environment (Jenkins), Selenium server v2.28 is working fine...i.e., Safari
browser gets launched and the test continues... No problems at all...

What is the expected output? What do you see instead?
1. The safari instance should be working on all the environments.

Selenium version: 2.38
OS: Mac
Browser: Safari
Browser version: 5+



Reported by saraav on 2013-12-17 07:35:16

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

OS: Mac Lion
JDK: 1.6

Reported by saraav on 2013-12-17 13:38:44

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by barancev on 2013-12-17 19:02:49

  • Labels added: Component-WebDriver, Browser-Safari

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by barancev on 2013-12-25 19:01:24

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by jmleyba on 2013-12-25 23:27:17

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

I don't think this issue is related to selenium. It's all up to how you allocate the
resources for the JVM. If you are using maven please use
<argLine>-Xmx64m</argLine> in the pom file
and the Xmx size varies from maximum of 64 to 1024 and also try managing the fork count
effectively if you are using surefire.
If you need more details, please update what language you are using and your configuration
properties

thanks,
Ajmal

Reported by aalavudeen@sirahu.com on 2014-06-13 10:21:26

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 17:46:32

  • Labels added: Restrict-AddIssueComment-Commit

@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant