Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app causes ZM crash/bad behavior after it's been asleep for a while #30

Closed
alager opened this issue Sep 16, 2015 · 6 comments
Closed

app causes ZM crash/bad behavior after it's been asleep for a while #30

alager opened this issue Sep 16, 2015 · 6 comments

Comments

@alager
Copy link

alager commented Sep 16, 2015

This issue is much better now ( it only puts about 1 error message every second or 2 ), but still occurs on a regular bases when I lock my phone while zmNinja is running. Now I have to wait a longer time it seems, but the errors still show up in syslog when I unlock my phone and view the montage. This one even caused a back trace to occur:

Sep 16 15:49:05 myZoneMonitor nph-zms[14021]: ERR [Can't insert log entry: MySQL server has gone away]
Sep 16 15:49:05 myZoneMonitor nph-zms[14021]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:05 myZoneMonitor zms[14018]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:07 myZoneMonitor nph-zms[14040]: ERR [Can't insert log entry: Lost connection to MySQL server during query]
Sep 16 15:49:07 myZoneMonitor nph-zms[14040]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:07 myZoneMonitor nph-zms[14041]: ERR [Can't insert log entry: MySQL server has gone away]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Can't insert log entry: MySQL server has gone away]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Got signal 6 (Aborted), crashing]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Signal address is 0x21000036dc, from 0x7fbee34e4cc9]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 0: /usr/lib/zoneminder/cgi-bin/nph-zms(_Z14zm_die_handleriP9siginfo_tPv+0x72) [0x7fbee70b5e72]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 1: /lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7fbee5f1c340]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 2: /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) [0x7fbee34e4cc9]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 3: /lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7fbee34e80d8]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 4: /lib/x86_64-linux-gnu/libc.so.6(+0x73394) [0x7fbee3521394]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 5: /lib/x86_64-linux-gnu/libc.so.6(+0x7f66e) [0x7fbee352d66e]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 6: /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18(end_server+0x35) [0x7fbee57c8c75]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 7: /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18(mysql_close+0x61) [0x7fbee57cab81]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 8: /usr/lib/zoneminder/cgi-bin/nph-zms(_ZN6Logger9terminateEv+0x79) [0x7fbee7030af9]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 9: /usr/lib/zoneminder/cgi-bin/nph-zms(_ZN6LoggerD1Ev+0x10) [0x7fbee7030e20]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 10: /usr/lib/zoneminder/cgi-bin/nph-zms(_Z7logTermv+0x15) [0x7fbee7031035]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 11: /usr/lib/zoneminder/cgi-bin/nph-zms(main+0x7a9) [0x7fbee7020c49]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 12: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fbee34cfec5]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: ERR [Backtrace 13: /usr/lib/zoneminder/cgi-bin/nph-zms(+0x1fb37) [0x7fbee7021b37]]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: INF [Backtrace complete, please execute the following command for more information]
Sep 16 15:49:07 myZoneMonitor nph-zms[14044]: INF [addr2line -e /usr/lib/zoneminder/cgi-bin/nph-zms 0x7fbee70b5e72 0x7fbee5f1c340 0x7fbee34e4cc9 0x7fbee34e80d8 0x7fbee3521394 0x7fbee352d66e 0x7fbee5
7c8c75 0x7fbee57cab81 0x7fbee7030af9 0x7fbee7030e20 0x7fbee7031035 0x7fbee7020c49 0x7fbee34cfec5 0x7fbee7021b37]
Sep 16 15:49:09 myZoneMonitor zms[14074]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:11 myZoneMonitor nph-zms[14098]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:15 myZoneMonitor nph-zms[14142]: ERR [Can't insert log entry: MySQL server has gone away]
Sep 16 15:49:15 myZoneMonitor nph-zms[14142]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:15 myZoneMonitor nph-zms[14148]: ERR [Can't insert log entry: MySQL server has gone away]
Sep 16 15:49:15 myZoneMonitor zms[14143]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:15 myZoneMonitor nph-zms[14154]: ERR [Can't insert log entry: MySQL server has gone away]
Sep 16 15:49:15 myZoneMonitor nph-zms[14154]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:17 myZoneMonitor nph-zms[14183]: ERR [Can't insert log entry: MySQL server has gone away]
Sep 16 15:49:17 myZoneMonitor nph-zms[14183]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:17 myZoneMonitor nph-zms[14187]: ERR [Can't insert log entry: MySQL server has gone away]
Sep 16 15:49:17 myZoneMonitor nph-zms[14187]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:19 myZoneMonitor zms[14222]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:21 myZoneMonitor zms[14252]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:21 myZoneMonitor zms[14256]: INF [Got signal 15 (Terminated), exiting]
Sep 16 15:49:23 myZoneMonitor zms[14287]: INF [Got signal 15 (Terminated), exiting]
S

@pliablepixels
Copy link
Member

I just can't replicate this. I'm pretty sure its a ZM DB install issue, but I'd like to know why its being triggered only after sleeping
What is is writing to the Logs DB?

Can you do this:
a) Put zmN into sleep
b) Open up a terminal and log into your db mysql --u<username> -p<password> zm
c) Wake up zm
c) Print out what its writing to Logs DB by executing the following in the sql prompt
select * from Logs ORDER by TimeKey DESC LIMIT 40;

@alager
Copy link
Author

alager commented Sep 18, 2015

It took half a day of the device in sleep mode before I could make it happen.
Maybe it had to leave the wifi network, I left the building for lunch.
Anyhow, here are the logs requested: (note, no errors are being shown...)

1442607757.740306   zms 5439    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607742.729653   zma_m1  3575    0   INF Bullet-958c: 150000 - Analysing at 10.00 fps    /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1250
1442607730.177888   zma_m4  3626    0   INF Dome-copier: 149000 - Analysing at 10.00 fps    /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1250
1442607726.155939   zmc_m4  3623    0   INF Dome-copier: 150000 - Capturing at 10.00 fps    /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  3117
1442607725.680404   zma_m3  3614    0   INF Dome-2: 75000 - Analysing at 5.00 fps   /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1250
1442607725.112866   zma_m2  3589    0   INF Dome-1: 75000 - Analysing at 5.00 fps   /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1250
1442607724.057227   zmc_m3  3603    0   INF Dome-2: 75000 - Capturing at 5.00 fps   /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  3117
1442607724.052633   zmc_m1  3572    0   INF Bullet-958c: 150000 - Capturing at 10.00 fps    /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  3117
1442607723.712305   zmc_m2  3586    0   INF Dome-1: 75000 - Capturing at 5.00 fps   /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  3117
1442607715.642508   zms 5110    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607699.577446   zms 4982    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607697.619956   zms 4966    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607695.669039   zms 4950    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607693.576205   zms 4934    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607683.535574   zms 4859    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607679.555107   zms 4827    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607675.579079   zms 4794    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607673.542850   zms 4777    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607673.513830   zms 4773    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607671.533809   zms 4763    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607671.492094   zms 4759    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607669.527164   zms 4747    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607667.512877   zms 4726    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607667.501211   zms 4727    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607667.499365   zms 4724    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607665.485822   zms 4710    0   INF Got signal 15 (Terminated), exiting /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_signal.cpp   40
1442607642.715248   zma_m1  3575    0   INF Bullet-958c: 149000 - Analysing at 10.00 fps    /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1250
1442607631.012494   zma_m4  3626    0   INF Dome-copier: 148008 - Closing event 6260, alarm end /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1670
1442607630.974676   zma_m4  3626    0   INF Dome-copier: 148008 - Left alarm state (6260) - 87(19) images   /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1665
1442607630.179878   zma_m4  3626    0   INF Dome-copier: 148000 - Analysing at 9.80 fps /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1250
1442607628.825415   zma_m4  3626    0   INF Dome-copier: 147983 - Gone into alert state /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1658
1442607627.278455   zma_m4  3626    0   INF Dome-copier: 147972 - Gone back into alarm state    /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1649
1442607627.176297   zma_m4  3626    0   INF Dome-copier: 147971 - Gone into alert state /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1658
1442607626.777160   zma_m4  3626    0   INF Dome-copier: 147968 - Gone back into alarm state    /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1649
1442607626.154444   zmc_m4  3623    0   INF Dome-copier: 149000 - Capturing at 10.00 fps    /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  3117
1442607625.429086   zma_m4  3626    0   INF Dome-copier: 147951 - Gone into alert state /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1658
1442607624.442759   zma_m4  3626    0   INF Dome-copier: 147946 - Opening new event 6260, alarm start   /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1614
1442607624.378574   zma_m4  3626    0   INF Dome-copier: 147946 - Gone into alarm state /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1568
1442607624.209305   zma_m4  3626    0   INF Dome-copier: 147944 - Closing event 6259, alarm end /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1670
1442607624.171175   zma_m4  3626    0   INF Dome-copier: 147944 - Left alarm state (6259) - 78(28) images   /build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp  1665

@pliablepixels
Copy link
Member

right, I actually want to see what is it trying to write to the log DB at that time - the logs above show it could not write, but I want to see what is it that its trying to write (refer to the SQL query)

@alager
Copy link
Author

alager commented Sep 22, 2015

additional information: I let it run like this (showing the errors in syslog) for about 10 minutes and then the errors simply stopped stopped. All the while, ZM was still able to capture motion events, and zmNinja was able to show the montage correctly and up to date.

@pliablepixels
Copy link
Member

is this still a problem @alager ?

@alager
Copy link
Author

alager commented Oct 24, 2015

I have not seen this happen in a while....It's probably safe to say it has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants