ZWAY server fails at 03:00 regularly

Discussions about RaZberry - Z-Wave board for Raspberry computer
ScotsDon
Posts: 39
Joined: 28 Jul 2015 20:55

Re: ZWAY server fails at 03:00 regularly

Post by ScotsDon »

Just thought, I ran this using sudo. Was I supposed to log in as root and run it instead?
seattleneil
Posts: 42
Joined: 02 Mar 2020 22:41

Re: ZWAY server fails at 03:00 regularly

Post by seattleneil »

It looks like new SD card is working fine and you've followed the commands per the suggestion by @PoltoS.

I think the instructions by @PoltoS could have been written more clearly. I'll try to add some clarity:

1. As user pi, at the linux command line run: sudo su -
You should now have a linux root prompt (the exit command will return you to the pi prompt).

2. Check if the z-way-server process is running, and stop it, run: pidof z-way-server
If running, stop it based on how you started z-way-server. either run: /etc/init.d/z-way-server stop -or- systemctl stop z-way-server

3. Run: cd /opt/z-way-server; LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./libs:./modules; ./z-way-server

4. At the (gdb) prompt, run the remaining commands @PoltoS listed (the handle commands and the run command):
handle SIGPIPE nostop
handle SIGILL nostop
handle SIGHUP nostop
run

5. gdb will run the z-way-server process, spew some output and should sit there silently until the z-way-server process crashes
When it crashes, run (at the (gdb) prompt): bt
Post the output so that @PoltoS can reply.
ScotsDon
Posts: 39
Joined: 28 Jul 2015 20:55

Re: ZWAY server fails at 03:00 regularly

Post by ScotsDon »

Thanks SeattleNeil (Neil I assume?). I did actually run the sudo su bit just now, just in case, and 3 and 4 above, but I didn't do 2. so I will reboot and do it again. But I don't start the zWay server - something else starts it. So I'm not sure how to stop it. One of the above in 2 will work I trust.
ScotsDon
Posts: 39
Joined: 28 Jul 2015 20:55

Re: ZWAY server fails at 03:00 regularly

Post by ScotsDon »

OK I've done 1,2,3,4. Here is the full output from the terminal:


pi@raspberrypi-3:~ $ sudo su
root@raspberrypi-3:/home/pi# cd /opt/z-way-server
root@raspberrypi-3:/opt/z-way-server# pidof z-way-server
393
root@raspberrypi-3:/opt/z-way-server# /etc/init.d/z-way-server stop
Stopping z-way-server: done.
root@raspberrypi-3:/opt/z-way-server# LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./libs:./modules gdb ./z-way-server
GNU gdb (Raspbian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./z-way-server...
(No debugging symbols found in ./z-way-server)
(gdb) andle SIGPIPE nostop
Undefined command: "andle". Try "help".
(gdb) handle SIGPIPE nostop
Signal Stop Print Pass to program Description
SIGPIPE No Yes Yes Broken pipe
(gdb) handle SIGILL nostop
Signal Stop Print Pass to program Description
SIGILL No Yes Yes Illegal instruction
(gdb) handle SIGHUP nostop
Signal Stop Print Pass to program Description
SIGHUP No Yes Yes Hangup
(gdb) run
Starting program: /opt/z-way-server/z-way-server
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Z-Way version v3.2.2 from 2021-11-29 15:40:21 +0300 (build 101045968be0f00797fdc4d1a70e2955271fe4e7)
Looking for modules in ./modules
Module modzbw.so loaded
Module modcrypto.so loaded
Module modhomekit.so loaded
Module modiconinstaller.so loaded
Module modsockets.so loaded
Module modws.so loaded
Module modskininstaller.so loaded
Module modzwave.so loaded
Module moddhs.so loaded
Module modenocean.so loaded
Module modmqtt.so loaded
Module modinstaller.so loaded
Module modhttp.so loaded
Module modnotification2ext.so loaded
Using default configuration file config.xml
Error: 'debug-port' number is out of range. Skipping it.
[New Thread 0x730ab440 (LWP 1412)]
[New Thread 0x769d2440 (LWP 1413)]
[New Thread 0x728aa440 (LWP 1414)]
[New Thread 0x72899440 (LWP 1415)]
[New Thread 0x72888440 (LWP 1416)]
[New Thread 0x72877440 (LWP 1417)]
[New Thread 0x713ff440 (LWP 1418)]
[New Thread 0x70bfe440 (LWP 1419)]
[New Thread 0x703fd440 (LWP 1420)]



I'll leave it overnight now.
ScotsDon
Posts: 39
Joined: 28 Jul 2015 20:55

Re: ZWAY server fails at 03:00 regularly

Post by ScotsDon »

I decided not to run it overnight (it will mess up my house control again as I would have to stop the reboot and pick up the failure in the morning), so I set the Pi clock to 02:40 manually (turning clock sync off), let it do the 02:45 run, and let it fail at 03:00. The first time it may not have failed (or it may have) so I ran it again. This time I think it did (I didn't get a crash email but that may be because of the way the server was run). Anyway, the zerver is not responding, and the gdb prompt re-appeared, so I typed in "bt", with the result below, starting just before the end of my last post:


[New Thread 0x713ff440 (LWP 1418)]
[New Thread 0x70bfe440 (LWP 1419)]
[New Thread 0x703fd440 (LWP 1420)]
[Detaching after fork from child process 1786]

Thread 7 "zway/core" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x72877440 (LWP 1417)]
0x73335c40 in _zway_cc_added_job_unsafe () from ./modules/modzwave.so
(gdb) bt
#0 0x73335c40 in _zway_cc_added_job_unsafe () from ./modules/modzwave.so
#1 0x73336848 in _zway_cc_run_ex () from ./modules/modzwave.so
#2 0x733352f4 in _zway_cc_run () from ./modules/modzwave.so
#3 0x73336b98 in _zway_cc_run3 () from ./modules/modzwave.so
#4 0x732fd574 in __ClockSet () from ./modules/modzwave.so
#5 0x732fda58 in zway_cc_clock_set () from ./modules/modzwave.so
#6 0x7322281c in zwjs::ZCmdClass::ClockSet(v8::FunctionCallbackInfo<v8::Value> const&) ()
from ./modules/modzwave.so
#7 0x76b7dfb8 in v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) () from ./libs/libv8.so
#8 0x76b96cc4 in v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) ()
from ./libs/libv8.so
#9 0x38f0a3a8 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)


I hope this is useful.
ScotsDon
Posts: 39
Joined: 28 Jul 2015 20:55

Re: ZWAY server fails at 03:00 regularly

Post by ScotsDon »

When I Quit the run, 2 emails turned up with Traceback errors, not the same as before, and ending:

ConnectionResetError: [Errno 104] Connection reset by peer
seattleneil
Posts: 42
Joined: 02 Mar 2020 22:41

Re: ZWAY server fails at 03:00 regularly

Post by seattleneil »

You done good. Hopefully @PoltoS has time to respond and provide an answer.

This is why the z-way-server died:
Thread 7 "zway/core" received signal SIGSEGV, Segmentation fault.

If I was in your shoes, I would simply install a clean version of Z-Way. Perhaps a file on your old SD card got corrupted. You can download the package from here: https: //storage.z-wave.me/z-way-server/z-way-3.2.2_armhf.deb and run sudo dpkg -i [the downloaded file]
ScotsDon
Posts: 39
Joined: 28 Jul 2015 20:55

Re: ZWAY server fails at 03:00 regularly

Post by ScotsDon »

Yes, I am planning on doing a new installation. It all takes time! Thanks for your support, it makes a big difference.
User avatar
PoltoS
Posts: 6687
Joined: 26 Jan 2011 19:36

Re: ZWAY server fails at 03:00 regularly

Post by PoltoS »

Just wait 3:00
ScotsDon
Posts: 39
Joined: 28 Jul 2015 20:55

Re: ZWAY server fails at 03:00 regularly

Post by ScotsDon »

PoltoS, see above for the results, which I made happen by altering the pi clock to 02:40. There was a segmentation fault:

Thread 7 "zway/core" received signal SIGSEGV, Segmentation fault.
[
Post Reply