Executor: Sporadic failure to flock the socket lock
Flock'ing the socket's lock file sometimes fail with the following traceback:
Traceback (most recent call last):
Oct 19 12:49:35 keywords-gateway executor[1789817]: File "/usr/bin/executor", line 8, in <module>
Oct 19 12:49:35 keywords-gateway executor[1789817]: sys.exit(run())
Oct 19 12:49:35 keywords-gateway executor[1789817]: File "/usr/lib/python3.10/site-packages/valve_gfx_ci/executor/server/__init__.py", line 29, in run
Oct 19 12:49:35 keywords-gateway executor[1789817]: run(config_f=args.config, socket_path=args.socket)
Oct 19 12:49:35 keywords-gateway executor[1789817]: File "/usr/lib/python3.10/site-packages/valve_gfx_ci/executor/server/executor.py", line 781, in run
Oct 19 12:49:35 keywords-gateway executor[1789817]: fcntl.flock(socket_lock.fileno(), fcntl.LOCK_EX | fcntl.LOCK_NB)
Oct 19 12:49:35 keywords-gateway executor[1789817]: BlockingIOError: [Errno 11] Resource temporarily unavailable
Based on the errno message/number, the error code is (EAGAIN). I think what is going on is the syscall got interrupted by a signal and python fails to realize it and call flock again... The fix would be to just keep on calling flock as long as errno == 11.