This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 469431 - gpk-application uses huge amount of resources when you click on "all packages"
gpk-application uses huge amount of resources when you click on "all packages"
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: gnome-packagekit (Show other bugs)
10
All Linux
medium Severity medium
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-31 16:03 EDT by James Antill
Modified: 2009-01-14 08:50 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-14 08:50:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
sysprof profile (90.32 KB, image/png)
2008-11-04 10:27 EST, Richard Hughes
no flags Details

  None (edit)
Description James Antill 2008-10-31 16:03:26 EDT
Description of problem:
 If you click on "all packages" in gpk-application it goes into a loop doing:

open("/usr/share/gnome-packagekit/icons/hicolor/48x48/status/pk-package-available.png", O_RDONLY) = 16
fstat(16, {st_mode=S_IFREG|0644, st_size=1943, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff242b35000
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
lseek(16, 0, SEEK_SET)                  = 0
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
close(16)                               = 0
munmap(0x7ff242b35000, 4096)            = 0
open("/usr/share/gnome-packagekit/icons/hicolor/48x48/status/pk-package-available.png", O_RDONLY) = 16
fstat(16, {st_mode=S_IFREG|0644, st_size=1943, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff242b35000
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
lseek(16, 0, SEEK_SET)                  = 0
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
close(16)                               = 0
munmap(0x7ff242b35000, 4096)            = 0
open("/usr/share/gnome-packagekit/icons/hicolor/48x48/status/pk-package-available.png", O_RDONLY) = 16
fstat(16, {st_mode=S_IFREG|0644, st_size=1943, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff242b35000
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
lseek(16, 0, SEEK_SET)                  = 0
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
close(16)                               = 0
munmap(0x7ff242b35000, 4096)            = 0
open("/usr/share/gnome-packagekit/icons/hicolor/48x48/status/pk-package-available.png", O_RDONLY) = 16
fstat(16, {st_mode=S_IFREG|0644, st_size=1943, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff242b35000
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
lseek(16, 0, SEEK_SET)                  = 0
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
close(16)                               = 0
munmap(0x7ff242b35000, 4096)            = 0
open("/usr/share/gnome-packagekit/icons/hicolor/48x48/status/pk-package-available.png", O_RDONLY) = 16
fstat(16, {st_mode=S_IFREG|0644, st_size=1943, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff242b35000
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
lseek(16, 0, SEEK_SET)                  = 0
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
close(16)                               = 0
munmap(0x7ff242b35000, 4096)            = 0
open("/usr/share/gnome-packagekit/icons/hicolor/48x48/status/pk-package-available.png", O_RDONLY) = 16
fstat(16, {st_mode=S_IFREG|0644, st_size=1943, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff242b35000
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
lseek(16, 0, SEEK_SET)                  = 0
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
close(16)                               = 0
munmap(0x7ff242b35000, 4096)            = 0
open("/usr/share/gnome-packagekit/icons/hicolor/48x48/status/pk-package-installed.png", O_RDONLY) = 16
fstat(16, {st_mode=S_IFREG|0644, st_size=1904, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff242b35000
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1904
lseek(16, 0, SEEK_SET)                  = 0
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1904
close(16)                               = 0
munmap(0x7ff242b35000, 4096)            = 0
open("/usr/share/gnome-packagekit/icons/hicolor/48x48/status/pk-package-available.png", O_RDONLY) = 16
fstat(16, {st_mode=S_IFREG|0644, st_size=1943, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff242b35000
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
lseek(16, 0, SEEK_SET)                  = 0
read(16, "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0000\0\0\0000\10\6\0\0\0W\2\371"..., 4096) = 1943
close(16)                               = 0
munmap(0x7ff242b35000, 4096)            = 0


Version:

gnome-packagekit.x86_64                  0.3.9-4.fc10                  installed
Comment 1 Richard Hughes 2008-11-04 08:31:47 EST
I'm guessing the loop terminates? Can you define "huge" number of resources?

At the end of the day, we do have a lot of packages in the fedora repos, so we will spin the CPU quite a bit looking for icons and that sort of thing.
Comment 2 James Antill 2008-11-04 09:21:17 EST
> I'm guessing the loop terminates? 

 Sure, eventually.

> Can you define "huge" number of resources?

 100% CPU, application is unusable until it finishes.

> At the end of the day, we do have a lot of packages in the fedora [...] 
> looking for icons and that sort of thing.

 Sure, but it's constantly reloading the _same_ icons which is what stood out to me ... surely we can just take a reference to one of the many instances already loaded, or something?
Comment 3 Richard Hughes 2008-11-04 10:27:59 EST
Created attachment 322438 [details]
sysprof profile

This is the sysprof trace. All the time is spent sorting the treeview...
Comment 4 Bug Zapper 2008-11-25 23:35:05 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Richard Hughes 2009-01-14 08:50:09 EST
This works very quickly for me now. It still causes 100% cpu for a second or two, but this is okay as it's returning a lot of data.

Note You need to log in before you can comment on or make changes to this bug.