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 alexeicolin
Recipients alexeicolin, p.conesa.mingo
Date 2021-04-23.03:05:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619147157.83.0.799018898754.issue43743@roundup.psfhosted.org>
In-reply-to
Content
Can confirm that this BlockingIOError happens on GPFS (alpine) on Summit supercomputer, tested with Python 3.8 and 3.10a7.

I found that it happens only for file sizes above 65536. Minimal example:

This filesize works:

$ rm -f srcfile dstfile && truncate --size 65535 srcfile && python3.10 -c "import shutil; shutil.copyfile(b'srcfile', b'dstfile')"

This file size (and larger) does not work:

$ rm -f srcfile dstfile && truncate --size 65536 srcfile && python3.10 -c "import shutil; shutil.copyfile(b'srcfile', b'dstfile')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/.../usr/lib/python3.10/shutil.py", line 265, in copyfile
    _fastcopy_sendfile(fsrc, fdst)
  File "/.../usr/lib/python3.10/shutil.py", line 162, in _fastcopy_sendfile
    raise err
  File "/.../usr/lib/python3.10/shutil.py", line 142, in _fastcopy_sendfile
    sent = os.sendfile(outfd, infd, offset, blocksize)
BlockingIOError: [Errno 11] Resource temporarily unavailable: b'srcfile' -> b'dstfile'

I tried patching shutil.py to retry the the call on this EAGAIN, but subsequent attempts fail with EAGAIN again indefinitely.

I also use OP's workaround: set _USE_CP_SENDFILE = False in shutil.py
History
Date User Action Args
2021-04-23 03:05:57alexeicolinsetrecipients: + alexeicolin, p.conesa.mingo
2021-04-23 03:05:57alexeicolinsetmessageid: <1619147157.83.0.799018898754.issue43743@roundup.psfhosted.org>
2021-04-23 03:05:57alexeicolinlinkissue43743 messages
2021-04-23 03:05:57alexeicolincreate