[PATCH] Fix vanishing messaging context names - version #2

Jeremy Allison jra at samba.org
Wed Mar 29 22:31:02 UTC 2017


On Wed, Mar 29, 2017 at 11:17:08AM -0700, Jeremy Allison wrote:
> On Wed, Mar 29, 2017 at 08:58:59AM -0700, Jeremy Allison via samba-technical wrote:
> > > > inside the bin/samba binary for forked tasks. Otherwise we
> > > > will forever be fighting this inside source4-forked children.
> > > > 
> > > > I'd rather bite the bullet and fix this properly for all
> > > > time now :-).
> > > 
> > > Patches welcome, but we have multiple messaging contexts in source4, so
> > > it isn't as simple.  In the meantime, I don't like DB or filesystem
> > 
> > After a fork all messaging contexts need to
> > be reset, otherwise you are guarenteed to have problems
> > like the one I'm tracking now.
> > 
> > > modification in a talloc destructor (see the earlier, rejected,
> > > proposal for a talloc_free_for_exit()), which is why I propose this
> > > patch.
> > > 
> > > To be clear, this part of a series to try and make multi-process LDAP
> > > sane, because I've had a number of our user say they are bleeding on
> > > this when they hook Zarafa (a mail server) up to Samba.
> > 
> > If we fix this properly in the process-model code (after we fork),
> > then we should be able to remove the problem from any other
> > services we later move to multi-process.
> 
> OK, here is what I think is a better fix as it's addressing
> the root cause, not doing bandaids. This should also fix your
> multi-process LDAP issue.
> 
> Essentially after a fork() we must re-init the list of imessaging
> contexts to stop the child process removing names registered by
> its parent. I've added this just after the ldb_wrap_fork_hook() call,
> where we take care of the same issue for tdb handles. It's also
> similar to what we do inside the s3 reinit_after_fork() code.
> 
> Volker, can you take a look and see that I got the modification
> of server_id right in the reinit code ?

No, I didn't :-). Fixed version attached. This does the
same as the s3 messaging_reinit() code, and should work
better :-).

Please review and push if happy !

Jeremy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s4-messaging.-Add-imessaging_reinit_all-function.patch
Type: text/x-diff
Size: 4648 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170329/f0c678ae/0001-s4-messaging.-Add-imessaging_reinit_all-function.diff>


More information about the samba-technical mailing list