[New-bugs-announce] [issue9281] Race condition in distutils.dir_util.mkpath()

Arfrever Frehtes Taifersar Arahesis report at bugs.python.org
Sat Jul 17 07:00:39 CEST 2010

New submission from Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>:

distutils.dir_util.mkpath() is used to create a directory and is supposed to not fail when this directory already exists.
There's a chance that another process will create this directory between os.path.isdir() check and call to os.mkdir().
This was reproduced by a Gentoo user during parallel installation of Python:

I'm attaching the patch.

assignee: tarek
components: Distutils
files: distutils-dir_util.patch
keywords: patch
messages: 110538
nosy: Arfrever, tarek
priority: normal
severity: normal
status: open
title: Race condition in distutils.dir_util.mkpath()
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file18036/distutils-dir_util.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list