Skip to content

ksmbd-tools: Fix ksmbd service is semi-killed at system startup #17227

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

Merged
merged 1 commit into from
Nov 29, 2021

Conversation

httpstorm
Copy link
Contributor

The configuration for the ksmbd service is auto-generated when the OpenWRT configuration changes, and also during startup, hence ksmbd.init has to reload the kernel module. It does that by calling kill_server, which does not perform cleanup. This results in ksmbd being killed but not restarted properly during boot.
This patch resolves the issue by using stop_service, which performs proper cleanup.

https://forum.openwrt.org/t/ksmbd-samba3-4-alternative-ex-cifsd-smbd-package-support-thread/51695/68

Maintainer: @Andy2244
Compile tested: (x86_x64, OpenWrt version r18176)
Run tested: (x86_x64, OpenWrt version r18176, tests done: startup, change config)

@neheb

The configuration for the ksmbd service is auto-generated when
the OpenWRT configuration changes, and also during startup,
hence ksmbd.init has to reload the kernel module. It does that by
calling kill_server, which does not perform cleanup. This results
in ksmbd being killed but not restarted properly during boot.
This patch resolves the issue by using stop_service, which performs
proper cleanup.

https://forum.openwrt.org/t/ksmbd-samba3-4-alternative-ex-cifsd-smbd-package-support-thread/51695/68

Signed-off-by: Georgi Valkov <gvalkov@abv.bg>
@httpstorm
Copy link
Contributor Author

httpstorm commented Nov 28, 2021

It must be something wrong with the buildbot, because I compiled and deployed the latest master from an empty directory, and everything went smooth. Also this patch changes only the service script, so it cannot be related.

@Andy2244
Copy link
Contributor

Thanks looks fine.

@neheb neheb merged commit 4af04cd into openwrt:master Nov 29, 2021
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 this pull request may close these issues.

3 participants