cylc / cylc-flow

Cylc: a workflow engine for cycling systems.
https://cylc.github.io
GNU General Public License v3.0
325 stars 90 forks source link

investigate mac os test traceback #6208

Open oliver-sanders opened 1 week ago

oliver-sanders commented 1 week ago

A couple of mac os tests are passing, but with strange traceback going to stderr.

Example CI run: https://github.com/cylc/cylc-flow/actions/runs/9808161608/job/27083401819?pr=6187#step:16:118

Example traceback:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 634, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 601, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 1905, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/runner/work/cylc-flow/cylc-flow/cylc/flow/scheduler_cli.py", line 420, in scheduler_cli
    daemonize(scheduler)
  File "/Users/runner/work/cylc-flow/cylc-flow/cylc/flow/daemonize.py", line 121, in daemonize
    sys.exit(0)
SystemExit: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/hostedtoolcache/Python/3.9.13/arm64/bin/cylc", line 8, in <module>
    sys.exit(main())
  File "/Users/runner/work/cylc-flow/cylc-flow/cylc/flow/scripts/cylc.py", line 703, in main
    execute_cmd(command, *cmd_args)
  File "/Users/runner/work/cylc-flow/cylc-flow/cylc/flow/scripts/cylc.py", line 334, in execute_cmd
    entry_point.load()(*args)
  File "/Users/runner/work/cylc-flow/cylc-flow/cylc/flow/terminal.py", line 282, in wrapper
    wrapped_function(*wrapped_args, **wrapped_kwargs)
  File "/Users/runner/work/cylc-flow/cylc-flow/cylc/flow/scheduler_cli.py", line 661, in play
    return asyncio.run(scheduler_cli(options, id_))
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/runners.py", line 48, in run
    loop.run_until_complete(loop.shutdown_asyncgens())
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 634, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 601, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 1869, in _run_once
    event_list = self._selector.select(timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/selectors.py", line 562, in select
    kev_list = self._selector.control(None, max_ev, timeout)
OSError: [Errno 9] Bad file descriptor
sys:1: RuntimeWarning: coroutine 'BaseEventLoop.shutdown_asyncgens' was never awaited
MetRonnie commented 1 week ago

In both tests that encountered this, it was preceded by

INFO - Extracting job.sh to ~/cylc-run/<workflow-id>/.service/etc/job.sh