Last camera in Montage is blank (Shared Memory Issue?)

Forum for questions and support relating to the 1.28.x releases only.
Locked
AnotherBrian
Posts: 114
Joined: Tue Jul 27, 2010 6:36 am

Last camera in Montage is blank (Shared Memory Issue?)

Post by AnotherBrian »

I'm running zoneminder with 7 ip cameras with resolution set at 1280x720 using libvlc.
Have 8 gig ram and 4 gig swap.

Each individual camera can be viewed from zoneminders main console.
Under montage all cameras are viewable except for the last camera of which there is a rectangle displayed but no image.

While montage is still open, I go to the log from the console. A browser window pops up for the log but there is no display - it blocks!
I close montage and the log fills.

Similarly, in montage I click on that last rectangle (which has no image). A browser window pops up for the camera but there is no display - it blocks!
I close montage and the browser wiindow fills with the images.

Log shows "Shared data not initialised by capture daemon, some query functions may not be available or produce invalid results"
My presumption is that I have a shared memory issue triggered from opening montage.

Code: Select all

ipcs -lm

------ Shared Memory Limits --------
max number of segments = 8192
max seg size (kbytes) = 8192000
max total shared memory (kbytes) = 33554432000
min seg size (bytes) = 1
So that is 33gigabtyes, way more than the real memory and swap space
on the system.

Code: Select all

ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x00000000 1179648    zone       600        524288     2          dest         
0x00000000 393217     zone       600        524288     2          dest         
0x00000000 425986     zone       600        524288     2          dest         
0x00000000 688131     zone       600        524288     2          dest         
0x00000000 786436     zone       600        524288     2          dest         
0x00000000 1245189    zone       600        393216     2          dest         
0x00000000 917510     zone       600        67108864   2          dest         
0x00000000 1015815    zone       600        524288     2          dest         
0x00000000 1507336    zone       600        1048576    2          dest         
0x00000000 1343497    zone       600        524288     2          dest         
0x00000000 1474571    zone       600        2097152    2          dest 
That totals about 74 megabytes.

Suggestions?
iitywygms
Posts: 123
Joined: Thu Nov 08, 2012 5:19 am

Re: Last camera in Montage is blank (Shared Memory Issue?)

Post by iitywygms »

What browser are you using?
Try firefox.
This is something to do with built in limitations of browsers.
AnotherBrian
Posts: 114
Joined: Tue Jul 27, 2010 6:36 am

Re: Last camera in Montage is blank (Shared Memory Issue?)

Post by AnotherBrian »

I turned on debugging and got this out of the log:

Code: Select all

Shared data size conflict in shared_data for monitor SideYard, expected 336, got 1701670728	zmwatch.pl
I'm guessing zmwatch.pl is a perl script but haven't found it.
I looked in directories /usr/share/perl and /usr/share/perl5.

Found this fix for release 12 having same problem:
http://www.solid-run.com/archive/mw/Zoneminder

Code: Select all

 Some fixes

    To remove errors -> zmwatch[XXXX].ERR [Shared data size conflict in shared_data for monitor XXXXXX, expected 328, got 316] 

Edit the file /usr/share/perl5/ZoneMinder/Memory.pm

Find and replace:

$arch = int(3.2*length(~0));

with :

$arch = 32;
On my Ubuntu 14.04 system my /usr/share/perl/5/18.2/Memory.pm file says

Code: Select all

# Native architecture

# The following returned the wrong result on some 32 bit distros running on 64 bit hardware
#our $arch = int(3.2*length(~0));

# New method for determining the bitness
our $arch = 32 + 32*( qx(uname -m) =~ /64/ );
My system is 64 bit:

Code: Select all

uname -m
x86_64
I will set $arch to 64 and see what transpires.

I am using firefox.
Assuming it is a browser limitation, then I would not expect the zonemnder log viewing function to block when montage is open.
Also I am able to open a new browser window for another website while montage is open and there is no blocking.
Operating on the theory that there is a firefox limitation, maybe its the number of concurrent mpeg sessions.

Feedback is welcomed.
AnotherBrian
Posts: 114
Joined: Tue Jul 27, 2010 6:36 am

Re: Last camera in Montage is blank (Shared Memory Issue?)

Post by AnotherBrian »

okee doke - my guess is that I have a mix of perl scripts from different zoneminder releases.

I set $arch=64 and it gets worst. The last camera remains unviewable and another camera appears all greyed out (even though I can access the camera directly outside of zoneminder).

Setting $arch=32 gives me the same as before, I just loose the last camera (blank).

What is an easy method of pumping out debug info from perl scripts?
AnotherBrian
Posts: 114
Joined: Tue Jul 27, 2010 6:36 am

Re: Last camera in Montage is blank (Shared Memory Issue?)

Post by AnotherBrian »

That did it - thx!
Locked