[packagekit] backend initialized multiple times when using pk-application
Richard Hughes
hughsient at gmail.com
Thu Sep 20 11:03:48 PDT 2007
On Thu, 2007-09-20 at 21:01 +0200, Andreas wrote:
> When using pk-application, the backend initializer function gets called
> more then once before the destroy function is called. That's a bug I
> guess. It makes the alpm backend crash because it has to initialize some
> stuff which must be guaranteed to only be initialized once at a time (of
> course you could work arround this).
Well, it might get called:
initialize
destroy
initialize
destroy
But it can't be called:
initialize
initialize
destroy
Unless you're threading... which you might be. Do you only hit this when
you do two simultaneous queries? If that's the case you'll get:
initialize(1)
initialize(2)
destroy(1)
destroy(2)
> I can't see the problem in pk-application. Can you have a look at it?
> Shouldn't even pakagekitd itself make sure when and how often this
> function is called?
Well, initialize gets called when the backend .so is loaded, and destroy
just before the .so is unloaded.
Richard
More information about the PackageKit
mailing list