Kristján Valur Jónsson
2018-Jan-30 12:54 UTC
[Samba] Samba 4.7.4 + bind9 DLZ /backend/ dropping delegated domain
No, I'm reading the dlz_bind9.c code. I've found and fixed the problem. It turns out that using a reference counted singleton is a bad idea. The singleton is defunct after reload. If we simply create a new state object and destroy the old one as bind is trying to let us do, things work out fine. This works, at least, for bind9.9. I cant test with the older (9.8), so it is possible that the singleton approach was necessary for that. Expect a pull request from me soon. On 30 January 2018 at 11:55, Rowland Penny via samba <samba at lists.samba.org> wrote:> On Tue, 30 Jan 2018 11:24:42 +0000 > Kristján Valur Jónsson <kristjan at rvx.is> wrote: > > > Right, that is the _workaround_. It'd be great to see that > > documented in the Wiki. > > It is now. > > > However, samba_dlz is supposed to support reload, and there has been > > work on that file to fix slow reload previously. > > I"m currently doing experiments to figure out what is going wrong. > > > > One thing is clear, the messages from samba_dlz is confusing, since > > it is actually not "shutting down". > > Rather, samba_dlz, maintains a reference counted singleton of its > > state. What happens during reload is: > > 1) dlz_create is called. The refcount is upped, same internal > > instance returned to named and* nothing is logged.* > > 2) dlz_configure() is called. > > 3) dlz_destroy() is called. The refcount is decreased (from 2 to 1), > > nothing is destroyed, *but it incorrectly logs that it is shutting > > down!* > > > > Clearly, bind expects to start a new instance of its dlz, initialize > > it, and then destroy the old instance. > > > > Still not sure where the problem lies, if you are only reading the Bind > source code, then the problem is a Bind one, but if you are also > reading the Samba code, then it could be a Samba one. > > Rowland > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >-- Kv, Kristján Valur Jónsson, RVX
Rowland Penny
2018-Jan-30 13:38 UTC
[Samba] Samba 4.7.4 + bind9 DLZ /backend/ dropping delegated domain
On Tue, 30 Jan 2018 12:54:23 +0000 Kristján Valur Jónsson <kristjan at rvx.is> wrote:> No, I'm reading the dlz_bind9.c code. > I've found and fixed the problem. It turns out that using a reference > counted singleton is a bad idea. The singleton is defunct after > reload. If we simply create a new state object and destroy the old > one as bind is trying to let us do, things work out fine. > This works, at least, for bind9.9. I cant test with the older (9.8), > so it is possible that the singleton approach was necessary for that. > Expect a pull request from me soon. > >If you are going to propose a patch to fix this in the Samba code, then you you need to send it to the samba-technical mailing list, it also needs to be formatted correctly, see 'README.Coding' in the source root. Rowland
Kristján Valur Jónsson
2018-Jan-30 17:35 UTC
[Samba] Samba 4.7.4 + bind9 DLZ /backend/ dropping delegated domain
Already created a pull request: https://github.com/samba-team/samba/pull/124 as per https://wiki.samba.org/index.php/Using_Git_for_Samba_Development I'll subscribe to the technical list as well. On 30 January 2018 at 13:38, Rowland Penny via samba <samba at lists.samba.org> wrote:> On Tue, 30 Jan 2018 12:54:23 +0000 > Kristján Valur Jónsson <kristjan at rvx.is> wrote: > > > No, I'm reading the dlz_bind9.c code. > > I've found and fixed the problem. It turns out that using a reference > > counted singleton is a bad idea. The singleton is defunct after > > reload. If we simply create a new state object and destroy the old > > one as bind is trying to let us do, things work out fine. > > This works, at least, for bind9.9. I cant test with the older (9.8), > > so it is possible that the singleton approach was necessary for that. > > Expect a pull request from me soon. > > > > > > If you are going to propose a patch to fix this in the Samba code, then > you you need to send it to the samba-technical mailing list, it also > needs to be formatted correctly, see 'README.Coding' in the source root. > > Rowland > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >-- Kv, Kristján Valur Jónsson, RVX