This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xdegaye
Recipients lars.gustaebel, r.david.murray, sgnn7, vstinner, xdegaye
Date 2018-04-07.10:01:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1523095262.2.0.682650639539.issue23649@psf.upfronthosting.co.za>
In-reply-to
Content
extract_from_pkgs() in the attached extract_from_packages.py script extracts /etc files from the tar files in PKG_DIR into WORK_DIR using a ThreadPoolExecutor (a ThreadPoolExecutor, when used to extract all the /etc files from the packages that build a whole ArchLinux system, divides the elapsed time by 2). Running this script that tests this function fails randomly with the same error as reported by Srdjan in msg237961.

Replacing ThreadPoolExecutor with ProcessPoolExecutor also fails randomly.

Using the safe_makedirs() context manager to enclose the statements than run ThreadPoolExecutor fixes the problem.

Obviously this in not a problem related to thread-safety (it occurs also with ProcessPoolExecutor) but a problem about the robustness of the tarfile module in a concurrent access context. The problem is insidious in that it may never occur in an application test suite.
History
Date User Action Args
2018-04-07 10:01:02xdegayesetrecipients: + xdegaye, lars.gustaebel, vstinner, r.david.murray, sgnn7
2018-04-07 10:01:02xdegayesetmessageid: <1523095262.2.0.682650639539.issue23649@psf.upfronthosting.co.za>
2018-04-07 10:01:02xdegayelinkissue23649 messages
2018-04-07 10:01:02xdegayecreate