Author Topic: 0810 respond to events event is causing the router to reload  (Read 7313 times)

mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
0810 respond to events event is causing the router to reload
« on: February 28, 2010, 06:33:21 pm »
I have entered a ticket in the bug tracker number 624.  I first noticed that a zwave controlled light did not start as usual at sunset.  I went to the core machine and noticed that the router was reloading without being started by me.  I realized that the x10 motion (in the same room as the core) I was using to trigger a device on/off event seemed to be the cause of the reload.  I deleted the event and the reloading stopped.  I also have some events tied to an x10 handheld remote that I use to turn on zwave lights.  Each time I pressed a buttonon the remote the router would reload.  I then checked back through the zwave interface log and found that the sunset on event tied to a zwave lamp caused the router to reload.  This was the reason that the lamp did not come on at sunset.  I checked the cm15a log at the same time and found that the cm15a interface reset with the same error at the same time as the zwave interface.  In the ticket I started I have included an excerpt from the cm15a log that shows the error.  I tried to included a couple of other excerpts from the cm15a and zwave log to show the error at the sunset event but I was not allowed to upload these because they were considered to be spam.  I copied and pasted the logs into an additional comment I made.  I should be able to provide the full logs or any other log that might be needed on request.  Thinking I had an installation that my have become corrupt during an unattended upgrade I made an image of the original install and then did a fresh install to see if the problem followed.  The problem is still occurring.

I have attached the additional logs here.  My full logs are larger than the upload will allow. 


mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #1 on: March 01, 2010, 12:43:44 am »
Well maybe it is just the cm15a that is causing the problem.  My zwave light came on with the sunset on event.

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #2 on: March 01, 2010, 08:06:15 am »
If its the router that's reloading, I think the DCERouter.log would be more helpful.


mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #3 on: March 01, 2010, 02:03:58 pm »
I guess that is why you get paid the big bucks :D  It did not occur to me.  Here you go.  I had to compress it with 7zip to allow an upload.  I just gathered a portion of the log with tail and tee.  One event (G15 configured as a light) is a device on/off event with an x10 handheld remote.  Another event (G16 configured as a motion) is the same handheld with a button configured as a security event.  Just pushing buttons on the remote does not cause a reload.  I am going to set an x10 event for sunset and see if that works.  Other than the problems, which recently developed, the cm15a works great. 

Thx for the reply and thx all for including the cm15a in lmce.

mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #4 on: March 02, 2010, 01:44:58 am »
The event executed without a problem.  It seems that RF commands tied to events cause the system reload.  I saw this a few builds ago but it seemed to go away at the time.

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #5 on: March 02, 2010, 08:19:36 am »
I see there is a possibility of a crash in the code, if you use an event parameter that does not exist for that particular event.
Not sure if this is your problem, but it should be fixed anyway.

Edit: I was unable to provoke a crash using the above, so if you can come up with an event, event parameter and command combination that crashes(reloads) the router, please add a trac ticket for it.

br,
sambuca
« Last Edit: March 02, 2010, 09:01:53 am by sambuca »

mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #6 on: March 02, 2010, 09:01:31 pm »
sambuca, how did you test?  Do you have a cm15a to test with? 

thx

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #7 on: March 02, 2010, 10:26:25 pm »
No, I was working on the assumption that it was the router itself that had a problem with some event. I tried some combinations of events and parameters, but wasn't able to trigger a reload.

br,
sambuca

mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #8 on: March 03, 2010, 01:45:49 am »
The only thing that I have found that reloads the router so far, other than clicking the quick reload button of course  ;D , is using the rf of the remote or x10 motion detector.  The way I have set up events has not changed so I don't believe that I am selecting an improper parameter.  I have tried setting up devices as both an x10 on/off light and a security device.  When I set up a respond to event I use the wizard to do it as either a triggered sensor or device on/off and should be pretty much a no brainer.  Either one of the methods I mentioned worked in the recent past.  Something else I thought of today is maybe the cm15a is sending data that it should not.  I have two of these x10 interfaces and I pulled the batteries from them some time ago.  So unplugging them from an electrical outlet and plugging them back in could change the way they are configured.  Since there is no way to configure these from LMCE I will try connecting them to a Windoze machine running the ActiveHome software, make some changes and see what that does.  I remember that you can make basic changes to monitored and transceived house codes.  I am not sure what affect this would have on LMCE if these were to get to an unknown state.  One of my cm15a interfaces quit translating rf to plc.  I can send commands out to the devices from LMCE on the power line and I can see the rf commands in the cm15a log but the rf commands won't translate to plc codes with this particular interface.  nosilla wrote the code for the cm15a but I have not been able to contact him in months.  I am not sure where he is these days.  Any way I will post my results after connecting the interface to activehome.  Now where did I put the serial number for the software.....

mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #9 on: March 03, 2010, 02:38:46 pm »
Well I updated the config in my problem cm15a and it is now transceiving rf to plc.  I also noticed that the code that allows the cm15a to work with LMCE does do some configuration when the router reloads.  The monitored house code changed from G to A and the date updated.  During all this, quite by accident, I stumbled on what is making the router reload.  In the device on/off event the event parameter can have a value of either 0(off) or 1(on).  While making changes I forgot to place a value in that field and it ended up blank.  When I reloaded the router and pressed a button on my remote I noticed that the router did not reload and the zwave light associated with that event came on.  I have not tested this on a sensor is tripped event yet but I suspect it will work too.  Hopefully this will give a direction in which to look for a problem.  I still need to update the bug ticket yet.  I will do that this morning.

chrisbirkinshaw

  • Guru
  • ****
  • Posts: 431
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #10 on: March 12, 2010, 07:39:00 pm »
The following event is causing the router to crash for me:

CRITERIA

PK_Device = Hallway Motion
Time of day = NIGHT
PK_EventParameter Event parameter: Tripped = Value: 1

I have tested the commands it fires and these do not cause the router to crash. It looks more like the DCEROuter crashes when evaluating the event. I notice that the template for a motion detector now looks different to how it used to - or is this just my eyes?


The following command then kills the router:

/usr/pluto/bin/MessageSend 127.0.0.1 123 123 2 9 25 1

(Device 123 is the Hall Motion security sensor)

Here is the router log section:

Code: [Select]
05 03/12/10 18:26:59.439 Socket::ReceiveData 0x8ee4b40 failed, bytes left 0 start: 7460000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 178 Incoming_Conn Socket 178 127.0.0.1 <0x677eab90>
05 03/12/10 18:26:59.440 Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Incoming_Conn Socket 178 127.0.0.1 <0x677eab90>
05 03/12/10 18:26:59.440 TCPIP: Closing connection to -1003 (Router Dev #0) 0x8ee4b40 m_Socket: -1 <0x677eab90>
05 03/12/10 18:26:59.440 Router::RemoveAndDeleteSocket 0x8ee4b40 -1003 <0x677eab90>
05 03/12/10 18:27:02.414 XXX: Device: 123, State: SLEEPING,, <0x677eab90>
05 03/12/10 18:27:02.415 XXX: PK_AlertType: 0, PK_HouseMode: 1 <0x677eab90>
05 03/12/10 18:27:02.426 void ClientSocket::Disconnect() on this socket: 0x8ee51d0 (m_Socket: 179) <0x677eab90>
05 03/12/10 18:27:02.427 Socket::ReceiveData 0x8f4c810 failed, bytes left 0 start: 7460000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 180 Incoming_Conn Socket 180 127.0.0.1 <0x66fe9b90>
05 03/12/10 18:27:02.427 Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Incoming_Conn Socket 180 127.0.0.1 <0x66fe9b90>
05 03/12/10 18:27:02.428 TCPIP: Closing connection to -1003 (Router Dev #0) 0x8f4c810 m_Socket: -1 <0x66fe9b90>
05 03/12/10 18:27:02.428 Router::RemoveAndDeleteSocket 0x8f4c810 -1003 <0x66fe9b90>
01 03/12/10 18:27:02.429 Criteria::EvaluateExpression parameterType 3 <0x677eab90>
Return code: 139
3 03/12/10 18:27:03 DCERouter (server) Device died... count=8/200 dev=DCERouter
Fri Mar 12 18:27:03 GMT 2010 died

mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #11 on: March 12, 2010, 08:26:39 pm »
Thx for the verification on this.  Also you did a better job than I in presenting the information.  What I have found is if you remove the Value and leave that field blank it will work as expected.

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #12 on: March 12, 2010, 11:28:29 pm »
Thanks for the update.

I was able to reproduce the error and fix it. http://svn.linuxmce.org/trac.cgi/ticket/651#preview

best regards,
sambuca

mythtified

  • Guru
  • ****
  • Posts: 176
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #13 on: March 13, 2010, 01:05:00 am »
Sambuco, I had opened a ticket #624 on this.  Could you close it please? thx

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: 0810 respond to events event is causing the router to reload
« Reply #14 on: March 13, 2010, 10:50:28 am »
ok, its closed. I know, I should have done a search before adding a new ticket :P
Anyway, thanks for the help  :)

br,
sambuca