Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Executor test_execution[unlimited] seems to randomly fail #45683

Open
potiuk opened this issue Jan 15, 2025 · 2 comments
Open

Local Executor test_execution[unlimited] seems to randomly fail #45683

potiuk opened this issue Jan 15, 2025 · 2 comments
Labels
area:CI Airflow's tests and continious integration area:Executors-core LocalExecutor & SequentialExecutor

Comments

@potiuk
Copy link
Member

potiuk commented Jan 15, 2025

Recently test_execution started to fail with:

FAILED tests/executors/test_local_executor.py::TestLocalExecutor::test_execution[unlimited] - Failed: Timeout >60.0s

Stacktrace:

_________________ TestLocalExecutor.test_execution[unlimited] __________________
tests/executors/test_local_executor.py:129: in test_execution
    self._test_execute(parallelism=parallelism)
/usr/local/lib/python3.10/unittest/mock.py:1379: in patched
    return func(*newargs, **newkeywargs)
tests/executors/test_local_executor.py:106: in _test_execute
    executor.end()
airflow/executors/local_executor.py:234: in end
    proc.join()
/usr/local/lib/python3.10/multiprocessing/process.py:149: in join
    res = self._popen.wait(timeout)
/usr/local/lib/python3.10/multiprocessing/popen_fork.py:43: in wait
    return self.poll(os.WNOHANG if timeout == 0.0 else 0)
/usr/local/lib/python3.10/multiprocessing/popen_fork.py:27: in poll
    pid, sts = os.waitpid(self.pid, flag)
E   Failed: Timeout >60.0s
----------------------------- Captured stdout call -----------------------------
[2025-01-15T02:12:46.747+0000] {local_executor.py:63} INFO - Worker starting up pid=91
[2025-01-15T02:12:46.761+0000] {local_executor.py:63} INFO - Worker starting up pid=92
[2025-01-15T02:12:46.769+0000] {local_executor.py:99} ERROR - uhoh
Traceback (most recent call last):
  File "/opt/airflow/airflow/executors/local_executor.py", line 95, in _run_worker
    _execute_work(log, workload)
  File "/opt/airflow/airflow/executors/local_executor.py", line 116, in _execute_work
    supervise(
  File "/usr/local/lib/python3.10/unittest/mock.py", line 1114, in __call__
    return self._mock_call(*args, **kwargs)
  File "/usr/local/lib/python3.10/unittest/mock.py", line 1118, in _mock_call
    return self._execute_mock_call(*args, **kwargs)
  File "/usr/local/lib/python3.10/unittest/mock.py", line 1179, in _execute_mock_call
    result = effect(*args, **kwargs)
  File "/opt/airflow/tests/executors/test_local_executor.py", line 74, in fake_supervise
    raise RuntimeError("fake failure")
RuntimeError: fake failure
[2025-01-15T02:12:46.769+0000] {local_executor.py:219} INFO - Shutting down LocalExecutor; waiting for running tasks to finish.  Signal again if you don't want to wait.
[2025-01-15T02:12:46.778+0000] {local_executor.py:63} INFO - Worker starting up pid=93

Example failure: https://github.com/apache/airflow/actions/runs/12779948905/job/35625787707#step:6:7344

@potiuk potiuk converted this from a draft issue Jan 15, 2025
@dosubot dosubot bot added area:CI Airflow's tests and continious integration area:Executors-core LocalExecutor & SequentialExecutor labels Jan 15, 2025
@ajitg25
Copy link
Contributor

ajitg25 commented Jan 17, 2025

@potiuk Tested this locally, looks like its working now

Ran breeze testing core-tests --run-in-parallel --run-db-tests-only

Image

@potiuk
Copy link
Member Author

potiuk commented Jan 17, 2025

Yeah. It works "in general" - just fails randomly (flaky test)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:CI Airflow's tests and continious integration area:Executors-core LocalExecutor & SequentialExecutor
Projects
Status: Flaky stuff
Development

No branches or pull requests

2 participants