[issue44423] copy2 / sendfile fails on linux with large file

2021-09-21 Thread karl


karl  added the comment:

could not reproduce the error

--
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44423] copy2 / sendfile fails on linux with large file

2021-06-14 Thread karl


New submission from karl :

by copy a large file e.g.

-rwxrwxr-x 1 1002 1001 5359338160 Feb  9  2019 xxx_file_xxx.mdx

copy2 / sendfile / fastcopy fails with:


Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
  File "/usr/local/lib/python3.8/dist-packages/pybcpy/diff_bak_copy.py", line 
212, in _init_copy_single
shutil.copy2(f, dest_path)
  File "/usr/lib/python3.8/shutil.py", line 432, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.8/shutil.py", line 272, in copyfile
_fastcopy_sendfile(fsrc, fdst)
  File "/usr/lib/python3.8/shutil.py", line 169, in _fastcopy_sendfile
raise err
  File "/usr/lib/python3.8/shutil.py", line 149, in _fastcopy_sendfile
sent = os.sendfile(outfd, infd, offset, blocksize)
OSError: [Errno 75] Value too large for defined data type: 'xxx_file_xxx.mdx' 
-> 'dest/xxx_file_xxx.mdx'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
  File "/usr/local/lib/python3.8/dist-packages/pybcpy/__main__.py", line 433, 
in 
main_func()
  File "/usr/local/lib/python3.8/dist-packages/pybcpy/__main__.py", line 425, 
in main_func
args.func(args)
  File "/usr/local/lib/python3.8/dist-packages/pybcpy/__main__.py", line 75, in 
cmd_init
) = dbak.init_backup_repo(tarmode=args.tar)
  File "/usr/local/lib/python3.8/dist-packages/pybcpy/diff_bak_copy.py", line 
231, in init_backup_repo
files = p.map(self._init_copy_single, ifiles)
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 771, in get
raise self._value
OSError: [Errno 75] Value too large for defined data type: 'xxx_file_xxx.mdx' 
-> 'dest/xxx_file_xxx.mdx'


reference to code:
https://github.com/kr-g/pybcpy/blob/master/pybcpy/diff_bak_copy.py

--
messages: 395862
nosy: kr-g
priority: normal
severity: normal
status: open
title: copy2 / sendfile fails on linux with large file
type: crash
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com