Page 1 of 1

error: Shared data size conflict in shared_data for monitor

Posted: Wed Jul 02, 2014 5:03 pm
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?

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

Posted: Wed Jul 02, 2014 5:42 pm
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?

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

Posted: Wed Jul 02, 2014 7:50 pm
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?

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

Posted: Thu Jul 03, 2014 7:58 am
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.

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

Posted: Mon Jul 07, 2014 1:33 pm
by knight-of-ni
This zoneminder error only happens when you install a 32bit Linux OS on 64bit capable hardware.

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

Posted: Mon Jul 07, 2014 3:49 pm
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.

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

Posted: Mon Jul 07, 2014 7:00 pm
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

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

Posted: Mon Jul 07, 2014 8:59 pm
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

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

Posted: Mon Jul 07, 2014 9:19 pm
by vlad2005
Ok, thanks!!!

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

Posted: Fri Jul 11, 2014 4:29 pm
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

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

Posted: Fri Jul 11, 2014 5:04 pm
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.