Bug 456165

Summary: packagekid runs frequently, has errors and locks system mangement
Product: [openSUSE] openSUSE 11.2 Reporter: John Lange <j.lange>
Component: Update ProblemsAssignee: Scott Reeves <sreeves>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P3 - Medium CC: dimstar, qantas94heavy
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 357354    
Attachments: /var/log/pk_backend_zypp

Description John Lange 2008-12-03 19:50:04 UTC
In short, when I try and run zypper from the command line I get the following error:

System management is locked by the application with pid 16034 (/usr/sbin/packagekitd).

If I wait a few seconds and try again it usually works. This happens throughout the day regardless of how long I've been logged in. The logs are very large and contain all kinds of errors. I'll attach them next.
Comment 1 John Lange 2008-12-03 19:50:47 UTC
Created attachment 257832 [details]
/var/log/pk_backend_zypp
Comment 3 Juergen Weigert 2009-12-21 14:50:39 UTC
This issue is a year old and still present in 11.2

Additionally, I sometimes find that a non-existing pid is named in the error message. Can I remove a stale pid-file or something in this case?
Comment 4 Juergen Weigert 2010-03-03 20:13:07 UTC
What is the purpose of running packagekit peridoically at all? I have killed the process a few times, for the benefit of zypper and yast. Any are there any expected downsides of not running packagekit?
Comment 5 Jan Kupec 2010-03-04 11:24:57 UTC
(In reply to comment #3)
> This issue is a year old and still present in 11.2

The latest zypper (1.4.0) has been improved so that it offers to tell packagekit to quit. After that it waits 1 sec and checks again. If packagekit is not busy doing something (like downloading metadata or installing packages), this will cause it to close and zypper will continue.

Next planned thing to improve is to get rid of the global zypp lock so that zypper can continue even if another zypp app is running in case of read-only operations like 'search' or 'info', etc.

> Additionally, I sometimes find that a non-existing pid is named in the error
> message. Can I remove a stale pid-file or something in this case?

Yes.
Comment 6 Jan Kupec 2010-03-04 11:27:01 UTC
(In reply to comment #4)
> What is the purpose of running packagekit peridoically at all? I have killed
> the process a few times, for the benefit of zypper and yast. Any are there any
> expected downsides of not running packagekit?

It is probably the updater applet (the icon in your taskbar) which runs packagekit to check for available upadtes. You can configure it to run with any period you like, or you can disable it completely. There are no downsides of not running packagekit (apart from not being automatically informed about available updates).
Comment 7 Jan Kupec 2010-03-04 11:32:34 UTC
IMO there's not much more we can do here, so i suggest to close this bug. The zypp locking problem will be tracked in https://features.opensuse.org/306315
Comment 8 Juergen Weigert 2010-07-21 17:28:29 UTC
11.3 zypper now kills packagekit when needed. 

This is indeed helpful. Thanks!
Comment 11 Karl Cheng 2017-08-12 04:18:05 UTC
Comment 8 mentions this was fixed in 11.3.