cifsd-team / ksmbd

ksmbd kernel server(SMB/CIFS server)
151 stars 23 forks source link

Issues Deleting Files/Folders #497

Open Saijin-Naib opened 3 years ago

Saijin-Naib commented 3 years ago

Firmware Version = OpenWrt 19.07.7 r11306-c4a6851c72 / LuCI openwrt-19.07 branch git-21.050.37945-c33df8f Kernel Version = 4.14.221 image kmbd-server v3.3..4-1 kmod-fs-ksmbd v4.14.221+3.3.4-1 luci-app-ksmbd git-21.050.37945-c33dff8f-1

Copying:
Files/folders copy correctly from W10 client (including folders copying correctly as folders) Files/folders copy correctly from Solus v4.2 client (including folders copying correctly as folders)

Deleting:
Files/folders fail to delete from Explorer properly, staying in a Deleting state. image Files/folders delete properly from Administrator Command prompt. Files/folders delete properly from Regular Command prompt.

Testing under samba4 client (Solus 4.2): Deletion of empty directory created by Samba4 Client :heavy_check_mark: Deletion of non-empty directory created by Samab4 Client :x: Deletion of empty directory created by Win10 Client :heavy_check_mark: Deletion of non-empty directory created by Win10 Client :heavy_check_mark:

Further Information:
A few hours after all of these failed/hung deletes, ksmbd seems to have hung completely. No shares were accessible from any client (Windows, Linux, eComStation, Android). A restart of ksmbd from Luci restored functionality. All other router services and functions were operating properly during the ksmbd outage.

Luci Network Shares Template:
[global] netbios name = |NAME| server string = |DESCRIPTION| workgroup = |WORKGROUP| interfaces = |INTERFACES| bind interfaces only = yes ipc timeout = 20 deadtime = 15 map to guest = Bad User smb2 max read = 64K smb2 max write = 64K smb2 max trans = 64K cache read buffers = no cache trans buffers = no

Luci Network Shares Settings:
image

Mount Points Libraries:
NTFS image FAT32 image

Mount Points Settings:
image

system.log:
system.log

kernel.log:
kernel.log

namjaejeon commented 3 years ago

Have you shared usb storage(FAT) using ksmbd ?

Saijin-Naib commented 3 years ago

Have you shared usb storage(FAT) using ksmbd ? As far as I can tell, yes. I can browse the SD card in my printer mostly fine.

Prior under Samba4 host and same mount settings, the sharing worked just fine.

namjaejeon commented 3 years ago

Could you please test it with the latest version(3.3.5) ?

Saijin-Naib commented 3 years ago

Could you please test it with the latest version(3.3.5) ?

Is there a compiled opkg for ksmbd and kmod-fs-ksmbd I can use?

I can't really risk going to a snapshot as I work from home and rely upon my connection staying up.

neheb commented 3 years ago

Can't update the kmod on 19.07. Only cifsd-tools.

namjaejeon commented 3 years ago

samba write version 4 dos attribute to file, but ksmbd 3.3.4 support version 3 format. So It seems to not be compatible with samba. So ksmbd 3.3.5 start to support version format. I guess your problem can be fixed on the latest version. Andy will release ksmbd 3.3.5 version soon.

Andy2244 commented 3 years ago

Andy will release ksmbd 3.3.5 version soon.

Actually Rosen Penev (neheb) is much faster setting up the ksmbd PR these days, but yes we release new versions quickly to snapshots.

Saijin-Naib commented 3 years ago

Andy will release ksmbd 3.3.5 version soon.

Actually Rosen Penev (neheb) is much faster releasing new versions these days, but yes we release new versions nearly instantly to snapshots.

How do I know if this has the packages @namjaejeon has asked me to test? https://firmware-selector.openwrt.org/?version=19.07-SNAPSHOT&target=mvebu%2Fcortexa9&id=linksys_wrt3200acm

Unfortunately, building an image is far outside my comfort zone at the moment.

Additionally, the 21.02 branch does not seem to support my WRT3200ACM (Rango) quite yet.

Andy2244 commented 3 years ago

How do I know if this has the packages @namjaejeon has asked me to test?

Check the snapshot build list for the kmod-fs-ksmbd version: https://downloads.openwrt.org/snapshots/targets/mvebu/cortexa9/packages/

PS: You can also download the sysupgrade for your wrt3200acm there: https://downloads.openwrt.org/snapshots/targets/mvebu/cortexa9/

Saijin-Naib commented 3 years ago

Thank you all for the help.

Do you know if 3.3.5 will make it into a future point-release of 19.07.7 or will it go into 19.07.8 or something? I can't risk moving off of stable at the moment :(

Andy2244 commented 3 years ago

Do you know if 3.3.5 will make it into a future point-release of 19.07.7 or will it go into 19.07.8 or something?

The issue is that we cant update kmods, so you have to wait for 19.07.08.

Saijin-Naib commented 3 years ago

Do you know if 3.3.5 will make it into a future point-release of 19.07.7 or will it go into 19.07.8 or something?

The issue is that we cant update kmods, so you have to wait for 19.07.08.

So the issue lies in the kmod, not the server? Thank you for helping me understand.

I will test as soon as I can with 19.07.8, then.

namjaejeon commented 3 years ago

@Saijin-Naib Any news ?

Saijin-Naib commented 3 years ago

@Saijin-Naib Any news ?

Hey, sorry, not at the moment. I am awaiting 19.07.8 stable release. I can't afford downtime on SNAPSHOT or unstable when working from home :\

neheb commented 3 years ago

@Andy2244 Should cifsd be moved from packages to base?

Andy2244 commented 3 years ago

@Andy2244 Should cifsd be moved from packages to base?

We cant since it still has the glib2 dependency, which would also have to-be moved to base. Also not sure what would improve moving it to base, since we still only can update kmod's per release?

PS: Since the ABI is compatible now, we can just keep updating in snapshots and let that trickle down on the next release.

neheb commented 3 years ago

Right but that's only for tools. I'm talking about moving just the kernel module.

The improvement is easier updating. When .6 was released, I missed the window to get it merged.

namjaejeon commented 3 years ago

@neheb Wow, It would be great if it is possible.