Skip to content

zmeventnotification continues to look for memory map file when zoneminder is shutting down #417

@eRaid6

Description

@eRaid6

Event Server version

$ /usr/bin/zmeventnotification.pl --version
6.1.28

Hooks version (if you are using Object Detection)

$ /var/lib/zmeventnotification/bin/zm_detect.py --version
app:6.1.28, pyzm:0.3.56

The version of ZoneMinder you are using:
1.36.20

OS version:
Ubuntu 20.04.4 LTS

What is the nature of your issue
Bug

Details
When zoneminder is told to restart via systemd, zmeventnotification.pl does not exit which causes Zoneminder restart to timeout. During this time if you manually kill zmeventnotification.pl then Zoneminder will restart successfully. Looks to be the same issue this person on the Zoneminder forums reported https://forums.zoneminder.com/viewtopic.php?t=30555.

Debug Logs (if applicable)

Jul 18 11:39:21 zoneminder systemd[1]: Stopping ZoneMinder CCTV recording and surveillance system...
Jul 18 11:39:22 zoneminder sudo[631772]:     root : TTY=unknown ; PWD=/usr/share/zoneminder/www ; USER=www-data ; COMMAND=/bin/true
Jul 18 11:39:22 zoneminder sudo[631772]: pam_unix(sudo:session): session opened for user www-data by (uid=0)
Jul 18 11:39:22 zoneminder sudo[631772]: pam_unix(sudo:session): session closed for user www-data
Jul 18 11:39:22 zoneminder sudo[631774]:     root : TTY=unknown ; PWD=/usr/share/zoneminder/www ; USER=www-data ; COMMAND=/usr/bin/zmdc.pl check
Jul 18 11:39:22 zoneminder sudo[631774]: pam_unix(sudo:session): session opened for user www-data by (uid=0)
Jul 18 11:39:22 zoneminder sudo[631774]: pam_unix(sudo:session): session closed for user www-data
Jul 18 11:39:22 zoneminder sudo[631777]:     root : TTY=unknown ; PWD=/usr/share/zoneminder/www ; USER=www-data ; COMMAND=/usr/bin/zmdc.pl shutdown
Jul 18 11:39:22 zoneminder sudo[631777]: pam_unix(sudo:session): session opened for user www-data by (uid=0)
Jul 18 11:39:23 zoneminder zmeventnotification[631142]: ERR [Shared data not valid for monitor 7]
Jul 18 11:39:23 zoneminder zmeventnotification[631142]: ERR [|----> FORK:garage (7), eid:315940 SHM failed, re-validating it]
Jul 18 11:39:23 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
Jul 18 11:39:24 zoneminder sudo[631777]: pam_unix(sudo:session): session closed for user www-data
Jul 18 11:39:24 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
Jul 18 11:39:24 zoneminder zmeventnotification[631142]: ERR [|----> FORK:garage (7), eid:315940 SHM failed, re-validating it]
Jul 18 11:39:24 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
Jul 18 11:39:24 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
Jul 18 11:39:24 zoneminder zmeventnotification[631142]: ERR [|----> FORK:garage (7), eid:315940 SHM failed, re-validating it]
Jul 18 11:39:24 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
Jul 18 11:39:26 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
Jul 18 11:39:26 zoneminder zmeventnotification[631142]: ERR [|----> FORK:garage (7), eid:315940 SHM failed, re-validating it]
Jul 18 11:39:26 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
Jul 18 11:39:28 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
Jul 18 11:39:28 zoneminder zmeventnotification[631142]: ERR [|----> FORK:garage (7), eid:315940 SHM failed, re-validating it]
Jul 18 11:39:28 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
Jul 18 11:39:30 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
Jul 18 11:39:30 zoneminder zmeventnotification[631142]: ERR [|----> FORK:garage (7), eid:315940 SHM failed, re-validating it]
Jul 18 11:39:30 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
Jul 18 11:39:32 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
............
Jul 18 11:49:25 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
Jul 18 11:49:25 zoneminder zmeventnotification[631142]: ERR [|----> FORK:garage (7), eid:315940 SHM failed, re-validating it]
Jul 18 11:49:25 zoneminder zmeventnotification[631142]: ERR [Memory map file '/dev/shm/zm.mmap.7' does not exist in zmMemAttach.  zmc might not be running.]
Jul 18 11:49:25 zoneminder systemd[1]: zoneminder.service: State 'stop-final-sigterm' timed out. Killing.
Jul 18 11:49:25 zoneminder systemd[1]: zoneminder.service: Killing process 631142 (zmeventnotifica) with signal SIGKILL.
Jul 18 11:49:25 zoneminder systemd[1]: zoneminder.service: Failed with result 'timeout'.
Jul 18 11:49:25 zoneminder systemd[1]: Stopped ZoneMinder CCTV recording and surveillance system.
Jul 18 11:49:25 zoneminder systemd[1]: zoneminder.service: Found left-over process 631142 (zmeventnotifica) in control group while starting unit. Ignoring.
Jul 18 11:49:25 zoneminder systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jul 18 11:49:25 zoneminder systemd[1]: Starting ZoneMinder CCTV recording and surveillance system...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions