[mythtv] possible filter manager leak

Andy Poling andy at realbig.com
Fri Mar 14 16:35:41 UTC 2008


On Sat, 15 Mar 2008, Mark Spieth wrote:
> Im not sure what the intention is with filter management, but in
> filtermanager
> the libs opened with LoadFilterLib's dlopen are not dlclosed at any time.
> This happens via the constructor of the filter manager. This also dlopens
> all filters every time. I found this because I was chasing a deadlock inside
> dlopen on play start which ended up being mythphone's fault (no mythphone,
> no deadlock :-).
>
> when a filter is used, it is dlopened again, and when done dlclosed but only
> those that are used. so this part is good.
>
> I may be wrong, but I suspect this is a handle leak.
> What was the intention?
> I would have thought a filter cache after they are all loaded and thus dont
> need to be loaded again, nor unloaded.

According to the man page, additional calls to dlopen() for any library will
simply return the same handle as was already obtained the first time, and it
is not de-allocated until dlclose() is called as many times as dlopen()...
which seems not to be happening by design.



More information about the mythtv-dev mailing list