error: Shared data size conflict in shared_data for monitor

Forum for questions and support relating to the 1.27.x releases only.
Locked
vlad2005
Posts: 31
Joined: Fri Jun 27, 2014 6:45 pm

error: Shared data size conflict in shared_data for monitor

Post by vlad2005 »

I got tons of this error:

Code: Select all

Component   | Pid  | Level | Code | Message                                                                                            | File          | Line |
+-------------------+-------------+------+-------+------+----------------------------------------------------------------------------------------------------+---------------+------+
| zmwatch     | 2279 |    -2 | ERR  | Shared data size conflict in shared_data for monitor monitor-1, expected 336, got 539634218 | zmwatch.pl    | NULL |
I found some old post something about replacing an line in /usr/share/perl5/ZoneMinder/Memory.pm, but i can't find this file. Where is?
vlad2005
Posts: 31
Joined: Fri Jun 27, 2014 6:45 pm

Re: error: Shared data size conflict in shared_data for moni

Post by vlad2005 »

Sorry i found this file later:
/usr/share/perl/5.18.2/ZoneMinder/Memory.pm
Edit line 130 and put: our $arch = 32;
Probably for 64bit arhitecture need to put 64.

This problem seem to be very old. Why is not resolved until now?
linuxsense
Posts: 374
Joined: Wed Nov 07, 2007 1:59 am
Location: Huntington Beach, California
Contact:

Re: error: Shared data size conflict in shared_data for moni

Post by linuxsense »

This is probably related to how you are capturing the camera stream. What version of ZM are you using? The current source from the git repo or something else? What are your camera settings?
vlad2005
Posts: 31
Joined: Fri Jun 27, 2014 6:45 pm

Re: error: Shared data size conflict in shared_data for moni

Post by vlad2005 »

I use 1.27.1 from repository.
But searching on git source code i found file Memory.pm.in wich contain at line 130 same code:

Code: Select all

our $arch = int(3.2*length(~0));
Seem that not working.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: error: Shared data size conflict in shared_data for moni

Post by knight-of-ni »

This zoneminder error only happens when you install a 32bit Linux OS on 64bit capable hardware.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: error: Shared data size conflict in shared_data for moni

Post by knight-of-ni »

I've got an idea on how to fix this, but I need more data.

Please save the following to a script file e.g. perltest.pl, mark it executable, and run it:

Code: Select all

#!/usr/bin/perl

use strict;
use warnings;
use Config;

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

print "Value of length test: $test\n";
print "Value of our arch: $arch\n";
print "Config value of selectminbits: $Config{selectminbits}\n";
Pleae copy and paste the script's output into your reply.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
vlad2005
Posts: 31
Joined: Fri Jun 27, 2014 6:45 pm

Re: error: Shared data size conflict in shared_data for moni

Post by vlad2005 »

Output:

Code: Select all

Value of length test: 20
Value of our arch: 64
Config value of selectminbits: 32
My system:

Code: Select all

$ uname -a
Linux XXXXXX 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:02:19 UTC 2014 i686 i686 i686 GNU/Linux
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: error: Shared data size conflict in shared_data for moni

Post by knight-of-ni »

I have proposed a fix here:
https://github.com/ZoneMinder/ZoneMinder/pull/462

If all goes well, it should be part of 1.27.1
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
vlad2005
Posts: 31
Joined: Fri Jun 27, 2014 6:45 pm

Re: error: Shared data size conflict in shared_data for moni

Post by vlad2005 »

Ok, thanks!!!
dazed
Posts: 66
Joined: Thu Feb 13, 2014 5:32 pm

Re: error: Shared data size conflict in shared_data for moni

Post by dazed »

knnniggett...I cant seem to get rid of that error either with the above listed line 130 changes mentioned above.

I ran your script and this was my output

Code: Select all

Value of length test: 20
Value of our arch: 64
Config value of selectminbits: 64
My system

Code: Select all

Linux CCTV 3.11.0-24-generic #42~precise1-Ubuntu SMP Fri Jul 4 21:22:54 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: error: Shared data size conflict in shared_data for moni

Post by knight-of-ni »

dazed wrote:knnniggett...I cant seem to get rid of that error either with the above listed line 130 changes mentioned above.

I ran your script and this was my output

Code: Select all

Value of length test: 20
Value of our arch: 64
Config value of selectminbits: 64
My system

Code: Select all

Linux CCTV 3.11.0-24-generic #42~precise1-Ubuntu SMP Fri Jul 4 21:22:54 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
If you hard code the relevant line of code, like the OP did, to reflect the number of bits of your OS, and you still see a shared data size conflct in the logs then you've got some other problem not related to this issue other than sharing the same error message.

To put it another way, the issue described in this thread only affects a select few who are running a 32bit OS on 64bit capable hardware and are running certain distros. I can duplicate the issue on 32bit Ubuntu and 32bit FreeBSD 8.3, but 32bit CentOS does not cause the issue.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Locked