The Samba-Bugzilla – Attachment 17974 Details for
Bug 15275
smbd_scavenger crashes when service smbd is stopped
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Patch for v4-18-test
bfixes-tmp418.txt (text/plain), 1.79 KB, created by
Stefan Metzmacher
on 2023-07-05 18:48:13 UTC
(
hide
)
Description:
Patch for v4-18-test
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2023-07-05 18:48:13 UTC
Size:
1.79 KB
patch
obsolete
>From d8b3e3c1b7279f801ed05b9cb765e14c931e955c Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Wed, 5 Jul 2023 11:33:58 +0200 >Subject: [PATCH] smbd: call exit_server_cleanly() to avoid panicking > >The parent smdb forwards SIGTERM to its process group in order to kill all >children like the scavenger. This happens from a function registered via >atexit() which means the signal forwarding is happening very briefly before the >main smbd process exits. When exiting the pipe between smbd and scavenger is >closed which triggers a file event in the scavenger. > >However, due to kernel sheduling it is possible that the file descriptor event >is received before the signal, where we call exit_server() which call >smb_panic() at the end. > >Change the exit to exit_server_cleanly() and just log this event at level 2 >which we already do. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15275 > >Signed-off-by: Ralph Boehme <slow@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> > >Autobuild-User(master): Stefan Metzmacher <metze@samba.org> >Autobuild-Date(master): Wed Jul 5 13:14:08 UTC 2023 on atb-devel-224 > >(cherry picked from commit 083fe1c28c6ec69cbd15d8cc2f7f06b1b630f2bc) >--- > source3/smbd/scavenger.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/source3/smbd/scavenger.c b/source3/smbd/scavenger.c >index 897ddf1617c8..ce2a58a4ae48 100644 >--- a/source3/smbd/scavenger.c >+++ b/source3/smbd/scavenger.c >@@ -104,7 +104,7 @@ static void smbd_scavenger_parent_dead(struct tevent_context *event_ctx, > server_id_str_buf(*state->scavenger_id, &tmp1), > server_id_str_buf(state->parent_id, &tmp2))); > >- exit_server("smbd_scavenger_parent_dead"); >+ exit_server_cleanly("smbd_scavenger_parent_dead"); > } > > static void scavenger_sig_term_handler(struct tevent_context *ev, >-- >2.34.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
slow
:
review+
Actions:
View
Attachments on
bug 15275
: 17974 |
17975