Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix infinite loop on corrupted fine-grained cache #5739

Merged
merged 2 commits into from
Oct 5, 2018
Merged

Conversation

msullivan
Copy link
Collaborator

This hit me when mypyc was causing crashes after having written out
part of the cache, but subsequent runs would instead infinite loop.

This hit me when mypyc was causing crashes after having written out
part of the cache, but subsequent runs would instead infinite loop.
Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

Good catch!

It would be great to add a test case for this, but it is probably non-trivial. Maybe add a comment in #5002, so we not forget about this?

@gvanrossum
Copy link
Member

I think I may have hit this yesterday. I did something with dmypy like the following:

  1. dmypy check mypy
  2. dmypy check ../mypyc/mypyc

The daemon was started with -v logging to a separate window. It never completed (until I hit ^C).

@gvanrossum
Copy link
Member

Should probably be merged before I cut the release branch (#5741).

@msullivan
Copy link
Collaborator Author

Turns out that we already had a test case for the case where the cache file was wrong, but we only infinite loop when it is missing.

@msullivan msullivan merged commit e12be3b into master Oct 5, 2018
@msullivan msullivan deleted the infinite-loop branch October 5, 2018 19:08
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants