Ksmbd (Samba3/4 alternative, ex cifsd/smbd) package support thread

No problems, glad you got it sorted.

El El jue, 9 jun 2022 a las 12:40, Ist via OpenWrt Forum <mail@forum.openwrt.org> escribió:

I'm trying to restart ksmbd, and it looks like the ELF issues persist? When doing modprobe I see something is trying to load a config file and it assumes a text file is a kernel module?? using insmod does not have issues.

Version: OpenWrt 22.03-SNAPSHOT r19441-3cfe050c4a
Kernel Version: 5.10.120
KSMB Version: kmod-fs-ksmbd - 5.10.120+3.4.5-1, ksmbd-server and ksmb-utils 3.4.5-1

read(3, "\nconfig globals\n\toption workgrou"..., 303) = 303
init_module(0x4149f0, 303, "") = -1 ENOEXEC (Exec format error)

Mon Jun 13 09:41:10 2022 kern.err kernel: [90477.644888] Module has invalid ELF structures
Mon Jun 13 09:41:10 2022 daemon.err ksmbd: modprobe of ksmbd module failed, can\'t start ksmbd!
openat(AT_FDCWD, "/lib/modules/5.10.120/xt_time.ko", O_RDONLY|O_LARGEFILE) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=5696, ...}) = 0
mmap(NULL, 5696, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fabada000
munmap(0x7fabada000, 5696)              = 0
close(3)                                = 0
munmap(0x7fabbae000, 4096)              = 0
openat(AT_FDCWD, "/proc/modules", O_RDONLY|O_LARGEFILE) = 3
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fabbae000
read(3, "asn1_decoder 12288 0 - Live 0x00"..., 1024) = 1024
read(3, "000000000000\nnf_conntrack 86016 "..., 1024) = 1024
read(3, "ve 0x0000000000000000\nxt_length "..., 1024) = 1024
read(3, "e 0x0000000000000000\nnft_fib_ipv"..., 1024) = 1024
read(3, "nf_conntrack, Live 0x00000000000"..., 1024) = 1024
read(3, "0\ncls_basic 12288 0 - Live 0x000"..., 1024) = 1024
read(3, "000\nip_set_hash_ipport 32768 0 -"..., 1024) = 1024
read(3, "437 16384 0 - Live 0x00000000000"..., 1024) = 875
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0x7fabbae000, 4096)              = 0
newfstatat(AT_FDCWD, "ksmbd", {st_mode=S_IFREG|0600, st_size=303, ...}, 0) = 0
newfstatat(AT_FDCWD, "ksmbd", {st_mode=S_IFREG|0600, st_size=303, ...}, 0) = 0
openat(AT_FDCWD, "ksmbd", O_RDONLY|O_LARGEFILE) = 3
read(3, "\nconfig globals\n\toption workgrou"..., 303) = 303
init_module(0x4149f0, 303, "")          = -1 ENOEXEC (Exec format error)
close(3)                                = 0
ioctl(1, TIOCGWINSZ, {ws_row=44, ws_col=211, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=44, ws_col=211, ws_xpixel=0, ws_ypixel=0}) = 0
writev(2, [{iov_base="1 module could not be probed\n", iov_len=29}, {iov_base=NULL, iov_len=0}], 21 module could not be probed
) = 29
writev(2, [{iov_base="- ksmbd\n", iov_len=8}, {iov_base=NULL, iov_len=0}], 2- ksmbd
) = 8

What release of OpenWRT are you using?

If you compile builds yourself you could try re-adding the removed patch. It's possible that kernel 5.10 doesn't contain the upstream fix.

I updated the post above with OpenWRT version and ksmbd versions.

2 Likes

New compilation and I lost access to network drives again.

LuCI Master (git-22.167.28356-8effea5) / OpenWrt SNAPSHOT r19805-574539ee2c
ksmbd-server	3.4.5-3
kmod-fs-ksmbd	5.10.120+3.4.5-1
wsdd2	2021-10-22-9831daf2-2

I get this error

daemon.err wsdd2: samba36/4 or ksmbd is not running, can't start wsdd2!

Anyone have knowledge on how to fix this?

been going on since V21 when getting ip via dhcp

So I'm back to samba 4 since ksmbd still has a problem and doesn't work.

1 Like

your error is part of "wsdd2" that's what has not worked from V21 on
if you use a static ip it works just not with getting am IP via DHCP
it's the same with samba or ksmbd

I compiled a new image this time with samba 4 and everything works. I didn't follow the package changes, but it was still working for me recently, I don't know what they messed up the ksmbd package with again.

I updated my ksmbd to 3.4.5 and now it won't work for me anymore. dmesg outputs

kern.err kernel: [ 1901.996605] ksmbd: No IPC daemon response for 20s

it asks for a password (it's set to guest mode though) (both on either Windows and Android) and then ksmbd service crashes.

I'm wondering how can I revert to 3.4.4 or maybe just wipe all ksmbd configs to try to start fresh again?

I merged a meson fix recently. Might help...

2 Likes

Great, it's working again.