• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 11
[Release] Common plugin cache
#46
Tobias do you have any idea what may cause this plugin crash?

http://pastebin.com/zpeh4LGq

This only happens on my gentoo box while my windows machine is running fine.
I tried the pvr, eden-pvr and "regular" xbmc rc2 versions but the error is always the same.
I've to admit I wanted to look into it myself but maybe you can pin down the issue a bit faster.
Thanks in advance for any information or help you can provide.

*edit*
The issue was solved today by re-emerging xbmc again with the latest patches and system updates.
Reply
#47
(2012-02-17, 13:36)TobiasTheCommie Wrote: Try creating a ~/.xbmc/temp directory

You are the only one to report this problem, which is weird. And the log says that it can't create the file: /Users/longfortravel/.xbmc/temp/commoncache.socket

But the problem also hits for your weather addon

19:15:39 T:2959388672 WARNING: CreateDirectory, cant create dir </Users/longfortravel/.xbmc/temp/weather/>. trying lower case.
19:15:39 T:2959388672 ERROR: Create - Error creating /Users/longfortravel/.xbmc/temp/weather/

In any case, your problem is not specific to the cache service.

But try creating ~/.xbmc/temp (It is made automagically on my mac test machine) and hopefully it will work.

ETA: If creating the folder works for you, i will escalate this.

EETA: Could you please verify that your partition is NOT formated as case insensitive?

so sorry for the extra late reply. i haven't used xbmc in a while.

your post here tipped me off that it was probably related to a setting on the mac, and sure enough... i just changed the permissions in my users folder and voila! no more script error. it was set to 'read only' so the temp folder wasn't being automatically created.

sometimes the simplest solutions elude me Tongue. sorry again, but thx much for helping!

and just in general, i want to say how much i appreciate all the wonderful work you guys do. muchas gracias!
Reply
#48
hi;
DDDamian and i have been working on figuring out why my CPU usage (starting in the last 2 weeks) was at 100% constantly.
thread is here ---> http://forum.xbmc.org/showthread.php?tid=126182

after much searching, i found that "script.common.plugin.cache" was the cause.
when i MOVE this folder located at /storage/.xbmc/addons/ anywhere else, and then reboot, cpu usage is a normal 3-4% !

if i move it back, and reboot, cpu usage is back to 100% !

whats going on with script.common.plugin.cache ??
Reply
#49
Hello.

I want to use your script to :
- store results of one function in cache
- get results of first function in second function

How I use your script :

Code:
try:
   import StorageServer
except:
   import storageserverdummy as StorageServer
# Init commoncache for MyPicsDB with 1 hour timeout
cache = StorageServer.StorageServer("MyPicsDB",1)


    def set_properties(self):
        cache.table_name = "MyPicsDB"
        cache.delete("MyPicsDB%")
        cache.set("MyPicsDBNb", _count )
        print("MyPicsDBNb", cache.get("MyPicsDBNb") )


    def set_slideshow(self):

        cache.table_name = "MyPicsDB"
        _count = cache.get("MyPicsDBNb")
        print("COUNT=", _count)

In LOG, for function set_properties, MyPicsDBNb is not stored :

NOTICE: ('MyPicsDBNb', '')

Same thing in set_slideshow :

NOTICE: ('COUNT=', '')

I have try with CacheFunction but my program didn't act as expected as I want to force refresh of function execution in set_properties even if cache timeout has not expired.

EDIT : Even with your example, I cannot get "some_string" value

Code:
cache.table_name = "PluginName"
        cache.set("some_string", "string")
        some_string = cache.get("some_string")
        print("some_string=",some_string)

http://wiki.xbmc.org/index.php?title=Add....2C_str.29

EDIT 2 : I don't know what was wrong but now my script is OK :S
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
#50
Everytime when i install this addon which is needed for youtube i have playback problems with movies and series.
After a fresh system reboot i can play a movie/serie but when it's finished or stopped manually you can't.
The movie then only plays for 8~10 seconds in the background and you can't play it again, not even after a reboot. If your lucky it will after 7~10 attempts.
I'm using the skin Aeon MQ4 but it also happens in default Confluence skin.

The problems always returns when i install YouTube addon together with Common plugin cache and Simple Downloader.
If i look at these 3 addons i can only think of 1 addon to blame that is Common plugin cache.

What are the things you need to know or want me to do to track down the issue?
Reply
#51
Created a bug for it including log file http://forum.xbmc.org/showthread.php?tid=142235
Reply
#52
As of today I get a plugin error when starting XBMC.

What changed?
I switched from local accounts to network accounts on my mac.
What have I tried?
Delete the .xbmc folder. result: new .xbmc folder made on startup. still error
Checked user permissions, all seem ok
Made a new user-account, fresh xbmc, installed the cache plugin, reboot and get same error.

Because a fresh install also has this problem, on a fresh user account tends to make me think it has to do with the network account as thats whats changed.

This is the error I get in the Log:

12:01:33 T:2959249408 NOTICE: StorageServer Module loaded RUN
12:01:33 T:2959249408 NOTICE: StorageClient-1.3.0 Starting server
12:01:33 T:2959249408 NOTICE: StorageServer-1.3.0 Storage Server starting /Network/Servers/server.mydomain.eu/Users/myname/Library/Application Support/XBMC/userdata/Database/commoncache.db
12:01:36 T:2959249408 NOTICE: [StorageServer-1.3.0] _sock_init : ''
12:01:36 T:2959249408 NOTICE: [StorageServer-1.3.0] _sock_init : 'Done: '/Network/Servers/server.mydomain.eu/Users/myname/.xbmc/temp/commoncache.socket''
12:01:36 T:2959249408 NOTICE: [StorageServer-1.3.0] _startDB : 'sql3 - /Network/Servers/server.mydomain.eu/Users/myname/Library/Application Support/XBMC/userdata/Database/commoncache.db'
12:01:37 T:2959249408 ERROR: Error Type: <class 'socket.error'>
12:01:37 T:2959249408 ERROR: Error Contents: (22, 'Invalid argument')
12:01:37 T:2959249408 ERROR: Traceback (most recent call last):
File "/Network/Servers/server.mydomain.eu/Users/myname/Library/Application Support/XBMC/addons/script.common.plugin.cache/default.py", line 40, in <module>
run()
File "/Network/Servers/server.mydomainr.eu/Users/myname/Library/Application Support/XBMC/addons/script.common.plugin.cache/default.py", line 35, in run
s.run()
File "/Network/Servers/server.mydomain.eu/Users/myname/Library/Application Support/XBMC/addons/script.common.plugin.cache/lib/StorageServer.py", line 193, in run
sock.bind(self.socket)
File "<string>", line 1, in bind
error: (22, 'Invalid argument')
Reply
#53
I have the same issue on only one of my XBMC installs - OSX server 10.6.8. Happened on Eden as well as Frodo, but I just ignored it. Traced it to when socket.bind(self.socket) is called. If I replace self.socket with "localhost:9999" it's OK, but I don't know how to test if that is a suitable solution Wink Afraid I don't know much about python.

** Edit *** Just saw the post on page 5 of this thread. I tried repairing disk permissions in the hope that for once it would actually fix a problem. It didn't of course.

** Edit *** On 10.6, it only works when the socket is created in /tmp, but not /Users/media/.xbmc. Works either way 10.7

How can I test if this plugin is actually working when I hardcode the socket to /tmp/? I can see that it goes to sleep "zzzzzz", but can't see it waking up
Reply
#54
I'm having the same issue with 100% CPU usage under xbmcbuntu frodo and openelec 3.0 beta 2. I'll be happy to provide any logs or info if needed.

I'm using an AMD A6-5400k Trinity chip on the xvba branch.
Reply
#55
Same high cpu issue here on xbmcbuntu.
Log Here
Reply
#56
I was seeing high CPU load as well, about 50 - 65% when the machine was just sitting idle. It took me a while but I traced it back to the scripts.common.plugin.cache add-on. If I disabled the plugin, CPU load would immediately drop.

I did some digging in the Python and I think there is an issue with the run() method. I noticed that with a default install of OpenELEC 2.95.(3,4,5), the system boots and the OS time is from the hardware clock. At some point after/during boot, the software/system clock takes over. I believe my issue was that my HW clock was set to GMT while my SW clock was set to local (GMT-5) time.

This causes a problem in the logic of the run() method because the idle_since time could be 5 hours ahead of later time() calls if the system time is applied after idle_since is set but before the timeout (15 seconds) occurs. I was seeing this in my log as something like:
03:00 Starting up
22:00 Sleeping zzzzz

Some possible ways to fix the issue:
- Run "hwclock -w" to push the system time to the hwclock. This is what I did and it appeared to resolve the issue.
- Disable automatic startup of the cache which may let the system clock take over before the cache is started and grabs the hw clock time
- Add a failsafe check in the run() method that idle_since should never be after/greater than time(). Or better yet, find a better way to track idle time in this method.

Hope that helps,
-mike
Reply
#57
(2012-12-13, 06:08)mpilone Wrote: I was seeing high CPU load as well, about 50 - 65% when the machine was just sitting idle. It took me a while but I traced it back to the scripts.common.plugin.cache add-on. If I disabled the plugin, CPU load would immediately drop.

I did some digging in the Python and I think there is an issue with the run() method. I noticed that with a default install of OpenELEC 2.95.(3,4,5), the system boots and the OS time is from the hardware clock. At some point after/during boot, the software/system clock takes over. I believe my issue was that my HW clock was set to GMT while my SW clock was set to local (GMT-5) time.

This causes a problem in the logic of the run() method because the idle_since time could be 5 hours ahead of later time() calls if the system time is applied after idle_since is set but before the timeout (15 seconds) occurs. I was seeing this in my log as something like:
03:00 Starting up
22:00 Sleeping zzzzz

Some possible ways to fix the issue:
- Run "hwclock -w" to push the system time to the hwclock. This is what I did and it appeared to resolve the issue.
- Disable automatic startup of the cache which may let the system clock take over before the cache is started and grabs the hw clock time
- Add a failsafe check in the run() method that idle_since should never be after/greater than time(). Or better yet, find a better way to track idle time in this method.

Hope that helps,
-mike

Thanks for figuring this out. I have the same exact issue. With openelec, is it possible to make this change persistent so that a reboot doesn't reset the clock?

Reply
#58
hello all of you...

french community have a request---

how to clean commoncache.db on a raspberry.pi ?

we need to clean cache from some plugins,on atv it s user/var/mobil/preferences--

but where are the folders on raspberry ?

thanks a lot hope one of you have the answer---
Reply
#59
Dear all,
I get the following error during startup:

12:30:12 T:2957651968 INFO: -->Python script returned the following error<--
12:30:12 T:2957651968 ERROR: Error Type: <class 'socket.error'>
12:30:12 T:2957651968 ERROR: Error Contents: AF_UNIX path too long
12:30:12 T:2957651968 ERROR: Traceback (most recent call last):
File "/Users/andrkuhn/Library/Application Support/XBMC/addons/script.common.plugin.cache/default.py", line 40, in <module>
run()
File "/Users/andrkuhn/Library/Application Support/XBMC/addons/script.common.plugin.cache/default.py", line 35, in run
s.run()
File "/Users/andrkuhn/Library/Application Support/XBMC/addons/script.common.plugin.cache/lib/StorageServer.py", line 197, in run
sock.bind(self.socket)
File "<string>", line 1, in bind
error: AF_UNIX path too long
12:30:12 T:2957651968 INFO: -->End of Python script error report<--



This is an extract from the xbmc.log file. It seems, that the path is too long. Anything I can do? The script fails loading during startup of XBMC, so I cannot use certain plugins...
Running Eden on MacBook Pro. On ATV2 the error is not to be seen.

Thanks, Andre
Reply
#60
I too was having some 100% CPU usage randomly out of nowhere, and after having a snoop around the code itself I found a few 'bug fixes' for OSX 10.8 with Frodo RC2/3:

- ~/Library/Application Support/XBMC/userdata/addon_data/script.common.plugin.cache/ needed to be created
- Turns out the default path used for POSIX does not relate to a usable socket file on OSX. What I've done is instead of creating a socket in the user's profile dir (which like above results in a long-ass folder structure), I've created a socket in XBMC's temp dir which should return ~/.xbmc/temp.

All it requires is to edit lib/StorageServer.py and replace line 140:
Code:
self.socket = os.path.join(self.xbmc.translatePath(self.settings.getAddonInfo("profile")).decode("utf-8"), 'commoncache.socket')

With this:
Code:
self.socket = os.path.join(self.xbmc.translatePath('special://temp/').decode("utf-8"), 'commoncache.socket')
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 11

Logout Mark Read Team Forum Stats Members Help
[Release] Common plugin cache1