Bug 11585 - Change notification disabled by sig HUP
Summary: Change notification disabled by sig HUP
Status: NEEDINFO
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.3.0
Hardware: All Linux
: P5 major (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-01 18:36 UTC by red64lemans
Modified: 2015-11-03 03:29 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 red64lemans 2015-11-01 18:36:04 UTC
In V4.3.0 the non-clustered smbd change notification is disabled by sig HUP to smbd.  The smbd forked off to handle notifications does not have a handler for sig HUP so it terminates and is not restarted.

root@p1020142:/samba/var# /samba/bin/tdbdump lock/names.tdb
{
key(14) = "notify-daemon\00"
data(5) = "6485\00"
}

root@p1020142:/samba/var# ps aux | grep smbd
root      6483  0.0  0.2 291696 10200 ?        Ss   12:09   0:00 /samba/sbin/smbd -F
root      6485  0.0  0.0 283056  2804 ?        S    12:09   0:00 /samba/sbin/smbd -F
root      7462  0.0  0.0   4776   624 pts/0    S+   12:15   0:00 grep smbd
root@p1020142:/samba/var#


After pkill -HUP smbd

root@p1020142:/samba/var# ps aux | grep smbd
root      6483  0.0  0.2 292224 10444 ?        Ss   12:09   0:00 /samba/sbin/smbd -F
root      7738  0.0  0.0   4776   624 pts/0    S+   12:16   0:00 grep smbd

root@p1020142:/samba/var# /samba/bin/tdbdump lock/names.tdb
{
key(14) = "notify-daemon\00"
data(5) = "6485\00"
}
Comment 1 Jeremy Allison 2015-11-02 22:28:23 UTC
Hmmm. There should be a SIGHUP handler inherited from the parent - it's set up before smbd_notifyd_init() is called. I'll look more closely.
Comment 2 Jeremy Allison 2015-11-02 23:33:51 UTC
Hmmm. Can't reproduce this in master.

# ps axwu | grep smbd

root     19884  0.4  0.0 324004  6064 ?        Ss   15:29   0:00 /usr/local/samba/sbin/smbd
root     19885  0.0  0.0 318156  2684 ?        S    15:29   0:00 /usr/local/samba/sbin/smbd
root     19887  0.0  0.0 324004  3012 ?        S    15:29   0:00 /usr/local/samba/sbin/smbd

# /usr/local/samba/bin/tdbdump /usr/local/samba/var/lock/names.tdb 
{
key(14) = "notify-daemon\00"
data(26) = "19885/8361346252620088626\00"
}

# killall -HUP smbd
# ps axwu | grep smbd

root     19884  0.1  0.0 324004  6212 ?        Ss   15:29   0:00 /usr/local/samba/sbin/smbd
root     19885  0.0  0.0 318156  2684 ?        S    15:29   0:00 /usr/local/samba/sbin/smbd
root     19887  0.0  0.0 324004  3012 ?        S    15:29   0:00 /usr/local/samba/sbin/smbd

What platform are you testing this on ?
Comment 3 red64lemans 2015-11-03 03:29:46 UTC
It was on Centos 7 without any changes and Centos 6 with a number changes.  I was using the Samba V4.3.0 tar file.  I will pull down the git archive tomorrow and try with it to see if there is a difference.