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

Catch BlockingIOError in job_server. #599

Merged
merged 1 commit into from
Feb 25, 2020

Conversation

mikepurvis
Copy link
Member

@mikepurvis mikepurvis commented Feb 25, 2020

I was getting some instances of build jobs randomly bailing out when running the master branch under Python 3.8; I'm assuming as a consequence of #574:

[build] An internal error occurred!
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/catkin_tools/verbs/catkin_build/build.py", line 555, in build_isolated_workspace
    all_succeeded = run_until_complete(execute_jobs(
  File "/usr/local/lib/python3.8/dist-packages/catkin_tools/execution/executor.py", line 374, in run_until_complete
    return loop.run_until_complete(coroutine)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.8/dist-packages/catkin_tools/execution/executor.py", line 247, in execute_jobs
    (job_server.try_acquire() is not None)):
  File "/usr/local/lib/python3.8/dist-packages/catkin_tools/execution/job_server.py", line 426, in try_acquire
    token = JobServer._acquire()
  File "/usr/local/lib/python3.8/dist-packages/catkin_tools/execution/job_server.py", line 262, in _acquire
    token = os.read(cls._job_pipe[0], 1)
BlockingIOError: [Errno 11] Resource temporarily unavailable

I believe this is a proper fix to the issue.

FYI @timonegk, @wjwwood

if e.errno != errno.EINTR:
raise
except (BlockingIOError, InterruptedError):
pass
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both of these derive from OSError. Any other OSError exceptions will raise through, as the behaviour was before.

@mikepurvis mikepurvis merged commit f96853c into catkin:master Feb 25, 2020
@mikepurvis mikepurvis deleted the catch-blockingioerror branch February 25, 2020 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant