Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file_diff() can't handle large files? #22

Open
xkero opened this issue Jan 29, 2024 · 1 comment
Open

file_diff() can't handle large files? #22

xkero opened this issue Jan 29, 2024 · 1 comment

Comments

@xkero
Copy link

xkero commented Jan 29, 2024

Running version 1.2.4 installed via AUR package on Archlinux: https://aur.archlinux.org/packages/python-bsdiff4

When trying to run bsdiff4.file_diff on a large file (19GB) it sits for awhile, but crashes with:

  File "/usr/lib/python3.11/site-packages/bsdiff4/format.py", line 85, in file_diff
    dst = read_data(dst_path)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/bsdiff4/format.py", line 64, in read_data
    data = fi.read()
           ^^^^^^^^^
OSError: [Errno 5] Input/output error

Seems to work fine on smaller files. Do I have to manually chunk large files myself?

@xkero
Copy link
Author

xkero commented Jan 30, 2024

Actually turns out the crash was due to an unrelated filesystem corruption issue I was having. After fixing that I've found instead that bsdiff4 will just write memory until you run out and the system either hangs or kills the process so chunking the file or streaming it if possible seem to be required for files that exceed available memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant