Shubhamjain007 / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

Blocked WorkThread on RasPi: Timeout occurred #101

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download openhab-1.0.0-SNAPSHOT to your Raspberry Pi
2. Start openhab
3. After like 5 Minutes OSGi seems to block Worker Threads because of timeouts

What is the expected output? What do you see instead?
On 0.9.1, startup took a long time but succeeded and openhab had been useful.
On 1.0.0, startup takes even longer (like 2 to 4 times longer) and timeouts 
occur.

WARN  OSGi[:97] - [SCR] Enabling components of bundle 
org.openhab.core.persistence did not complete in 30000 ms
WARN  OSGi[:97] - [SCR - WorkThread] Timeout occurred! Thread was blocked on 
processing [QueuedJob] WorkPerformer: 
What version of the product are you using? On what operating system?

Please provide any additional information below.
Installed addons:
org.openhab.binding.exec-1.0.0-SNAPSHOT.jar
org.openhab.binding.fritzbox-1.0.0-SNAPSHOT.jar
org.openhab.binding.http-1.0.0-SNAPSHOT.jar
org.openhab.binding.knx-1.0.0-SNAPSHOT.jar
org.openhab.persistence.db4o-1.0.0-SNAPSHOT.jar
org.openhab.persistence.rrd4j-1.0.0-SNAPSHOT.jar
and
Demo configuration.

Would be really great if the Raspi could still be used for openhab.

Thanks in advance :)

Original issue reported on code.google.com by hlw31...@gmail.com on 15 Aug 2012 at 2:59

GoogleCodeExporter commented 8 years ago
Searching around, I appended -server -XX:+AggressiveOpts to start.sh and now 
less bundles fail to come up in time. Seems to help a bit

Original comment by hlw31...@gmail.com on 15 Aug 2012 at 3:28

GoogleCodeExporter commented 8 years ago
One major difference between 0.9.1 and 1.0.0 is the persistence support, which 
might cost quite some performance (especially with the demo setting where a lot 
is persisted).
Could you have a try and remove the two persistence bundles from the addons to 
see if the runtime behavior gets closer to how it is on 0.9.1?

Original comment by kai.openhab on 15 Aug 2012 at 4:07

GoogleCodeExporter commented 8 years ago
Just did that, you're right - behavior comes closer to 0.9.1.

Do I have to use both bundles (db4o and rrd4j)?
I want to use/test the charting engine so I guess rdd4j is needed.

Thank you :)

Original comment by hlw31...@gmail.com on 15 Aug 2012 at 4:40

GoogleCodeExporter commented 8 years ago
Right, for charting you only need the rrd4j bundle.
Remember to adjust the configurations/persistence/rrd4j.persist file to persist 
the items that you want to use in the charts.

Original comment by kai.openhab on 15 Aug 2012 at 4:54

GoogleCodeExporter commented 8 years ago
Ok, so I only enabled these addons:
org.openhab.binding.knx-1.0.0-SNAPSHOT.jar
org.openhab.persistence.rrd4j-1.0.0-SNAPSHOT.jar

and of course kept -server -XX:+AggressiveOpts options in start.sh (maybe add 
as default?)

until openhab is fully started it takes
real    0m45.334s
user    0m43.112s
sys     0m2.222s

Perfect ;)

Original comment by hlw31...@gmail.com on 15 Aug 2012 at 5:01

GoogleCodeExporter commented 8 years ago
> maybe add as default?

They are said to be experimental... So only, if really necessary.
Can you check the times with your current setup without this option?

Original comment by kai.openhab on 15 Aug 2012 at 5:12

GoogleCodeExporter commented 8 years ago
I'm with you not to enable experimental parameters as default. 

I did some tests and timings vary greatly - between <1minute to 10 minutes! 

The the sake of optimising on RasPi, could you please add a Wiki page where I'd 
like to document findings and recommendations?

Back to topic, I found starting without any bundles really fast and then moving 
bundles to the addons folder when running. Openhab is really smart and watches 
this folder and even loads new bundles there.

Maybe some kind of staggered openhab-boot is adequate to circumvent the 
timeouts?

Original comment by hlw31...@gmail.com on 16 Aug 2012 at 10:57

GoogleCodeExporter commented 8 years ago
I have created this new page http://code.google.com/p/openhab/wiki/HardwareFAQ 
and added you as a contributor with rights to edit the wiki. Thanks for sharing 
your experiences!

Original comment by kai.openhab on 16 Aug 2012 at 7:40

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 24 Aug 2012 at 4:06

GoogleCodeExporter commented 8 years ago
I have been running openHAB 1.0.0 on my Seagate DocStar since a few days now. I 
also had timeout error messages during startup. 

1.) 
12:53:26.461 WARN  OSGi[:97] - [SCR - WorkThread] Timeout occurred! Thread was 
locked on processing [QueuedJob] WorkPerformer: 
org.eclipse.equinox.internal.dSCRManager@cebf1c; actionType 1
12:53:26.479 WARN  OSGi[:97] - [SCR] Enabling components of bundle org.openhabi 
did not complete in 30000 ms

2.) 
13:38:38.218 WARN  OSGi[:97]- Getting a lock required more than 10000 ms. There
might be a synchronization problem in this callstack or just the build/dispose
process of some components took too long!

There are system properties to increase the timeout values:

For 1.
e.g. -Dequinox.ds.block_timeout=240000

For 2.
z.B. -Dequinox.scr.waitTimeOnBlock=60000

With these two system properties openHAB 1.0.0 starts in 4 minutes. 
Please try these parameters on your RasPi. If these parameter fix your timeout 
problem, I will document this on the wiki.  

KR

Wolfgang

Original comment by Wolfgang...@googlemail.com on 25 Aug 2012 at 4:16

GoogleCodeExporter commented 8 years ago
Thank you Wolfgang, this really helped to solve the timeout issues. openhab 
starts in about 5 Minutes and prints no timeout warnings anymore.

I'll add this to the Hardware-Wiki-Page

KR

Original comment by hlw31...@gmail.com on 29 Aug 2012 at 6:58

GoogleCodeExporter commented 8 years ago
Would it make sense to add these two parameters in general to the start 
scripts? I wouldn't see a reason against it, right?

Original comment by kai.openhab on 29 Aug 2012 at 7:04

GoogleCodeExporter commented 8 years ago
I have added the parameters to the start scripts: 
http://code.google.com/p/openhab/source/detail?r=59e2f5aea3d7e4e69959d656fe28d1d
54524f960

I will hence also remove it again from the wiki page as it should be no issue 
anymore.

Original comment by kai.openhab on 30 Aug 2012 at 7:47

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 30 Aug 2012 at 7:48