RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1686048 - samba 4.6.2-11.el7_4: unreliable winbindd start with Type=notify and double forking [rhel-7.2.z]
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: 2022-09-16 08:13 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
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3600511 0 None None None 2019-04-02 23:52:05 UTC
Red Hat Product Errata RHBA-2018:0937 0 None None None 2019-03-06 15:32:23 UTC
Red Hat Product Errata RHBA-2019:0699 0 None None None 2019-04-02 14:48:19 UTC
Samba Project 13129 0 None None None 2019-05-07 06:13:27 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>
  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>
  Reviewed-by: Jeremy Allison <jra>

  Autobuild-User(master): Jeremy Allison <jra>
  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.