You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
Linux can sometimes raise Errno::EBADF on TCPServer.new. This is relevant in the SocketLock
class - this exception is not rescued to indicate that the lock could not be obtained.
Typically this occurs when many processes are trying to access the lock at the same
time.
What steps will reproduce the problem?
1. On linux, run this script: https://gist.github.com/ec9a6d708780e951146f
It is a minimal extraction of the offending code, with concurrency ramped up to practically
guarantee a replication.
What is the expected output? What do you see instead?
No exception, selenium should continue waiting on the lock. Instead the following exception
is raised:
Errno::EBADF:
Bad file descriptor
# /var/lib/jenkins/gems/ruby/1.9.1/gems/selenium-webdriver-0.1.2/lib/selenium/webdriver/firefox/socket_lock.rb:57:in
`initialize'
# /var/lib/jenkins/gems/ruby/1.9.1/gems/selenium-webdriver-0.1.2/lib/selenium/webdriver/firefox/socket_lock.rb:57:in
`new'
# /var/lib/jenkins/gems/ruby/1.9.1/gems/selenium-webdriver-0.1.2/lib/selenium/webdriver/firefox/socket_lock.rb:57:in
`can_lock?'
# /var/lib/jenkins/gems/ruby/1.9.1/gems/selenium-webdriver-0.1.2/lib/selenium/webdriver/firefox/socket_lock.rb:43:in
`lock'
# /var/lib/jenkins/gems/ruby/1.9.1/gems/selenium-webdriver-0.1.2/lib/selenium/webdriver/firefox/socket_lock.rb:29:in
`locked'
# /var/lib/jenkins/gems/ruby/1.9.1/gems/selenium-webdriver-0.1.2/lib/selenium/webdriver/firefox/launcher.rb:32:in
`launch'
# /var/lib/jenkins/gems/ruby/1.9.1/gems/selenium-webdriver-0.1.2/lib/selenium/webdriver/firefox/bridge.rb:21:in
`initialize'
# /var/lib/jenkins/gems/ruby/1.9.1/gems/selenium-webdriver-0.1.2/lib/selenium/webdriver/common/driver.rb:27:in
`new'
# /var/lib/jenkins/gems/ruby/1.9.1/gems/selenium-webdriver-0.1.2/lib/selenium/webdriver/common/driver.rb:27:in
`for'
# /var/lib/jenkins/gems/ruby/1.9.1/gems/selenium-webdriver-0.1.2/lib/selenium/webdriver.rb:73:in
`for'
What version of the product are you using? On what operating system?
selenium-webdriver-0.1.2, though the issue is also present in 0.2.0
Recommended fix: Add Errno::EBADF to the list of rescued exceptions alongside SocketError
and Errno::EADDRINUSE.
Reported by hello@xaviershay.com on 2011-04-30 00:39:21
The text was updated successfully, but these errors were encountered:
Originally reported on Google Code with ID 1611
Reported by
hello@xaviershay.com
on 2011-04-30 00:39:21The text was updated successfully, but these errors were encountered: