Bug 14221 - Samba processes killed by the OOM killer don't come back
Summary: Samba processes killed by the OOM killer don't come back
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.11.4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-18 20:52 UTC by Andrew Bartlett
Modified: 2023-10-20 00:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Bartlett 2019-12-18 20:52:01 UTC
Samba 4.10 and later versions have a process restart capability to greatly reduce the impact of crashes due to a NULL pointer de-reference or abort().

However SIGKILL was deliberatly omitted.  

Sadly this is the most likely case, due to the OOM killer, as raised here:

https://lists.samba.org/archive/samba-technical/2019-November/134529.html

Subsequent discussion (offline) has been to agree that we should restart in this case.
Comment 1 roland 2022-12-08 18:59:51 UTC
i had smbd killed by oom due to a bug and found no smbd processes running afterwards. 

isn't that systemd's job to restart failed services ?
Comment 2 Andrew Bartlett 2023-10-20 00:51:45 UTC
Fixed in Samba 4.12.0 with

commit 30cbc5b90e4951a0ea924c204ff73e15c9750ace
Author: Andrew Bartlett <abartlet@samba.org>
Date:   Thu Dec 19 11:20:30 2019 +1300

    s4-smbd: Also restart prefork children lost to SIGKILL (-9)
    
    Samba 4.10 and later versions have a process restart capability to greatly
    reduce the impact of crashes due to a NULL pointer de-reference or abort().
    
    However SIGKILL was deliberatly omitted.
    
    Sadly this is the most likely case, due to the OOM killer, as raised here:
    
    https://lists.samba.org/archive/samba-technical/2019-November/134529.html
    
    Subsequent discussion (offline) has been to agree that we should restart in
    this case.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14221
    
    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    Reviewed-by: Ralph Boehme <slow@samba.org>
Comment 3 Andrew Bartlett 2023-10-20 00:52:30 UTC
(In reply to roland from comment #1)
Yes, if the smbd parent process dies, it is for systemd to restart it.

This bug is about the "samba" process used for the AD DC, and the children of that process.