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

force recheck with zero byte files gives mmap error #7790

Open
toppk opened this issue Nov 12, 2024 · 0 comments · May be fixed by #7808
Open

force recheck with zero byte files gives mmap error #7790

toppk opened this issue Nov 12, 2024 · 0 comments · May be fixed by #7808

Comments

@toppk
Copy link

toppk commented Nov 12, 2024

Please provide the following information

libtorrent version (or branch):

$ rpm -q rb_libtorrent qbittorrent
rb_libtorrent-2.0.10-3.fc41.x86_64
qbittorrent-5.0.1-1.fc41.x86_64

please describe what symptom you see, what you would expect to see instead and
how to reproduce it.
11/12/24 12:03 AM - File error alert. Torrent: "...". Reason: "... file_mmap (...) error: Invalid argument"

  1. start a torrent that creates a several files in a subdirectory
  2. start the torrent
  3. stop the torrent
  4. remove a file in a subdir and touch it, so it exists with zero bytes
  5. force recheck

I think I triggered this by using an older version of qbittorrent that would touch files at zero bytes, then switched to qbittorrent that used new mmap version of libtorrent which caused this error, but it's easy to reproduce using the procedure with just latest libtorrent. I tried on a simple torrent that didn't use subdirectories, and the force recheck didn't have any issues, so I used a torrent that creates lots of subdirs and it triggered immediately when following my procedure.

This was reported as well in qbittorrent here, but I couldn't find if it was reported here:
qbittorrent/qBittorrent#20398

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

Successfully merging a pull request may close this issue.

1 participant