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.

classification
Title: RawArray causes FileNotFoundError at cleanup
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Mathieu Lamarre
Priority: normal Keywords:

Created on 2018-11-14 17:50 by Mathieu Lamarre, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg329920 - (view) Author: Mathieu Lamarre (Mathieu Lamarre) Date: 2018-11-14 17:52
Running:

from multiprocessing.sharedctypes import RawArray
from ctypes import c_uint32
if __name__ == '__main__':
    shared_array = RawArray(c_uint32, 1500)

Causes:
Traceback (most recent call last):
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/multiprocessing/util.py", line 262, in _run_finalizers
    finalizer()
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/multiprocessing/util.py", line 186, in __call__
    res = self._callback(*self._args, **self._kwargs)
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/shutil.py", line 480, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/shutil.py", line 438, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/home/ava/miniconda3/envs/ava36/lib/python3.6/shutil.py", line 436, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
FileNotFoundError: [Errno 2] No such file or directory: 'pym-10314-v8aznmmb'


Python 3.6.6 |Anaconda, Inc.| (default, Oct  9 2018, 12:34:16)
[GCC 7.3.0] on linux
msg329924 - (view) Author: Mathieu Lamarre (Mathieu Lamarre) Date: 2018-11-14 18:17
To repro, the temp directory returned by tempfile must be a network mount to reproduce this error. I have this on server with minimal disk space in /home and TMPDIR points to CIFS mounted volume. So maybe can only be reproduced if shutils operations on the temp dir are slow (or buggy). 

We have been using a network temp dir in a large project and RawArray is the only object giving us error so far. Maybe the error could be ignored, if it's only dual delete issue.
History
Date User Action Args
2022-04-11 14:59:08adminsetgithub: 79429
2018-11-14 18:17:03Mathieu Lamarresetmessages: + msg329924
2018-11-14 17:52:41Mathieu Lamarresetmessages: + msg329920
2018-11-14 17:50:30Mathieu Lamarrecreate