On 01/26/2012 01:08 PM, Tanu Kaskinen wrote:
On Thu, 2012-01-26 at 12:35 +0100, David Henningsson wrote:
I'm trying to trace down a memory error in module-dbus-protocol, but I
am confused.

Either you use synchronous hooks, and then you can reference the
original core objects, or you use asynchronous subscription events, in
which case the pointers can become dangling at any time, so you can't
point into the core and have to make memory copies of *everything*. Right?

Make copies, or check if the objects are still in the core before
referencing them. I tried to make those checks where needed, but
apparently I failed at that.

The card is handled by subscription events, and I get memory errors on
quit [1] due to it referencing the profile's name as a hash key (!). But
while investigating I also saw pa_dbusiface_card_profile objects having
a pointer to the profile, which is disturbing.

If this is the only place where things are broken, I can fix it. But if
the same logic faults apply to all over the dbus protocol module, that
makes me quite uneasy with shipping it in a stable distribution,
especially as I don't know any consumer that makes use of this information.

Now that you've pointed out this issue, I don't trust the code at all
anymore. The only sane way forward is to convert all code in the dbus
module to use hooks instead of the subscription system.

I volunteer to do that work.

FYI, for the reasons above, module-dbus-protocol has now been disabled in the upcoming release of Ubuntu, 12.04. We just commented the line out in /etc/pulse/default.pa so it's easy to re-enable.

(Btw, the only known user of module-dbus-protocol is qpaeq, which Ubuntu does not currently ship.)

--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to