ert icon indicating copy to clipboard operation
ert copied to clipboard

Event loop is closed exception when ctrl-c'ing ensemble_experiment

Open berland opened this issue 1 year ago • 4 comments

  • Run poly_example (maybe LSF queue is needed)
  • Let poly_eval.py sleep for 100 seconds
  • Hit ctrl-c when the realizations are running

The terminal ends with:

    --> Running forecast for iteration: 0

    1/1 |                                                             |   0% Running time: 8 seconds

    ■ Waiting          0/10
    ■ Pending          0/10
    ■ Running         10/10
    ■ Failed           0/10
    ■ Finished         0/10
    ■ Unknown          0/10

^C
Killing simulations...
Experiment failed! All realizations failed!

Exception ignored in: <function BaseSubprocessTransport.__del__ at 0x7f3592a0ca60>
Traceback (most recent call last):
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/asyncio/base_subprocess.py", line 126, in __del__
    self.close()
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/asyncio/base_subprocess.py", line 104, in close
    proto.pipe.close()
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/asyncio/unix_events.py", line 536, in close
    self._close(None)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/asyncio/unix_events.py", line 560, in _close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/asyncio/base_events.py", line 719, in call_soon
    self._check_closed()
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/asyncio/base_events.py", line 508, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

This RuntimeError should not occur.

berland avatar Apr 18 '24 13:04 berland

Possibly the same root cause as #7642

berland avatar Apr 18 '24 13:04 berland

Cannot reproduce problem with Local driver.

berland avatar Apr 18 '24 13:04 berland

(this is flaky and not always reproducible on LSF)

berland avatar Apr 18 '24 13:04 berland

This one is difficult to reproduce.

jonathan-eq avatar Apr 23 '24 11:04 jonathan-eq

Could not reproduce it. Everything was shutdown correctly. NB: Running on bleeding with the new async ensemble evaluator and scheduler. @berland was this error when running with the JobQueue?

xjules avatar Jul 26 '24 07:07 xjules

Since, the error has not appeared again, closing this issue.

xjules avatar Aug 06 '24 13:08 xjules