Closed Bug 1622736 Opened 5 years ago Closed 4 years ago

geckodriver crashes related to "OSError: [Errno 24] Too many open files"

Categories

(Testing :: web-platform-tests, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1653294

People

(Reporter: whimboo, Unassigned)

Details

(Keywords: crash)

I run the webdriver test delete_session/delete.py in a loop for about half an hour to detect a possible intermittent. Then geckodriver crashed, and the following error was visible:

11:15.45 pid:11373 thread 'tokio-runtime-worker-0' panicked at 'failed to open /dev/urandom: Os { code: 24, kind: Other, message: "Too many open files" }', src/libcore/result.rs:1165:5
11:15.45 pid:11373 stack backtrace:
11:15.45 pid:11373    0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
11:15.45 pid:11373    1: core::fmt::write
11:15.45 pid:11373    2: std::io::Write::write_fmt
11:15.45 pid:11373    3: std::panicking::default_hook::{{closure}}
11:15.45 pid:11373    4: std::panicking::default_hook
11:15.45 pid:11373    5: std::panicking::rust_panic_with_hook
11:15.45 pid:11373    6: std::panicking::continue_panic_fmt
11:15.45 pid:11373    7: rust_begin_unwind
11:15.45 pid:11373    8: core::panicking::panic_fmt
11:15.45 pid:11373    9: core::result::unwrap_failed
11:15.45 pid:11373   10: std::thread::local::fast::Key<T>::try_initialize
11:15.46 pid:11373   11: std::thread::local::LocalKey<T>::try_with
11:15.46 pid:11373   12: std::thread::local::LocalKey<T>::with
11:15.46 pid:11373   13: lazy_static::lazy::Lazy<T>::get::{{closure}}
11:15.46 pid:11373   14: std::sync::once::Once::call_inner
11:15.46 pid:11373   15: std::sync::once::Once::call_once
11:15.46 pid:11373   16: <tokio_threadpool::pool::prng_seed::RND_STATE as core::ops::deref::Deref>::deref
11:15.46 pid:11373   17: tokio_threadpool::pool::prng_seed
11:15.46 pid:11373   18: tokio_threadpool::pool::Pool::rand_usize::RNG::__init
11:15.46 pid:11373   19: std::thread::local::lazy::LazyKeyInner<T>::initialize
11:15.46 pid:11373   20: std::thread::local::fast::Key<T>::try_initialize
11:15.46 pid:11373   21: std::thread::local::LocalKey<T>::try_with
11:15.46 pid:11373   22: std::thread::local::LocalKey<T>::with
11:15.46 pid:11373   23: tokio_threadpool::worker::Worker::try_steal_task
11:15.46 pid:11373   24: tokio_threadpool::worker::Worker::run
11:15.46 pid:11373   25: std::thread::local::LocalKey<T>::try_with
11:15.47 pid:11373   26: std::thread::local::LocalKey<T>::with
11:15.47 pid:11373   27: tokio_timer::timer::handle::with_default
11:15.47 pid:11373   28: tokio_timer::clock::clock::with_default::{{closure}}
11:15.47 pid:11373   29: std::thread::local::LocalKey<T>::try_with
11:15.47 pid:11373   30: std::thread::local::LocalKey<T>::with
11:15.47 pid:11373   31: tokio_timer::clock::clock::with_default
11:15.47 pid:11373   32: tokio_reactor::with_default::{{closure}}
11:15.47 pid:11373   33: std::thread::local::LocalKey<T>::try_with
11:15.47 pid:11373   34: std::thread::local::LocalKey<T>::with
11:15.47 pid:11373   35: tokio_reactor::with_default
11:15.47 pid:11373   36: tokio::runtime::builder::Builder::build::{{closure}}
11:15.47 pid:11373   37: tokio_executor::global::with_default::{{closure}}
11:15.47 pid:11373   38: std::thread::local::LocalKey<T>::try_with
11:15.47 pid:11373   39: std::thread::local::LocalKey<T>::with
11:15.47 pid:11373   40: tokio_executor::global::with_default
11:15.47 pid:11373   41: tokio_threadpool::worker::Worker::do_run::{{closure}}
11:15.47 pid:11373   42: std::thread::local::LocalKey<T>::try_with
11:15.47 pid:11373   43: std::thread::local::LocalKey<T>::with
11:15.47 pid:11373   44: tokio_threadpool::worker::Worker::do_run
11:15.48 pid:11373   45: tokio_threadpool::pool::Pool::spawn_thread::{{closure}}
11:15.48 pid:11373 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
11:55.42 WARNING Forcibly terminating runner process
11:55.42 INFO Starting runner
11:55.44 WARNING Failed to start protocol connection
11:55.44 INFO STDERR: ['/Users/henrik/code/gecko/target/debug/geckodriver', '--marionette-port', '2828', '--host', '127.0.0.1', '--port', '49174', '-vv']
11:55.44 WARNING Traceback (most recent call last):
  File "/Users/henrik/code/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/protocol.py", line 47, in setup
    self.connect()
  File "/Users/henrik/code/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/base.py", line 635, in connect
    self.server.start(block=False)
  File "/Users/henrik/code/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/webdriver_server.py", line 51, in start
    self._run(block)
  File "/Users/henrik/code/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/webdriver_server.py", line 65, in _run
    self._proc.run()
  File "/Users/henrik/code/gecko/testing/mozbase/mozprocess/mozprocess/processhandler.py", line 825, in run
    self.proc = self.Process([self.cmd] + self.args, **args)
  File "/Users/henrik/code/gecko/testing/mozbase/mozprocess/mozprocess/processhandler.py", line 137, in __init__
    subprocess.Popen.__init__(self, args, **kwargs)
  File "/Users/henrik/.pyenv/versions/2.7.16/lib/python2.7/subprocess.py", line 386, in __init__
    errread, errwrite), to_close = self._get_handles(stdin, stdout, stderr)
  File "/Users/henrik/.pyenv/versions/2.7.16/lib/python2.7/subprocess.py", line 817, in _get_handles
    c2pread, c2pwrite = self.pipe_cloexec()
  File "/Users/henrik/.pyenv/versions/2.7.16/lib/python2.7/subprocess.py", line 865, in pipe_cloexec
    r, w = os.pipe()
OSError: [Errno 24] Too many open files

I assume something in wptrunner or geckodriver keeps file handles open.

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)

Severity: normal → S3

This is probably a duplicate of bug 1653294.

Status: NEW → RESOLVED
Closed: 4 years ago
Component: geckodriver → web-platform-tests
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.