[mythtv-users] Mythzoneminder and mmap

Paul Harrison mythtv at sky.com
Sat Oct 20 22:34:40 UTC 2012


On 20/10/12 21:42, Greg Grotsky wrote:
> Thanks Paul! I added an #endif and it compiled. I ran it and I see 
> this in the mythzmserver.log
>
> loading zm config from /etc/zm.conf
> ZM is version '1.25.0'
> Listening on port: 6548
> _POSIX_MAPPED_FILES is defined and set to 200809
> Failed to shmget for monitor: 2
>
> So the zm server sees that I have memory mapped files but still tries 
> to use shared memory, right?
>
Yep of cause you need the #endif sorry about that.

That looks correct so it's not that. I take it at no point do you see 
something like 'Opened mmap file: /dev/shm/zm.mmap.2' in the log? Do you 
see something like this earlier in the log  'Memory path directory is: 
/dev/shm'? You will need to use -v to see those messages.

If the memory path looks correct the next thing to look at would be the 
open() call in  ZMServer::initMonitor(). The user running mythzmserver 
will require read permissions on the mmap file which will be at 
/dev/shm/zm.mmap.2 if the example you gave earlier is correct.

I did spot a bug in that code but I can't see how it would cause the 
problem you are seeing though. The call to mmap() will return MAP_FAILED 
not NULL that the code is assuming at the moment but that would more 
than likely cause a segfault later on.

Paul H.


More information about the mythtv-users mailing list