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

libtorrent error when trying to save a torrent on a network location (NAS) using F2FS, ext4 or exfat file system. #7763

Open
sppmasterspp opened this issue Oct 24, 2024 · 5 comments
Assignees

Comments

@sppmasterspp
Copy link

sppmasterspp commented Oct 24, 2024

libtorrent version (or branch): 2.0.10.0. Same error with 1.2.19 too.

platform/architecture: Operating system: Windows 11 Pro x64 (23H2) 22631.4317 - I've tried it on two different PCs.

It works on Debian. It creates folders on the same NAS drive and completes the torrent.

I came here because of this issue - qbittorrent/qBittorrent#21669
As qbittorrent uses libtorrent and a user guided me that the issue is with libtorrent I open an issue here too.

When I open a torrent file and choose a network location to save it, qbittorrent gives an error. This happens when a new directory for the torrent should be created.
I get - "Parameter error" and qbittorrent is unable to make a directory for the torrent, If I choose qbittoreent not to create a directory then all torrent files are written properly to the NAS SSD. Or if I create the directory manually before adding the torrent file then the torrent files writing to disk is OK.
The program creates a file without any extension with an unrecognized empty icon under Windows File Explorer.
image
When I choose to remove the torrent and data from the qbittorrent the file is not removed and remains on the NAS drive.

In my case I have a SSD USB3 (formatted with F2FS file system) attached to my OpenWrt router and I use it as a NAS device.
Everything else works OK with this setup. I have automated backups on that NAS drive. Other programs like GoodSync, uTorrent, File Explorer, WinRAR, Total Commander can create/delete folders on the same F2FS formatted NAS drive on Windows 11.
Using other torrent clients like uTorrent with the same torrent files results in successful operation.
Screenshots below.
Steps to reproduce

Steps to reproduce are like opening any other torrent the usual way but choose to create folder for the torrent.
I cannot tell if the F2FS file system have any impact here because I tried to save the same torrent to another shared network folder on a Windows 11 PC and it was OK.

I know that this may be somewhat unusual setup (F2FS mostly) and maybe because of this the issue went unnoticed.
I suppose (my speculation here) that the issue maybe caused by recent commits introduced with the kernel 6.6.54.
https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.54
There are lots of F2FS related commits there. And probably libtorrent (qbittorrent) has some issues with those commits too.
Additional context
image

image
Log(s) & preferences file(s)

22.10.2024 г. 16:57 - File error alert. Torrent: "xxxxxxxxxxxxxxxxxxx". File: "\qnap\qnap-usb1".
Reason: " error: The parameter is incorrect"

I use SMB - ksmbd.
image
I've found and reported KSMBD errors in the past but the version hasn't changed for a few months.
I first thought that it was KSMBD issue again but version is the same and it worked OK since the reported issue was resolved.

@sppmasterspp
Copy link
Author

sppmasterspp commented Dec 7, 2024

Anyone able to help with this? Confirming the issue or resolve it.
Updating to ksmbd-tools version 3.5.3 and kernel 6.6.63 the issue is still present with latest qbittorent 5.1.0 alpha on Windows 11 24H2.

@sppmasterspp
Copy link
Author

sppmasterspp commented Dec 11, 2024

@HanabishiRecca @xavier2k6 @glassez @arvidn
I tested this with kernel 6.6.44 and the issue isn't present there although I used the same qbittorent version. Then I tested on a third device with 6.6.63 and the issue is repeatable.
So I will quote myself.

I suppose (my speculation here) that the issue maybe caused by recent commits introduced with the kernel 6.6.54.
https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.54
There are lots of F2FS related commits there.

The issue has started sometime after kernel 6.6.54 and is present up to the 6.6.63 (currently newest on OpenWrt). For me it is only present when using qbittorent. No other software has issues creating folders on F2FS network devices.

@sppmasterspp
Copy link
Author

sppmasterspp commented Dec 17, 2024

@arvidn
Same issue with kernel 6.6.65.

@arvidn arvidn self-assigned this Dec 17, 2024
@sppmasterspp sppmasterspp changed the title libtorrent error when trying to save a torrent on a network location (NAS). It cannot create folders. libtorrent error when trying to save a torrent on a network location (NAS) using F2FS file system. Dec 17, 2024
@sppmasterspp
Copy link
Author

Really sorry for the noise. Trying to find the reason I've messed the things on Linux. Everything works on Debian. It was my fault with the mount.
Still unable to do that on Windows.

@sppmasterspp
Copy link
Author

sppmasterspp commented Dec 19, 2024

@arvidn
I've tried some more things today.
It seems qbittorrent (running on Windows 11) is unable to make a directory on any NAS file system.
Maybe that is a permission error on my side or a ksmbd SMB error but please take a look at what I've tried.
Any other software running on two Windows 11 PCs can create folders on those NAS shares.
Check my post here, please.
I've made even a dump with wireshark.

Every other software can make folders/files to the shares. Qbittorrent is only unable to make folders. Actually it creates a file (instead of a folder) with an empty icon (this can be seen above in the first post) but that is not a folder and is obviously an error.
It can remove folders and create/remove files without any issue. That doesn't make sense.

@sppmasterspp sppmasterspp changed the title libtorrent error when trying to save a torrent on a network location (NAS) using F2FS file system. libtorrent error when trying to save a torrent on a network location (NAS) using F2FS, ext4 or exfat file system. Dec 19, 2024
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

2 participants