Open registration is disabled at the moment due to spam.If you need a new account, please contact Keto on oftc.net IRC and provide your desired username and email.
This Bugzilla instance is no longer in active use, so you should only need an account if you wish to use the Sailfish OS community OBS.
Bug 560 - provider cache doesn't seem to be working
Summary: provider cache doesn't seem to be working
Status: NEW
Alias: None
Product: Mer Core
Classification: Unclassified
Component: contextkit (show other bugs)
Version: 0.20120419.1
Hardware: Other Mer
: Normal normal
Assignee: Not Taken
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-04 20:20 UTC by Robin Burchell
Modified: 2012-09-24 17:04 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Burchell 2012-09-04 20:20:24 UTC
contextkit has a provider cache, which is used presumably to improve application startup time when dealing with providers (as otherwise you have billions of syscalls and XML parsing and tears of blood etc)

this doesn't seem to be in place, trace is from running sysuid on nemo:
6110  lstat64("/usr/share/contextkit/providers/cache.cdb", 0xae942690) = -1 ENOENT (No such file or directory)

it then proceeds to go ahead and try read all providers in amazingly terrible fashion (there seems to be some kind of horrible bug there, why is it trying to continually read() when read() is returning 0?):
6110  open("/usr/share/contextkit/providers/battery.context", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 15
6110  fcntl64(15, F_SETFD, FD_CLOEXEC)  = 0
6110  fstat64(15, {st_mode=S_IFREG|0644, st_size=436, ...}) = 0
6110  fstat64(15, {st_mode=S_IFREG|0644, st_size=436, ...}) = 0
6110  read(15, "<?xml version=\"1.0\"?>\n<provider "..., 16384) = 436
6110  read(15, "", 15948)               = 0
6110  read(15, "", 588)                 = 0
6110  read(15, "", 16384)               = 0
6110  read(15, "", 1024)                = 0
6110  close(15)                         = 0
6110  stat64("/usr/share/contextkit/providers/battery.context", {st_mode=S_IFREG|0644, st_size=436, ...}) = 0
6110  inotify_add_watch(14, "/usr/share/contextkit/providers/battery.context", IN_MODIFY|IN_ATTRIB|IN_MOVED_FROM|IN_MOVED_TO|IN_DELETE_SELF|IN_MOVE_SELF) = 2
6110  open("/usr/share/contextkit/providers/bluez.context", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 15
6110  fcntl64(15, F_SETFD, FD_CLOEXEC)  = 0
6110  fstat64(15, {st_mode=S_IFREG|0644, st_size=245, ...}) = 0
6110  fstat64(15, {st_mode=S_IFREG|0644, st_size=245, ...}) = 0
6110  read(15, "<?xml version=\"1.0\"?>\n<provider "..., 16384) = 245
6110  read(15, "", 16139)               = 0
6110  read(15, "", 779)                 = 0
6110  read(15, "", 16384)               = 0
6110  read(15, "", 1024)                = 0
6110  close(15)                         = 0
Comment 1 Iekku Pylkka 2012-09-10 11:09:04 UTC
Triaged: normal - normal
Comment 2 John Brooks 2012-09-24 17:04:58 UTC
As discussed on IRC, I think the only thing necessary here is calling update-contextkit-providers in %post for any package that changes /usr/share/contextkit/providers.