Shared memory problem OpenSuse 12.3

Forum for questions and support relating to the 1.26.x releases only.
Locked
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Shared memory problem OpenSuse 12.3

Post by px03afk »

I have been using ZoneMinder for some time on OpenSuse and I have just installed 1.26.4 on a newish OpenSuse 12.3, compiling from source. I had a number of issue in getting the install working but eventually I managed, apart from one problem. I couldn't get it to use shared memory, zmwatch kept complaining that it couldn't find it. So, I recompiled with shared memory off and ZoneMinder started working BUT I then discovered that my cameras were all black and white and when I set one to be 24bit colour zm_monitor complained that it couldn't shmget.

So, in order to get colour do I have to use shared memoery?

If so, then how can I find out what is wrong with the installation. I've adjusted the shared memory to the same values I have on the working system so I don't think the problem is there however I'm not entirely clear how to calculate what the values should be, even looking at the wiki entry.
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: Shared memory problem OpenSuse 12.3

Post by px03afk »

Now I''m even more confused.

When I compile with -DZM_NO_MMAP=ON I can manage to run with 24bit colour on my cameras and yet I still see shared memory in use when I run ipcs, provided that I stop zoneminder and change the camera parameters. If I change the colour setting while zm is running then I get errors about not enough shared memory, which appears to be because the previously used shared memoery segment for a camer is not released when you make the change.

So far so good. So I decided to recompile without the ZM_NO_MMAP parameter and this time ipcs doesn't show any shared memory being used, but the cameras are working in colour BUT zmwatch keeps complaining that it can't find the shared memory.

What I'm finding is:

ZM_NO_MMAP=OFF - ipcs shows no shared memory and zmwatch says it can't find it
ZM_NO_MMAP=ON - ipcs shows shared memory in use and zmwatch doesn't complain

Is there something wrong with the way in which ZM_NO_MMAP is being used in different parts of the system?
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: Shared memory problem OpenSuse 12.3

Post by px03afk »

OK, I think I may have found the answer to this. In another entry I came across a note that you need to add -DENABLE_MMAP=yes because cmake is not passing this on to perl modules and when I recompile with this, and without -DZM_NO_MMAP=ON, I get a working system which doesn't appear to use shared memory as ipcs isn't showing zm using it.
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: Shared memory problem OpenSuse 12.3

Post by mastertheknife »

Hi,

This is a bug that sadly was only fixed after ZM 1.26.4 was released.
The workaround for ZM 1.26.4 is indeed like you said: -DENABLE_MMAP=yes

ZM 1.26.4 was the first version to ship with cmake (does not replace autotools) so its not perfect. I have done many fixes and improvements since then which will appear in ZM 1.26.5.
Kfir Itzhak.
px03afk
Posts: 77
Joined: Wed Nov 30, 2011 4:53 pm

Re: Shared memory problem OpenSuse 12.3

Post by px03afk »

The biggest problem I had was finding out what was causing the problem. It took me a couple of days of digging around to find the cure.
Locked