ChriD / Raumserver

Raumserver - A HTTP Request Server to control the RF-Multiroom System
32 stars 11 forks source link

"Crashes" on Raspi 3B #31

Open janningnetworks opened 7 years ago

janningnetworks commented 7 years ago

i´ve started the daemon manually. after some hours it shuts down - with no warnings in syslogs.

the last lines of "log" (repeating hundred times)

2016.10.08 23:00:05.009 DEBUG: Try to create new request: http://192.168.2.140:47365/getZones [request] 2016.10.08 23:00:05.009 ERROR: Resource temporarily unavailable [requestHandlerThread] 2016.10.08 23:00:05.048 DEBUG: Emitting signal for finished requests [requestHandlerThread] 2016.10.08 23:00:05.049 DEBUG: Zone configuration request finished [zoneRequestFinished] 2016.10.08 23:00:05.049 DEBUG: Zones XML retrieved but no changes found! [parseZoneConfiguration] 2016.10.08 23:00:05.049 DEBUG: Get zone configuration with updateId: 1942247734 [doGetZoneRequest] 2016.10.08 23:00:05.049 DEBUG: Try to create new request: http://192.168.2.140:47365/getZones [request]

ARMv7 package... on Raspbian

is there anything i can do, to do a more verbose logging?

ChriD commented 7 years ago

the raumserver is built with the debug flag, so if you maybe you can start it with valgrind. But i dont know how valgrind can be attached to a deamon. Its possible as mentioned here http://stackoverflow.com/questions/12595111/will-the-valgrind-work-for-daemon-programs By the way, is there a error file in the fault directory and which version do you use?

janningnetworks commented 7 years ago

i think i´m using version 1.0 (linux armv7 directory).

the fault directory contains an empty _dummy.log

hmm. i´ll try to install valgrind.

janningnetworks commented 7 years ago

don´t know how to use valgrind... ;)

i started it with option memcheck..

root@raspberrypi:/etc/raumfeld/raumserverDaemon# valgrind -v --tool=memcheck ./raumsrvDaemon ==3175== Memcheck, a memory error detector ==3175== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==3175== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==3175== Command: ./raumsrvDaemon ==3175== --3175-- Valgrind options: --3175-- --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp --3175-- -v --3175-- --tool=memcheck --3175-- Contents of /proc/version: --3175-- Linux version 4.4.21-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g846 --3175-- Arch and hwcaps: ARM, ARMv7-vfp-neon --3175-- Page sizes: currently 4096, max supported 4096 --3175-- Valgrind library directory: /usr/lib/valgrind --3175-- Reading syms from /etc/raumfeld/raumserverDaemon/raumsrvDaemon (0x10000) --3175-- Reading syms from /lib/arm-linux-gnueabihf/ld-2.19.so (0x4000000) --3175-- Considering /lib/arm-linux-gnueabihf/ld-2.19.so .. --3175-- .. CRC mismatch (computed 5bf4e8c8 wanted 7d09b4dd) --3175-- Considering /usr/lib/debug/lib/arm-linux-gnueabihf/ld-2.19.so .. --3175-- .. CRC is valid --3175-- Reading syms from /usr/lib/valgrind/memcheck-arm-linux (0x38000000) --3175-- Considering /usr/lib/valgrind/memcheck-arm-linux .. --3175-- .. CRC mismatch (computed 490a0e7e wanted 8f7ca175) --3175-- Considering /usr/lib/debug/usr/lib/valgrind/memcheck-arm-linux .. --3175-- .. CRC is valid --3175-- object doesn't have a dynamic symbol table --3175-- Reading suppressions file: /usr/lib/valgrind/debian-libc6-dbg.supp --3175-- Reading suppressions file: /usr/lib/valgrind/default.supp ==3175== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-3175-by-root-on-??? ==3175== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-3175-by-root-on-??? ==3175== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-3175-by-root-on-??? ==3175== ==3175== TO CONTROL THIS PROCESS USING vgdb (which you probably ==3175== don't want to do, unless you know exactly what you're doing, ==3175== or are doing some strange experiment): ==3175== /usr/lib/valgrind/../../bin/vgdb --pid=3175 ...command... ==3175== ==3175== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==3175== /path/to/gdb ./raumsrvDaemon ==3175== and then give GDB the following command ==3175== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=3175 ==3175== --pid is optional if only one valgrind process is running ==3175== --3175-- Reading syms from /usr/lib/valgrind/vgpreload_core-arm-linux.so (0x4023000) --3175-- Considering /usr/lib/valgrind/vgpreload_core-arm-linux.so .. --3175-- .. CRC mismatch (computed 7ee02d17 wanted a974aa59) --3175-- Considering /usr/lib/debug/usr/lib/valgrind/vgpreload_core-arm-linux.so .. --3175-- .. CRC is valid --3175-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so (0x4831000) --3175-- Considering /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so .. --3175-- .. CRC mismatch (computed 6edbceb6 wanted 98c7f138) --3175-- Considering /usr/lib/debug/usr/lib/valgrind/vgpreload_memcheck-arm-linux.so .. --3175-- .. CRC is valid --3175-- Reading syms from /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x4842000) --3175-- object doesn't have a symbol table --3175-- Reading syms from /lib/arm-linux-gnueabihf/libdl-2.19.so (0x486a000) --3175-- Considering /lib/arm-linux-gnueabihf/libdl-2.19.so .. --3175-- .. CRC mismatch (computed 2911a1ab wanted 7f4b73c1) --3175-- Considering /usr/lib/debug/lib/arm-linux-gnueabihf/libdl-2.19.so .. --3175-- .. CRC is valid --3175-- Reading syms from /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so (0x487d000) --3175-- Reading syms from /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumserver.so (0x4ad8000) --3175-- Reading syms from /lib/arm-linux-gnueabihf/libm-2.19.so (0x4b83000) --3175-- Considering /lib/arm-linux-gnueabihf/libm-2.19.so .. --3175-- .. CRC mismatch (computed af96fd32 wanted 2697569e) --3175-- Considering /usr/lib/debug/lib/arm-linux-gnueabihf/libm-2.19.so .. --3175-- .. CRC is valid --3175-- Reading syms from /lib/arm-linux-gnueabihf/libpthread-2.19.so (0x4bfe000) --3175-- Considering /lib/arm-linux-gnueabihf/libpthread-2.19.so .. --3175-- .. CRC mismatch (computed 071df64d wanted 5e33f1da) --3175-- Considering /usr/lib/debug/lib/arm-linux-gnueabihf/libpthread-2.19.so .. --3175-- .. CRC is valid --3175-- Reading syms from /lib/arm-linux-gnueabihf/libc-2.19.so (0x4c26000) --3175-- Considering /lib/arm-linux-gnueabihf/libc-2.19.so .. --3175-- .. CRC mismatch (computed be3590d5 wanted d933ccf9) --3175-- Considering /usr/lib/debug/lib/arm-linux-gnueabihf/libc-2.19.so .. --3175-- .. CRC is valid --3175-- REDIR: 0x4c9eb20 (rindex) redirected to 0x4835ef8 (rindex) --3175-- REDIR: 0x4c9e630 (strlen) redirected to 0x48366ec (strlen) --3175-- REDIR: 0x4c9fbf0 (bcmp) redirected to 0x483875c (bcmp) --3175-- REDIR: 0x4c9df40 (strcmp) redirected to 0x483739c (strcmp) --3175-- REDIR: 0x4c99d98 (malloc) redirected to 0x48338ec (malloc) --3175-- REDIR: 0x4c9a8d0 (calloc) redirected to 0x48356b8 (calloc) --3175-- REDIR: 0x4c9e9fc (strncpy) redirected to 0x48369a4 (strncpy) --3175-- REDIR: 0x4ca2580 (strchrnul) redirected to 0x483901c (strchrnul) --3175-- REDIR: 0x4c9a54c (free) redirected to 0x4834a88 (free) --3175-- REDIR: 0x4ca09e0 (memcpy) redirected to 0x4837af0 (memcpy) --3175-- REDIR: 0x4c9f4e0 (strstr) redirected to 0x48394c0 (strstr) --3175-- REDIR: 0x4c9dfa0 (strcpy) redirected to 0x483676c (strcpy) --3175-- REDIR: 0x4ca0380 (memset) redirected to 0x4838c94 (memset) --3175-- REDIR: 0x4ca0400 (mempcpy) redirected to 0x483917c (mempcpy) --3175-- REDIR: 0x4c9a604 (realloc) redirected to 0x4835808 (realloc) raumsrvDaemon[3175]: Trying to start daemon raumsrvDaemon[3175]: Got pid, closing parent process ==3178== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-3178-by-root-on-??? ==3178== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-3178-by-root-on-??? ==3178== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-3178-by-root-on-??? ==3178== ==3178== TO CONTROL THIS PROCESS USING vgdb (which you probably ==3178== don't want to do, unless you know exactly what you're doing, ==3178== or are doing some strange experiment): ==3178== /usr/lib/valgrind/../../bin/vgdb --pid=3178 ...command... ==3178== ==3178== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==3178== /path/to/gdb ./raumsrvDaemon ==3178== and then give GDB the following command ==3178== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=3178 ==3178== --pid is optional if only one valgrind process is running ==3178== raumsrvDaemon[3178]: Daemon ready, initialize raumserver object raumsrvDaemon[3178]: Getting PID raumsrvDaemon[3178]: 1 raumsrvDaemon[3178]: 2 raumsrvDaemon[3178]: 3 raumsrvDaemon[3178]: readlink raumsrvDaemon[3178]: 4 raumsrvDaemon[3178]: 5 --3178-- REDIR: 0x4c9fa90 (memchr) redirected to 0x483753c (memchr) raumsrvDaemon[3178]: 6 raumsrvDaemon[3178]: Working directory: /etc/raumfeld/raumserverDaemon/ ==3178== Invalid write of size 4 ==3178== at 0x4A77F9E: ??? (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3178== Address 0x7da24370 is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes ==3178== ==3178== Conditional jump or move depends on uninitialised value(s) ==3178== at 0x4A78140: udivmoddi4 (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3178== ==3178== Use of uninitialised value of size 4 ==3178== at 0x4A78142: __udivmoddi4 (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3178== ==3178== Use of uninitialised value of size 4 ==3178== at 0x4A77FB8: ??? (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3178== ==3178== Invalid read of size 4 ==3178== at 0x4844FDC: ??? (in /usr/lib/arm-linux-gnueabihf/libarmmem.so) ==3178== Address 0x4da10cc is 12 bytes inside a block of size 15 alloc'd ==3178== at 0x4833970: malloc (vg_replace_malloc.c:263) ==3178== by 0x4A35637: operator new(unsigned int) (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.s ==3178== ==3175== ==3175== HEAP SUMMARY: ==3175== in use at exit: 166 bytes in 5 blocks ==3175== total heap usage: 1,231 allocs, 1,226 frees, 89,035 bytes allocated ==3175== ==3175== Searching for pointers to 5 not-freed blocks ==3175== Checked 146,536 bytes ==3175== ==3175== LEAK SUMMARY: ==3175== definitely lost: 0 bytes in 0 blocks ==3175== indirectly lost: 0 bytes in 0 blocks ==3175== possibly lost: 74 bytes in 3 blocks ==3175== still reachable: 92 bytes in 2 blocks ==3175== suppressed: 0 bytes in 0 blocks ==3175== Rerun with --leak-check=full to see details of leaked memory ==3175== ==3175== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==3175== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) root@raspberrypi:/etc/raumfeld/raumserverDaemon# disInstr(arm): unhandled instruction: 0xF1010200 cond=15(0xF) 27:20=16(0x10) 4:4=0 3:0=0(0x0) ==3178== valgrind: Unrecognised instruction at address 0x48426f4. ==3178== at 0x48426F4: ??? (in /usr/lib/arm-linux-gnueabihf/libarmmem.so) ==3178== Your program just tried to execute an instruction that Valgrind ==3178== did not recognise. There are two possible reasons for this. ==3178== 1. Your program has a bug and erroneously jumped to a non-code ==3178== location. If you are running Memcheck and you just saw a ==3178== warning about a bad jump, it's probably your program's fault. ==3178== 2. The instruction is legitimate but Valgrind doesn't handle it, ==3178== i.e. it's Valgrind's fault. If you think this is the case or ==3178== you are not sure, please let us know and we'll try to fix it. ==3178== Either way, Valgrind will now raise a SIGILL signal which will ==3178== probably kill your program. ==3178== ==3178== Process terminating with default action of signal 4 (SIGILL) ==3178== Illegal opcode at address 0x48426F4 ==3178== at 0x48426F4: ??? (in /usr/lib/arm-linux-gnueabihf/libarmmem.so) ==3178== ==3178== HEAP SUMMARY: ==3178== in use at exit: 108,372 bytes in 1,265 blocks ==3178== total heap usage: 1,354 allocs, 89 frees, 218,219 bytes allocated ==3178== ==3178== Searching for pointers to 1,265 not-freed blocks ==3178== Checked 221,184 bytes ==3178== ==3178== LEAK SUMMARY: ==3178== definitely lost: 0 bytes in 0 blocks ==3178== indirectly lost: 0 bytes in 0 blocks ==3178== possibly lost: 48,090 bytes in 1,177 blocks ==3178== still reachable: 60,282 bytes in 88 blocks ==3178== suppressed: 0 bytes in 0 blocks ==3178== Rerun with --leak-check=full to see details of leaked memory ==3178== ==3178== Use --track-origins=yes to see where uninitialised values come from ==3178== ERROR SUMMARY: 17 errors from 5 contexts (suppressed: 0 from 0) ==3178== ==3178== 2 errors in context 1 of 5: ==3178== Invalid read of size 4 ==3178== at 0x4844FDC: ??? (in /usr/lib/arm-linux-gnueabihf/libarmmem.so) ==3178== Address 0x4da10cc is 12 bytes inside a block of size 15 alloc'd ==3178== at 0x4833970: malloc (vg_replace_malloc.c:263) ==3178== by 0x4A35637: operator new(unsigned int) (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.s ==3178== ==3178== ==3178== 3 errors in context 2 of 5: ==3178== Use of uninitialised value of size 4 ==3178== at 0x4A77FB8: ??? (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3178== ==3178== ==3178== 3 errors in context 3 of 5: ==3178== Use of uninitialised value of size 4 ==3178== at 0x4A78142: udivmoddi4 (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3178== ==3178== ==3178== 3 errors in context 4 of 5: ==3178== Conditional jump or move depends on uninitialised value(s) ==3178== at 0x4A78140: __udivmoddi4 (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3178== ==3178== ==3178== 6 errors in context 5 of 5: ==3178== Invalid write of size 4 ==3178== at 0x4A77F9E: ??? (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3178== Address 0x7da24370 is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes ==3178== ==3178== ERROR SUMMARY: 17 errors from 5 contexts (suppressed: 0 from 0)

root@raspberrypi:/etc/raumfeld/raumserverDaemon# valgrind -v --leak-check=full --tool=memcheck ./raumsrvDaemon ==3268== Memcheck, a memory error detector ==3268== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==3268== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==3268== Command: ./raumsrvDaemon ==3268== --3268-- Valgrind options: --3268-- --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp --3268-- -v --3268-- --leak-check=full --3268-- --tool=memcheck --3268-- Contents of /proc/version: --3268-- Linux version 4.4.21-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g846 --3268-- Arch and hwcaps: ARM, ARMv7-vfp-neon --3268-- Page sizes: currently 4096, max supported 4096 --3268-- Valgrind library directory: /usr/lib/valgrind --3268-- Reading syms from /etc/raumfeld/raumserverDaemon/raumsrvDaemon (0x10000) --3268-- Reading syms from /lib/arm-linux-gnueabihf/ld-2.19.so (0x4000000) --3268-- Considering /lib/arm-linux-gnueabihf/ld-2.19.so .. --3268-- .. CRC mismatch (computed 5bf4e8c8 wanted 7d09b4dd) --3268-- Considering /usr/lib/debug/lib/arm-linux-gnueabihf/ld-2.19.so .. --3268-- .. CRC is valid --3268-- Reading syms from /usr/lib/valgrind/memcheck-arm-linux (0x38000000) --3268-- Considering /usr/lib/valgrind/memcheck-arm-linux .. --3268-- .. CRC mismatch (computed 490a0e7e wanted 8f7ca175) --3268-- Considering /usr/lib/debug/usr/lib/valgrind/memcheck-arm-linux .. --3268-- .. CRC is valid --3268-- object doesn't have a dynamic symbol table --3268-- Reading suppressions file: /usr/lib/valgrind/debian-libc6-dbg.supp --3268-- Reading suppressions file: /usr/lib/valgrind/default.supp ==3268== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-3268-by-root-on-??? ==3268== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-3268-by-root-on-??? ==3268== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-3268-by-root-on-??? ==3268== ==3268== TO CONTROL THIS PROCESS USING vgdb (which you probably ==3268== don't want to do, unless you know exactly what you're doing, ==3268== or are doing some strange experiment): ==3268== /usr/lib/valgrind/../../bin/vgdb --pid=3268 ...command... ==3268== ==3268== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==3268== /path/to/gdb ./raumsrvDaemon ==3268== and then give GDB the following command ==3268== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=3268 ==3268== --pid is optional if only one valgrind process is running ==3268== --3268-- Reading syms from /usr/lib/valgrind/vgpreload_core-arm-linux.so (0x4023000) --3268-- Considering /usr/lib/valgrind/vgpreload_core-arm-linux.so .. --3268-- .. CRC mismatch (computed 7ee02d17 wanted a974aa59) --3268-- Considering /usr/lib/debug/usr/lib/valgrind/vgpreload_core-arm-linux.so .. --3268-- .. CRC is valid --3268-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so (0x4831000) --3268-- Considering /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so .. --3268-- .. CRC mismatch (computed 6edbceb6 wanted 98c7f138) --3268-- Considering /usr/lib/debug/usr/lib/valgrind/vgpreload_memcheck-arm-linux.so .. --3268-- .. CRC is valid --3268-- Reading syms from /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x4842000) --3268-- object doesn't have a symbol table --3268-- Reading syms from /lib/arm-linux-gnueabihf/libdl-2.19.so (0x486a000) --3268-- Considering /lib/arm-linux-gnueabihf/libdl-2.19.so .. --3268-- .. CRC mismatch (computed 2911a1ab wanted 7f4b73c1) --3268-- Considering /usr/lib/debug/lib/arm-linux-gnueabihf/libdl-2.19.so .. --3268-- .. CRC is valid --3268-- Reading syms from /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so (0x487d000) --3268-- Reading syms from /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumserver.so (0x4ad8000) --3268-- Reading syms from /lib/arm-linux-gnueabihf/libm-2.19.so (0x4b83000) --3268-- Considering /lib/arm-linux-gnueabihf/libm-2.19.so .. --3268-- .. CRC mismatch (computed af96fd32 wanted 2697569e) --3268-- Considering /usr/lib/debug/lib/arm-linux-gnueabihf/libm-2.19.so .. --3268-- .. CRC is valid --3268-- Reading syms from /lib/arm-linux-gnueabihf/libpthread-2.19.so (0x4bfe000) --3268-- Considering /lib/arm-linux-gnueabihf/libpthread-2.19.so .. --3268-- .. CRC mismatch (computed 071df64d wanted 5e33f1da) --3268-- Considering /usr/lib/debug/lib/arm-linux-gnueabihf/libpthread-2.19.so .. --3268-- .. CRC is valid --3268-- Reading syms from /lib/arm-linux-gnueabihf/libc-2.19.so (0x4c26000) --3268-- Considering /lib/arm-linux-gnueabihf/libc-2.19.so .. --3268-- .. CRC mismatch (computed be3590d5 wanted d933ccf9) --3268-- Considering /usr/lib/debug/lib/arm-linux-gnueabihf/libc-2.19.so .. --3268-- .. CRC is valid --3268-- REDIR: 0x4c9eb20 (rindex) redirected to 0x4835ef8 (rindex) --3268-- REDIR: 0x4c9e630 (strlen) redirected to 0x48366ec (strlen) --3268-- REDIR: 0x4c9fbf0 (bcmp) redirected to 0x483875c (bcmp) --3268-- REDIR: 0x4c9df40 (strcmp) redirected to 0x483739c (strcmp) --3268-- REDIR: 0x4c99d98 (malloc) redirected to 0x48338ec (malloc) --3268-- REDIR: 0x4c9a8d0 (calloc) redirected to 0x48356b8 (calloc) --3268-- REDIR: 0x4c9e9fc (strncpy) redirected to 0x48369a4 (strncpy) --3268-- REDIR: 0x4ca2580 (strchrnul) redirected to 0x483901c (strchrnul) --3268-- REDIR: 0x4c9a54c (free) redirected to 0x4834a88 (free) --3268-- REDIR: 0x4ca09e0 (memcpy) redirected to 0x4837af0 (memcpy) --3268-- REDIR: 0x4c9f4e0 (strstr) redirected to 0x48394c0 (strstr) --3268-- REDIR: 0x4c9dfa0 (strcpy) redirected to 0x483676c (strcpy) --3268-- REDIR: 0x4ca0400 (mempcpy) redirected to 0x483917c (mempcpy) --3268-- REDIR: 0x4c9a604 (realloc) redirected to 0x4835808 (realloc) raumsrvDaemon[3268]: Trying to start daemon raumsrvDaemon[3268]: Got pid, closing parent process ==3271== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-3271-by-root-on-??? ==3271== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-3271-by-root-on-??? ==3271== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-3271-by-root-on-??? ==3271== ==3271== TO CONTROL THIS PROCESS USING vgdb (which you probably ==3271== don't want to do, unless you know exactly what you're doing, ==3271== or are doing some strange experiment): ==3271== /usr/lib/valgrind/../../bin/vgdb --pid=3271 ...command... ==3271== ==3271== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==3271== /path/to/gdb ./raumsrvDaemon ==3271== and then give GDB the following command ==3271== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=3271 ==3271== --pid is optional if only one valgrind process is running ==3271== raumsrvDaemon[3271]: Daemon ready, initialize raumserver object raumsrvDaemon[3271]: Getting PID raumsrvDaemon[3271]: 1 raumsrvDaemon[3271]: 2 raumsrvDaemon[3271]: 3 raumsrvDaemon[3271]: readlink raumsrvDaemon[3271]: 4 raumsrvDaemon[3271]: 5 --3271-- REDIR: 0x4c9fa90 (memchr) redirected to 0x483753c (memchr) raumsrvDaemon[3271]: 6 raumsrvDaemon[3271]: Working directory: /etc/raumfeld/raumserverDaemon/ ==3271== Invalid write of size 4 ==3271== at 0x4A77F9E: ??? (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3271== Address 0x7db68370 is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes ==3271== ==3271== Conditional jump or move depends on uninitialised value(s) ==3271== at 0x4A78140: udivmoddi4 (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3271== ==3271== Use of uninitialised value of size 4 ==3271== at 0x4A78142: __udivmoddi4 (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3271== ==3271== Use of uninitialised value of size 4 ==3271== at 0x4A77FB8: ??? (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3271== --3268-- REDIR: 0x4ca0380 (memset) redirected to 0x4838c94 (memset) ==3271== Invalid read of size 4 ==3271== at 0x4844FDC: ??? (in /usr/lib/arm-linux-gnueabihf/libarmmem.so) ==3271== Address 0x4da10cc is 12 bytes inside a block of size 15 alloc'd ==3271== at 0x4833970: malloc (vg_replace_malloc.c:263) ==3271== by 0x4A35637: operator new(unsigned int) (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.s ==3271== ==3268== ==3268== HEAP SUMMARY: ==3268== in use at exit: 166 bytes in 5 blocks ==3268== total heap usage: 1,231 allocs, 1,226 frees, 89,035 bytes allocated ==3268== ==3268== Searching for pointers to 5 not-freed blocks ==3268== Checked 146,536 bytes ==3268== ==3268== 74 bytes in 3 blocks are possibly lost in loss record 1 of 2 ==3268== at 0x4833970: malloc (vg_replace_malloc.c:263) ==3268== by 0x4A35637: operator new(unsigned int) (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.s ==3268== ==3268== LEAK SUMMARY: ==3268== definitely lost: 0 bytes in 0 blocks ==3268== indirectly lost: 0 bytes in 0 blocks ==3268== possibly lost: 74 bytes in 3 blocks ==3268== still reachable: 92 bytes in 2 blocks ==3268== suppressed: 0 bytes in 0 blocks ==3268== Reachable blocks (those to which a pointer was found) are not shown. ==3268== To see them, rerun with: --leak-check=full --show-reachable=yes ==3268== ==3268== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) ==3268== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) root@raspberrypi:/etc/raumfeld/raumserverDaemon# disInstr(arm): unhandled instruction: 0xF1010200 cond=15(0xF) 27:20=16(0x10) 4:4=0 3:0=0(0x0) ==3271== valgrind: Unrecognised instruction at address 0x48426f4. ==3271== at 0x48426F4: ??? (in /usr/lib/arm-linux-gnueabihf/libarmmem.so) ==3271== Your program just tried to execute an instruction that Valgrind ==3271== did not recognise. There are two possible reasons for this. ==3271== 1. Your program has a bug and erroneously jumped to a non-code ==3271== location. If you are running Memcheck and you just saw a ==3271== warning about a bad jump, it's probably your program's fault. ==3271== 2. The instruction is legitimate but Valgrind doesn't handle it, ==3271== i.e. it's Valgrind's fault. If you think this is the case or ==3271== you are not sure, please let us know and we'll try to fix it. ==3271== Either way, Valgrind will now raise a SIGILL signal which will ==3271== probably kill your program. ==3271== ==3271== Process terminating with default action of signal 4 (SIGILL) ==3271== Illegal opcode at address 0x48426F4 ==3271== at 0x48426F4: ??? (in /usr/lib/arm-linux-gnueabihf/libarmmem.so) --3271-- REDIR: 0x4ca0380 (memset) redirected to 0x4838c94 (memset) ==3271== ==3271== HEAP SUMMARY: ==3271== in use at exit: 108,372 bytes in 1,265 blocks ==3271== total heap usage: 1,353 allocs, 88 frees, 218,205 bytes allocated ==3271== ==3271== Searching for pointers to 1,265 not-freed blocks ==3271== Checked 221,184 bytes ==3271== ==3271== 48,090 bytes in 1,177 blocks are possibly lost in loss record 49 of 49 ==3271== at 0x4833970: malloc (vg_replace_malloc.c:263) ==3271== by 0x4A35637: operator new(unsigned int) (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.s ==3271== ==3271== LEAK SUMMARY: ==3271== definitely lost: 0 bytes in 0 blocks ==3271== indirectly lost: 0 bytes in 0 blocks ==3271== possibly lost: 48,090 bytes in 1,177 blocks ==3271== still reachable: 60,282 bytes in 88 blocks ==3271== suppressed: 0 bytes in 0 blocks ==3271== Reachable blocks (those to which a pointer was found) are not shown. ==3271== To see them, rerun with: --leak-check=full --show-reachable=yes ==3271== ==3271== Use --track-origins=yes to see where uninitialised values come from ==3271== ERROR SUMMARY: 18 errors from 6 contexts (suppressed: 0 from 0) ==3271== ==3271== 2 errors in context 1 of 6: ==3271== Invalid read of size 4 ==3271== at 0x4844FDC: ??? (in /usr/lib/arm-linux-gnueabihf/libarmmem.so) ==3271== Address 0x4da10cc is 12 bytes inside a block of size 15 alloc'd ==3271== at 0x4833970: malloc (vg_replace_malloc.c:263) ==3271== by 0x4A35637: operator new(unsigned int) (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.s ==3271== ==3271== ==3271== 3 errors in context 2 of 6: ==3271== Use of uninitialised value of size 4 ==3271== at 0x4A77FB8: ??? (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3271== ==3271== ==3271== 3 errors in context 3 of 6: ==3271== Use of uninitialised value of size 4 ==3271== at 0x4A78142: udivmoddi4 (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3271== ==3271== ==3271== 3 errors in context 4 of 6: ==3271== Conditional jump or move depends on uninitialised value(s) ==3271== at 0x4A78140: __udivmoddi4 (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3271== ==3271== ==3271== 6 errors in context 5 of 6: ==3271== Invalid write of size 4 ==3271== at 0x4A77F9E: ??? (in /etc/raumfeld/raumserverDaemon/libs/linux_ARMV7/raumkernel.so) ==3271== Address 0x7db68370 is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes ==3271== ==3271== ERROR SUMMARY: 18 errors from 6 contexts (suppressed: 0 from 0)

janningnetworks commented 7 years ago

BTW: there are about 50 established connections to raumsrvDaemon - normal behaviour?

tcp 0 0 192.168.2.179:58232 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58216 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58180 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58192 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58170 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58234 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58196 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58174 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58208 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58228 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58188 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58222 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58160 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58236 192.168.2.140:47365 VERBUNDEN 1878/raumsrvDaemon tcp 0 0 192.168.2.179:58158 192.168.2.140:47365 ... ... ... ... .... ...

ChriD commented 7 years ago

Nope. Except you are running 50 Long polling requests which i think will not be the case In fact this seems to be a socket Issue on the RPI. The port of the request (the raumserver does some requests on rf devices) seems not to be closed. So every new reqeuest a new port will be used. That's of course not good. Because then it leads to the error mention above in the log (if availavble number of ports goes empty) 2016.10.08 23:00:05.009 ERROR: Resource temporarily unavailable [requestHandlerThread]

Hmm... I have to think about that

ChriD commented 7 years ago

I cant reproduce this problem on a X64 UBUNTU VM. I do not have any RPI with Raspian to check this.

janningnetworks commented 7 years ago

i´ll try to investigate if i can reproduce this. at the moment i´m not really using the raumserver. i started it some days ago and the process is still running smoothly without starting many processes.

(made some minor change on my setup: updated the S99raumserver startup-script to latest version from git and updated raumfeld firmeware from 1.57 to 1.58)

root@raspberrypi:/var/www/charts# netstat -plant | grep "raum" tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 26661/raumsrvDaemon tcp 0 0 192.168.2.111:43696 0.0.0.0:* LISTEN 26661/raumsrvDaemon tcp 0 0 192.168.2.111:40234 192.168.2.140:47365 VERBUNDEN 26661/raumsrvDaemon

janning networks

birger-forell-str. 46

49824 neugnadenfeld

phone +49 5944 599105

fax +49 5944 5999922

www.janning.info

2016-10-30 18:46 GMT+01:00 Christian notifications@github.com:

I cant reproduce this problem on a X64 UBUNTU VM. I do not have any RPI with Raspian to check this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChriD/Raumserver/issues/31#issuecomment-257166038, or mute the thread https://github.com/notifications/unsubscribe-auth/AVnkSQD3udSKl6LjBPol3xRhq-0AtW9zks5q5NfpgaJpZM4KSEjt .