Threads and modules

Matthew Newton mcn4 at leicester.ac.uk
Mon Mar 23 23:20:22 CET 2015


On Mon, Mar 23, 2015 at 06:08:24PM -0400, Arran Cudbard-Bell wrote:
> 
> > On 23 Mar 2015, at 17:51, Matthew Newton <mcn4 at LEICESTER.AC.UK> wrote:
> > 
> > Thinking about it more, and checking the code, yes I'm wrong. Just
> > not sure why I even thought that in the first place. Been staring
> > at this for too long I guess.
> > 
> > I'll add a connection pool to the mschap winbind code so it
> > doesn't have threading issues... as always annoying the issues
> > only show up under load, not in normal testing.
> 
> I was wondering about that...
> 
> I figured you'd done some TLS magic in the samba patches, but I guess not :)

I did originally, but the code wasn't great; there were cases
where the library could be dlclose'd and threads still have data
structures around that wouldn't have called their destructors...
yet. This is the correct version.

> Yes, you'll need a connection pool.
> 
> There's no per module/thread instantiators or destructors.

Feeling rather silly - if asked this I would have told anyone
that, but for some reason it didn't come to mind. Oh well. Thread
pool is trivial and about 70% done now.

> It's also the reason why you never parent memory allocated when processing a
> request, from the context of the module instance.

Yup, that makes sense.

Thanks for rebooting my sanity...

Matthew


-- 
Matthew Newton, Ph.D. <mcn4 at le.ac.uk>

Systems Specialist, Infrastructure Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom

For IT help contact helpdesk extn. 2253, <ithelp at le.ac.uk>


More information about the Freeradius-Devel mailing list