WOL causes XBMC Gotham to crash (Raspberry Pi)
#1
I am running Gotham Alpha 12 on Pi, and since a while back the WOL function in Gotham has caused XBMC to crash when waking up my MySQL server (or other server/device if set in wakeonlan.xml).

I have been to lazy to report it earlier (never grabbed a debug log), but it has happened since a month or so, before that it did work.
I am running Raspbmc, but I have tested briefly with OE and it happens there as well.

I have not changed anything in wakeonlan.xml other than deleted router and other devices that automatically gets added as soon as you touch any sources, perhaps there is another setting I can try?

I saw another user with same problem (on xbmcbuntu): http://forum.xbmc.org/showthread.php?tid...pid1622826

Edit: I might also add that WOL does not work when starting XBMC. If no other way to wake server is possible, XBMC will not start or it will start but without any libraries.

Debug log: http://xbmclogs.com/show.php?id=133362

wakeonlan.xml:
Code:
<onaccesswakeup>
    <netinittimeout>20</netinittimeout>
    <netsettletime>500</netsettletime>
    <wakeup>
        <host>192.168.10.11</host>
        <mac>00:11:24:D0:F4:A2</mac>
        <pingport>3306</pingport>
        <pingmode>1</pingmode>
        <timeout>300</timeout>
        <waitonline>40</waitonline>
        <waitonline2>40</waitonline2>
        <waitservices>0</waitservices>
    </wakeup>
</onaccesswakeup>

I didn´t know if I should post here or in the Raspberry forum, feel free to move it if it belongs there.
Reply
#2
I see no change in WakeOnAccess module but from logs it seems WOL is sent however the expected wait-sequence does not appear to complete (there is no log saying what 'result' woa had) instead it looks like MySQL things commences even before server is woken and that is likely the problem.

When you resume @22:16 there are 3 different threads that wants to do MySQL stuff, do you run addons and can you investigate whether it helps to disable them? Seems you use Amber skin, is it same with Confluence?

Is there any chance you can revert to earlier builds and try to find the interval (dates) where this issue came? For instance using http://xbmcnightlybuilds.com/category/openelec/ or something else?
Reply
#3
Thanks for the response, appreciate it.

I will try to backtrack where this was introduced, but I just realized that I have no idea when it started to happen since there was a period where I did not use WOL.
So it can have been introduced in November (?) where I see the last changes in wakeonaccess.cpp (and also mysqldataset.cpp).

Its going to be a bit difficult to track this so it might take a while, even if I set my server to hibernate after 1 minute there are several things keeping it alive.

Some info;
I do not use many addons and this happens on all skins I have tried (including stock Confluence).
The addons I use is mostly pretty standard such as Youtube, but some of them (including Youtube) does have some dependencies.
What comes to mind is skin.widget which Amber depends on, but it is probably active even if I switch to Confluence.

So the first thing I will try is a fresh userdata folder and Confluence without anything else.

Just a thought, as XBMC does not send a magic package on boot I sometimes use an app on my phone to wake the server.
This app uses port 9 (UDP), do you think there is a point to try this in XBMC as well?
Reply
#4
When the error happens, does XBMC display the wake-on-access progress-dialog? Does the server wake even if XBMC in the meantime chrashed?
Have you (could you easily) tried non-Linux based XBMC?

(2014-02-18, 10:46)miappa Wrote: Just a thought, as XBMC does not send a magic package on boot I sometimes use an app on my phone to wake the server.
This app uses port 9 (UDP), do you think there is a point to try this in XBMC as well?

XBMC should wake server on boot- as soon as MySQL is attemped the server should be woken, is it not?
WOA is using the existing function inside XBMC to issue the WOL and I believe that is also port 9 UDP
Reply
#5
Ah, yes should have mentioned;
It does wake the server and the dialog is appearing.
As soon as it seems "finished" XBMC crashes.
So it looks like it should but instead of dialog disappearing XBMC crashes.

I will try this on OSX which is my only non-linux based setup.

Quote:XBMC should wake server on boot- as soon as MySQL is attemped the server should be woken, is it not?
My MySQL server is not woken by XBMC on boot by any of my setups including OSX.
Reply
#6
I dont understand, how it could fail to wake server only on boot, could you check logs please (when booting and server is off)
Reply
#7
I take it back regarding boot and OSX, it did not work with my profile setup (2 profiles where master is local and the other one uses MySQL), but starting on a fresh userdata library it does work.

But I did not change port to 3306 so I will try with port 0 on my Pi setup as well and see if that makes a difference (regarding both boot and crash).

Edit: Ok, setting port/mode to 0/0 does wake my server up on boot (I need to play around with the times though as the libraries is not loaded).
Will investigate more regarding the crashes and see if I can find something.
Reply
#8
I have not been able to reproduce this, but we are obviously watching out sharply for any regressions since we are nearing beta so if you could reproduce this it would be awesome
.
Please use a clean install (no userdata) and a very recent nightly (lets say no more than a few days old) when testing.

Thanks a lot for the trouble.
Reply
#9
I have not started to backtrack this yet, I wanted to see if this is only on linux distros, but it isn´t.

I am able to reproduce the crash on several OS´s.
I have now tried on OSX, iOS, Raspbmc and OE and they all crash (latest nightly on all except iOS which is ≈ one week old).
But have in mind, I have seen this for quite a while.

This is how I reproduce it:
I have set timeout to 10 seconds to be able to test this quite easy.
XBMC is fresh install, the only thing I have done in XBMC is adding advancedsettings to setup MySQL and turn on WOL.

1. Setup as explained above (fresh xbmc folder)
2. Open XBMC with MySQL server awake
3. Start a movie
4. Put MySQL server in hibernate
5. Wait 10 seconds
6. Stop movie
7. WOL dialaog appears and I can hear my server waking up
8. XBMC crashes

It is easier for me to use OSX when testing so I will do that from now on.
I will start to test nightlies from November and go from there.

Just in case, logs and xml´s:
Debug log
wol.xml
as.xml

Dang... no old nightlies for OSX.
Can I find them anywhere else?
Otherwise I can use Raspbmc, I have my own test builds and Raspbmc "official" older nightlies exists.
Reply
#10
(2014-02-19, 13:23)miappa Wrote: ..
3. Start a movie
4. Put MySQL server in hibernate
5. Wait 10 seconds
6. Stop movie
..

Excellent, that should hopefully be reproducible - I will try tonight unless real world interfere
Reply
#11
I found out this so far:

I went as far back as November 13 where it worked to Dec 23 where it did not work, went from there and found the following:

13.0-ALPHA11 Git:20131215-decc3fb - WORKS
13.0-ALPHA11 Git:20131217-4da7cfb - CRASHES

I was never able to try out 16 Dec build as I broke my install but will try it later.
Let me know if someone see a commit that might have introduce this and I can try to compile a build with reversed commit (if it works without conflicts).
Reply
#12
Great work - I think I spotted the error now but must do some verifications
Reply
#13
Sounds good!
I´ll subscribe to this thread, let me know if you want me to test anything (I can compile a build as well if necessary).
Reply
#14
Great, please grab this https://github.com/xbmc/xbmc/pull/4240
Reply
#15
Great!
Tested with same procedure as above on Raspbmc and no crash, so seems to work!
I will post a test build here for people to test.

Thanks!
Reply



Logout Mark Read Team Forum Stats Members Help
WOL causes XBMC Gotham to crash (Raspberry Pi)0
This forum uses Lukasz Tkacz MyBB addons.