New submission from Marco Barisione <ma...@barisione.org>:
The generation of pickle files in load_grammar in lib2to3/pgen2/driver.py is racy as other processes may end up reading a half-written pickle file. This is reproducible with the command line tool, but it's easier to reproduce by importing lib2to3. You just need different processes importing lib2to3 at the same time to make this happen, see the attached reproducer. I tried with Python 3.9 for completeness and, while it happens there as well, it seems to be less frequent ony my computer than when using Python 3.6 (2% failure rate instead of 50% failure rate). ---------- components: 2to3 (2.x to 3.x conversion tool) files: pool.py messages: 372760 nosy: barisione priority: normal severity: normal status: open title: lib2to3 generation of pickle files is racy versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49284/pool.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41185> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com