-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Android smb clients issue on remove files. #1337
Comments
Please provide the requested info as defined in the ticket you filled out and in the support section of the page. |
i Have the same issue using mergerfs as OMV 7 plugin This means there was a problem with the program, such as a segfault. First i had the error with NTFS on 2 disks but i deleted them and reformated to BTRFS and i get the same error. No problem with windows Once i saw user ADB in SMB diagnotics report. |
As I said above I need details as described in the ticket creation page and the support section of the docs. If the app is dying that's not mergerfs' fault. Nothing mergerfs does should cause an app to die. That would be a bug on their side. |
As described in the mergerfs wiki, I see that there may be problems with deleting or moving files in some file managers that do not follow the rfc when working with smb, or something like that. Therefore, I tried several file managers with a built-in smb client available in android, as a result, the 'amaze file manager' perfectly deletes files from mergerfs share and there are no errors. |
I am experiencing the same issue as described in this bug report, so here are the details: Describe the bug When attempting to delete files on a Samba share hosting files in a mergerfs volume via the Android Solid Explorer client app, the Samba service crashes, and the client app complains about an unknown error. Despite the crash, the file is deleted from the mergerfs volume. The crash and associated error does not occur when deleting files on a Samba share hosting files in a regular volume. As reported by @serj-47, the Amaze File Manager app does not cause Samba to crash. Please be sure to use latest release of mergerfs to ensure the issue still exists. Not your distro's latest but the latest official release. I am using mergerfs v2.40.2. To Reproduce Steps to reproduce the behavior. List all steps to reproduce. All settings. Please simplify the reproduction as much as possible.
Relevant portion of
Relevant portion of
Steps to reproduce:
Expected behavior The file should be deleted cleanly without Samba crashing on the server or producing any errors on the client. System information:
|
Thank you for the detailed report but samba is crashing itself. This really should be a report to them. Even if mergerfs was returning something odd it shouldn't panic. And looking at the strace shows smbd unlinking "file0" and then closing the fd. Both succeed and look fine. I just tried using Solid Explorer to create and delete a file using samba 4.19.6. No crash. BTW, your traces are from different times. Your mergerfs trace is minutes after the smbd one. |
Thank you for looking at the log files. The thing I find interesting is that I have two Samba shares, one for a regular volume and another for the mergerfs volume. The Samba crash only occurs when deleting files from the mergerfs volume, not the regular volume, which makes me think mergerfs is doing something differently, triggering a different code path in Samba and causing it to crash. I will do some more debugging on my side and see if I can get Samba to log more information. |
At the end of the day a filesystem function is pretty straight forward in that it returns a standard Unix "return int or -1 with errno" and does the thing mentioned. And all of this goes through the kernel which has lots of validation checks. The only "different" thing mergerfs can be doing really is the filesystem behavior itself which of course could cause issues but those are Samba issues in that it is expecting something that may or many not be valid. It certainly shouldn't be issuing a panic because it got confused. Lots of filesystems are not fully POSIX compliant and should at most error gracefully. I'm not saying this isn't something that could be addressed by mergerfs. What I'm saying is that step one is to understand why Samba panics and kills itself for something that simply can not worth doing that over. That trace from the log isn't detailed enough for me to guess why that is. You have to remember that Samba is complex and it isn't as simple as "you say delete files, samba issues delete, mergerfs delete." There could be hundreds of other syscalls and things going on otherwise. |
Again... really need to know what the specifics are of the error from the app's perspective or why samba panics. |
My mergerfs pool consists of two disks and is used to share both disks over the network using the samba protocol, the pool is mounted as follows:
smb.conf:
So, samba clients with Windows OS or Linux OS can easily access the pool using the samba protocol, and can create, move and delete files and there are no problems.
But there are some problems with smb clients on Android. Here is a list of file managers for android that I have tried:
-Total Commander, (you need to install a separate plugin to work with smb).
-Material Files
In both file managers can create and move files on the samba server, but when trying to delete an error occurs about the inability to delete a directory or file.
*There is no such problem when sharing a shared directory on a disk without mergerfs.
The text was updated successfully, but these errors were encountered: