Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1686048 - samba 4.6.2-11.el7_4: unreliable winbindd start with Type=notify and double forking [rhel-7.2.z] [NEEDINFO]
Summary: samba 4.6.2-11.el7_4: unreliable winbindd start with Type=notify and double f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: samba
Version: 7.2
Hardware: All
OS: Linux
high
unspecified
Target Milestone: rc
: ---
Assignee: Andreas Schneider
QA Contact: Andrej Dzilský
URL:
Whiteboard:
Depends On: 1510872
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-06 15:32 UTC by RAD team bot copy to z-stream
Modified: 2019-04-04 05:20 UTC (History)
13 users (show)

Fixed In Version: samba-4.2.10-12.el7_2
Doc Type: Bug Fix
Doc Text:
Cause: When systemd starts a daemon (smbd, nmbd, winbindd) in notify mode it should not double fork. Consequence: systemd sometimes thinks that smbd has been started incorrectly and sends a terminate signal (SIGTERM) to the process. This means that in some cases smbd isn't running because systemd killed it. Fix: Don't start the smbd, nmbd and winbindd daemon in double forking mode, instead as a foreground process. Result: systemd can track smbd correctly.
Clone Of: 1510872
Environment:
Last Closed: 2019-04-02 14:48:18 UTC
chorn: needinfo? (asn)


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3600511 None None None 2019-04-02 23:52:05 UTC
Red Hat Product Errata RHBA-2018:0937 None None None 2019-03-06 15:32:23 UTC
Red Hat Product Errata RHBA-2019:0699 None None None 2019-04-02 14:48:19 UTC
Samba Project 13129 None None None 2019-04-10 23:47:40 UTC

Description RAD team bot copy to z-stream 2019-03-06 15:32:21 UTC
This bug has been copied from bug #1510872 and has been proposed to be backported to 7.2 z-stream (EUS).

Comment 3 Andrej Dzilský 2019-03-18 15:04:40 UTC
I've fixed the version in this bugzilla if you don't mind.

Sanity_only.

Comment 5 errata-xmlrpc 2019-04-02 14:48:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0699

Comment 6 Christian Horn 2019-04-03 00:00:00 UTC
"Consequence: systemd sometimes thing smbd has been started correctly
 and sends a terminate signal (SIGTERM) to the process. This means
 that in some cases smbd isn't running because systemd killed it."

I was about to use that in a kbase, and think this does not apply.
Could you please doublecheck?  I think the following might apply:

"Consequence: systemd sometimes thinks that smbd has been started incorrectly
 and sends a terminate signal (SIGTERM) to the process. This means
 that in some cases smbd isn't running because systemd killed it."

Comment 7 Christian Horn 2019-04-04 05:20:32 UTC
Sorry, one more question.
Fujitsu looked at the fix ( samba-4.2.99-fix_systemd_forking.patch ),
and wonders why also this commit here was taken:

  ----------------------------------------
  # cat samba-4.2.99-fix_systemd_forking.patch
  ...
  From c78b24c5852ae484f9cd1c00e74fb6a6d52a104d Mon Sep 17 00:00:00 2001
  From: Andreas Schneider <asn@samba.org>
  Date: Tue, 12 Dec 2017 08:36:57 +0100
  Subject: [PATCH 3/4] systemd: Only start samba and nmbd when network
   interfaces are up

  For samba and nmbd we need to wait till a network interface is up or
  they wont be operational.

  BUG: https://bugzilla.samba.org/show_bug.cgi?id=13184

  Signed-off-by: Andreas Schneider <asn@samba.org>
  Reviewed-by: Jeremy Allison <jra@samba.org>

  Autobuild-User(master): Jeremy Allison <jra@samba.org>
  Autobuild-Date(master): Wed Dec 20 04:21:51 CET 2017 on sn-devel-144
  ---
   packaging/systemd/nmb.service   | 3 ++-
   packaging/systemd/samba.service | 3 ++-
   2 files changed, 4 insertions(+), 2 deletions(-)

  diff --git a/packaging/systemd/nmb.service b/packaging/systemd/nmb.service
  index 1804dcc99ea..07b1dfbe02e 100644
  --- a/packaging/systemd/nmb.service
  +++ b/packaging/systemd/nmb.service
  @@ -1,6 +1,7 @@
   [Unit]
   Description=Samba NMB Daemon
  -After=syslog.target network.target
  +Wants=network-online.target
  +After=syslog.target network.target network-online.target

   [Service]
   Type=notify
  diff --git a/packaging/systemd/samba.service b/packaging/systemd/samba.service
  index 1b64c3b779d..79b22a0da7a 100644
  --- a/packaging/systemd/samba.service
  +++ b/packaging/systemd/samba.service
  @@ -1,6 +1,7 @@
   [Unit]
   Description=Samba AD Daemon
  -After=syslog.target network.target
  +Wants=network-online.target
  +After=syslog.target network.target network-online.target

   [Service]
   Type=notify
  --
  2.21.0
  ----------------------------------------

It seems like that was fixed in RHEL7.6 but is not included in BZ#1510872.
Is it possible to get the background?


Note You need to log in before you can comment on or make changes to this bug.