<div dir="ltr"><div>On Thu, Apr 14, 2016 at 6:35 PM, Paul Harrison <span dir="ltr"><<a href="mailto:mythtv@sky.com" target="_blank">mythtv@sky.com</a>></span> wrote:<br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On 14/04/16 19:34, Kris Jensen wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Hi Paul, and Thanks.<br>
<br>
I think I figured out what was causing the segfault with mythzmserver on my system.<br>
<br>
A few days before updating Mythtv to .28, I was making changes to my Zoneminder setup. I had added a few cameras. Duplicates of existing cameras but it's functions marked as “none” for testing and exploring Zoneminder's “state” settings for cameras. I removed the duplicate test cameras and mythzmserver is back to working as before.<br>
<br>
I plan to set a few of my ZM cameras with a day/night state change. This is going to require a duplicate of a few camera's, so I can change the function's of the camera's from day to night.<br>
<br>
Question: Why did mythzmserver segfault with the duplicate camera's w/function marked as none?<br>
<br>
Kris.<br>
<br>
</blockquote>
<br></span>
It looks like cameras that are set to None or possibly only ones that have the enabled setting set to off don't have any shared memory. mythzmserver assumes all cameras have the shared memory and tries to access it to get status information and pixel formats etc which is causing the segfault.<br>
<br>
Don't know if this is new behaviour in ZM 1.29.0, I'm still on 1.28.x, or it's simply a configuration that has never been tested before.<br>
<br>
I'll see if I can reproduce the problem and fix it.<div class=""><div class="h5"><br>
<br>
Paul H.<br>
_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" rel="noreferrer" target="_blank">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" rel="noreferrer" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" rel="noreferrer" target="_blank">https://forum.mythtv.org</a><br>
</div></div></blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><p style="margin-bottom:0in">Paul,</p>
<p style="margin-bottom:0in">I recreated the cameras as I had setup
before, plus two more. Mythzmserver still segfaults. However, if I
set the function of the test cameras to other then 'none'
Mythzmserver well not segfault. And it also seems that I can then set
the camera function back to 'none' with out Mythzmserver segfaulting.</p>
<p style="margin-bottom:0in">If it helps debugging I did run a gdb
session with a Mythzmserver segfault, info below.</p>
<p style="margin-bottom:0in">Thanks again.</p>
<p style="margin-bottom:0in">--#Info#-</p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">user@MythServer:~$
gdb mythzmserver</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">GNU
gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Copyright
(C) 2014 Free Software Foundation, Inc.</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">License
GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>></font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">This
is free software: you are free to change and redistribute it.</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">There
is NO WARRANTY, to the extent permitted by law.  Type "show
copying"</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">and
"show warranty" for details.</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">This
GDB was configured as "x86_64-linux-gnu".</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Type
"show configuration" for configuration details.</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">For
bug reporting instructions, please see:</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2"><<a href="http://www.gnu.org/software/gdb/bugs/">http://www.gnu.org/software/gdb/bugs/</a>>.</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Find
the GDB manual and other documentation resources online at:</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2"><<a href="http://www.gnu.org/software/gdb/documentation/">http://www.gnu.org/software/gdb/documentation/</a>>.</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">For
help, type "help".</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Type
"apropos word" to search for commands related to "word"...</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Reading
symbols from mythzmserver...Reading symbols from
/usr/lib/debug/.build-id/61/ded661161c59bff89108b2d4d897ac4994e629.debug...done.</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">done.</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">(gdb)
run -v -c /etc/zm/zm.conf</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Starting
program: /usr/bin/mythzmserver -v -c /etc/zm/zm.conf</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">[Thread
debugging using libthread_db enabled]</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Using
host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">loading
zm config from /etc/zm/zm.conf</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">ZM
is version '1.29.0'</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">[New
Thread 0x7ffff6681700 (LWP 24603)]</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">[Thread
0x7ffff6681700 (LWP 24603) exited]</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Listening
on port: 6548</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Using
server protocol version '11'</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">getZMSetting:
ZM_SHM_KEY Result: 0x7a6d0000</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Shared
memory key is: 0x7a6d0000</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">getZMSetting:
ZM_PATH_MAP Result: /dev/shm</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Memory
path directory is: /dev/shm</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">getZMSetting:
ZM_EVENT_IMAGE_DIGITS Result: 5</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Event
file format is: %05d-capture.jpg</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Analysis
file format is: %05d-analyse.jpg</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">getZMSetting:
ZM_USE_DEEP_STORAGE Result: 1</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">using
deep storage directory structure</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">getZMSetting:
ZM_CREATE_ANALYSIS_IMAGES Result: 1</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">using
analysis images</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Got
10 monitors</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to open mmap file [/dev/shm/zm.mmap.1] for monitor: 1 : Permission
denied</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Falling
back to the legacy shared memory method</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to shmget for monitor: 1</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">ENOENT
- no segment exists for the given key</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to open mmap file [/dev/shm/zm.mmap.3] for monitor: 3 : Permission
denied</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Falling
back to the legacy shared memory method</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to shmget for monitor: 3</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">ENOENT
- no segment exists for the given key</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to open mmap file [/dev/shm/zm.mmap.4] for monitor: 4 : Permission
denied</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Falling
back to the legacy shared memory method</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to shmget for monitor: 4</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">ENOENT
- no segment exists for the given key</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to open mmap file [/dev/shm/zm.mmap.2] for monitor: 2 : Permission
denied</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Falling
back to the legacy shared memory method</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to shmget for monitor: 2</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">ENOENT
- no segment exists for the given key</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to open mmap file [/dev/shm/zm.mmap.7] for monitor: 7 : Permission
denied</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Falling
back to the legacy shared memory method</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to shmget for monitor: 7</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">ENOENT
- no segment exists for the given key</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to open mmap file [/dev/shm/zm.mmap.8] for monitor: 8 : Permission
denied</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Falling
back to the legacy shared memory method</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to shmget for monitor: 8</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">ENOENT
- no segment exists for the given key</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to open mmap file [/dev/shm/zm.mmap.5] for monitor: 5 : Permission
denied</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Falling
back to the legacy shared memory method</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to shmget for monitor: 5</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">ENOENT
- no segment exists for the given key</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to open mmap file [/dev/shm/zm.mmap.11] for monitor: 11 : Permission
denied</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Falling
back to the legacy shared memory method</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to shmget for monitor: 11</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">ENOENT
- no segment exists for the given key</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to open mmap file [/dev/shm/zm.mmap.12] for monitor: 12 : Permission
denied</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Falling
back to the legacy shared memory method</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to shmget for monitor: 12</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">ENOENT
- no segment exists for the given key</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to open mmap file [/dev/shm/zm.mmap.13] for monitor: 13 : No such
file or directory</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Falling
back to the legacy shared memory method</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Failed
to shmget for monitor: 13</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">ENOENT
- no segment exists for the given key</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">new
connection from 192.168.0.204 on socket 5</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Processing:
'HELLO'</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Processing:
'GET_MONITOR_LIST'</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">We
have 10 monitors</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">id:
            1</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">name:
          gararge</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">width:
         640</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">height:
        480</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">palette:
       0</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">byte
per pixel: 3</font></font></p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">Program
received signal SIGSEGV, Segmentation fault.</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">0x000000000040746e
in MONITOR::getSubpixelOrder (this=0x21390b0) at zmserver.cpp:414</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">414
    zmserver.cpp: No such file or directory.</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">(gdb)
bt</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">#0
 0x000000000040746e in MONITOR::getSubpixelOrder (this=0x21390b0) at
zmserver.cpp:414</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">#1
 0x000000000040f3dd in ZMServer::handleGetMonitorList
(this=0x2138d50) at zmserver.cpp:1496</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">#2
 0x00000000004085f5 in ZMServer::processRequest (this=0x2138d50,</font></font></p>
<p style="margin-bottom:0in">    <font face="Courier New, monospace"><font size="2">buf=0x7fffffffd520
"16      GET_MONITOR_LIST", nbytes=24) at zmserver.cpp:593</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">#3
 0x0000000000403d00 in main (argc=4, argv=0x7fffffffe628) at
main.cpp:357</font></font></p>
<p style="margin-bottom:0in"><font face="Courier New, monospace"><font size="2">(gdb)</font></font></p>
<p style="margin-bottom:0in">--#End Info#-</p>
<p style="margin-bottom:0in"><br>
</p>
<p style="margin-bottom:0in">Thanks,</p><p style="margin-bottom:0in">Kris.</p></div></div>