Can't get shared memory id '7a6d2001' in zmwatch.log

Support and queries relating to all previous versions of ZoneMinder
timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA

Post by timcraig »

I think any number will be okay.
georgemason
Posts: 13
Joined: Tue May 20, 2008 11:39 am
Location: Brighton, UK

Post by georgemason »

Right, well things have changed, but still no picture. I put the number 0x4b450000 in, and although the output from ipcs -m looks better (no more 0x0000000 entries), I'm now getting the 'shared memory not valid' errors but with the new memory id mentioned above.

Code: Select all

root@zoneminder:/home/zoneadmin# ps axo user,command | grep zm
www-data /usr/bin/perl -wT /usr/bin/zmdc.pl startup
www-data /usr/bin/perl -wT /usr/bin/zmfilter.pl
www-data /usr/bin/perl -wT /usr/bin/zmaudit.pl -c
www-data /usr/bin/perl -wT /usr/bin/zmwatch.pl
www-data /usr/bin/perl -w /usr/bin/zmupdate.pl -c
root     grep zm


root@zoneminder:/home/zoneadmin# ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x00000000 0          gdm       600        393216     2          dest         

root@zoneminder:/home/zoneadmin# tail /tmp/zm*.log
==> /tmp/zmaudit.log <==

==> /tmp/zmdc.log <05> /tmp/zmfilter.log <05> /tmp/zmpkg.log <05> /tmp/zmupdate.log <==

==> /tmp/zmwatch.log <==
05/23/08 22:27:29.044749 zmwatch[5487].INF ['zmc -d /dev/video0' starting at 08/05/23 22:27:29, pid = 7084]
05/23/08 22:27:39.046305 zmwatch[5487].ERR [Can't get shared memory id '4b450001', 1: No such file or directory]
05/23/08 22:27:39.046811 zmwatch[5487].INF [Restarting capture daemon for New, shared memory not valid]
05/23/08 22:27:39.305903 zmwatch[5487].INF ['zmc -d /dev/video0' starting at 08/05/23 22:27:39, pid = 7090]
05/23/08 22:27:49.307501 zmwatch[5487].ERR [Can't get shared memory id '4b450001', 1: No such file or directory]
05/23/08 22:27:49.308006 zmwatch[5487].INF [Restarting capture daemon for New, shared memory not valid]
05/23/08 22:27:49.563347 zmwatch[5487].INF ['zmc -d /dev/video0' starting at 08/05/23 22:27:49, pid = 7096]
05/23/08 22:27:59.564903 zmwatch[5487].ERR [Can't get shared memory id '4b450001', 1: No such file or directory]
05/23/08 22:27:59.565397 zmwatch[5487].INF [Restarting capture daemon for New, shared memory not valid]
05/23/08 22:27:59.827877 zmwatch[5487].INF ['zmc -d /dev/video0' starting at 08/05/23 22:27:59, pid = 7102]
timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA

Post by timcraig »

It looks like the issue is that the zoneadmin user on your system doesn't have permissions to allocate shared memory.

I'm not sure what you need to do to give the zoneadmin user permissions to shared memory. As a tempory test, you might want to try chmod 666 /dev/mem and see if you get the errors in the log anymore but I don't recommend setting it back to 600 once you verify that it is a user access issue.
georgemason
Posts: 13
Joined: Tue May 20, 2008 11:39 am
Location: Brighton, UK

Post by georgemason »

Tried the chmod 666 /dev/mem, unfortunately it didn't seem to make any difference. So am still in the same position, the no picture from the camera (blank black rectangle where the image should be).

I'm beginning to think it would be better to just compile ZM from source and see how I get on with that...
badone
Posts: 16
Joined: Thu Apr 03, 2008 1:16 am

Post by badone »

georgemason
Posts: 13
Joined: Tue May 20, 2008 11:39 am
Location: Brighton, UK

Post by georgemason »

I've already tried increasing the shared memory but it didn't make any difference. Tried changing the key too which also had no effect.
badone
Posts: 16
Joined: Thu Apr 03, 2008 1:16 am

Post by badone »

Code: Select all

May 29 16:08:49 fc6dev zmwatch[22565]: ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
May 29 16:08:49 fc6dev zmwatch[22565]: INF [Restarting capture daemon for xed1, shared memory not valid]
May 29 16:08:50 fc6dev zmdc[22724]: INF ['zmc -m 2' started at 08/05/29 16:08:50]
May 29 16:08:50 fc6dev zmdc[22528]: INF ['zmc -m 2' starting at 08/05/29 16:08:50, pid = 22724]
May 29 16:08:50 fc6dev zmc_m2[22724]: INF [Debug Level = 0, Debug Log = <none>]
May 29 16:08:50 fc6dev zmwatch[22565]: INF ['zmc -m 2' starting at 08/05/29 16:08:50, pid = 22724]
May 29 16:08:50 fc6dev zmc_m2[22724]: INF [New Debug Level = 0, New Debug Log = /tmp/zm_debug.log.22724]
May 29 16:08:50 fc6dev zmc_m2[22724]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
May 29 16:08:50 fc6dev zmdc[22528]: ERR ['zmc -m 2' exited abnormally, exit status 255]
That's the error I was getting.

cat /proc/sys/kernel/shmall

gave me 2097152

Now using the calculation on that page I got 100x576x704x3=121651200 which is well over. So I did;

echo 134217728 >/proc/sys/kernel/shmall
echo 134217728 >/proc/sys/kernel/shmmax

and that error went away.

Now I'm getting;

Code: Select all

May 29 16:33:15 fc6dev zmc_m2[23110]: ERR [Not a JPEG file: starts with 0x66 0x65]
May 29 16:33:15 fc6dev zmc_m2[23110]: ERR [Unable to decode jpeg]
May 29 16:33:15 fc6dev zmc_m2[23110]: ERR [Failed to post-capture monitor 0]
May 29 16:33:15 fc6dev zmdc[23050]: ERR ['zmc -m 2' exited abnormally, exit status 255]
but that's a different story :wink:

Cheeers,
Brad
ptosiani
Posts: 10
Joined: Wed Aug 12, 2009 10:22 pm

Post by ptosiani »

Hi, did you manage to solve the problem with:

Aug 14 16:39:41 zmserver zmc_m1[24969]: ERR [Invalid JPEG file structure: two SOI markers]
Aug 14 16:39:41 zmserver zmc_m1[24969]: ERR [Unable to decode jpeg]
Aug 14 16:39:41 zmserver zmc_m1[24969]: ERR [Failed to capture image from monitor 1 (0/1)]
Aug 14 16:39:41 zmserver zmdc[24947]: ERR ['zmc -m 1' exited abnormally, exit status 255]
Aug 14 16:39:49 zmserver zmc_m1[24992]: ERR [Invalid JPEG file structure: two SOI markers]
Aug 14 16:39:49 zmserver zmc_m1[24992]: ERR [Unable to decode jpeg]
Aug 14 16:39:49 zmserver zmc_m1[24992]: ERR [Failed to capture image from monitor 1 (0/1)]
Aug 14 16:39:49 zmserver zmdc[24947]: ERR ['zmc -m 1' exited abnormally, exit status 255]
Aug 14 16:39:54 zmserver zmc_m1[24995]: ERR [Invalid JPEG file structure: two SOI markers]
Aug 14 16:39:54 zmserver zmc_m1[24995]: ERR [Unable to decode jpeg]
Aug 14 16:39:54 zmserver zmc_m1[24995]: ERR [Failed to capture image from monitor 1 (0/1)]
Aug 14 16:39:54 zmserver zmdc[24947]: ERR ['zmc -m 1' exited abnormally, exit status 255]




This thing is driving me crazzy, i cant find a solution or someone who can point me in the right direction, thanks
scarrz
Posts: 23
Joined: Thu Aug 20, 2009 12:40 pm

Any ideas?

Post by scarrz »

I'm having the same issue as above. Anybody found a solution?
dcsd
Posts: 1
Joined: Fri Oct 23, 2009 6:19 pm

Post by dcsd »

I'm not sure if this will help anyone, but we ran into what sounds like the same problem and first solved it by putting

echo 268435456 >/proc/sys/kernel/shmall
echo 268435456 >/proc/sys/kernel/shmmax

into one of our startup scripts (/etc/rc.d/rc.local in my case, it varies from distribution to distribution).
That solved it for a while, then once we added more cameras, we got the black box instead of video with the shared memory errors again, until we upped that shared memory size again, we now have

echo 536870912 >/proc/sys/kernel/shmall
echo 536870912 >/proc/sys/kernel/shmmax

and that seemed to fix it. Not sure if this is what you are _supposed_ to do or not, but it seemed to work for us so I thought I'd post it in case it helped anyone else out.
floorman007
Posts: 3
Joined: Thu Nov 05, 2009 6:59 am

Post by floorman007 »

Anyone ever solve this? I'm stuck with the error

zmwatch[2167].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]

I'm running Ubuntu 9.10 -- I did all the usual stuff if setting shared memory, rebooting, restarting etc. Any ideas?
eyeinthesky
Posts: 4
Joined: Fri Apr 06, 2007 11:28 pm

Post by eyeinthesky »

I just set up ZM 1.24.1 from the repositories on a clean install of Ubuntu 9.10 and am frustrated by the same error. Webcam's "source" label is red and the feed window just displays a blank image. This is what appears in /tmp/zmwatch.log:

11/11/09 23:47:16.071227 zmwatch[1643].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/11/09 23:47:26.073313 zmwatch[1643].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
11/11/09 23:47:36.075193 zmwatch[1643].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]

The workarounds I used to get things up and running under Unbuntu 9.04 (fiddling with shmmax and shmall as well as reducing the image buffer size) aren't helping this time :(
floorman007
Posts: 3
Joined: Thu Nov 05, 2009 6:59 am

Post by floorman007 »

I've spent countless hours on this with no success on 9.10, my last try was just installing via:
sudo apt-get install zoneminder
sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
sudo /etc/init.d/apache2 force-reload
sudo adduser www-data video

updated sysctl.conf

sudo vi /etc/sysctl.conf
kernel.shmall = 134217728
kernel.shmmax = 134217728


So you got zoneminder working on 9.04??? What did you do to make that work?
eyeinthesky
Posts: 4
Joined: Fri Apr 06, 2007 11:28 pm

Post by eyeinthesky »

floorman007 wrote:So you got zoneminder working on 9.04??? What did you do to make that work?
Spent hours tearing my hair out and banging my head against the computer, much like last night :? But that time it got me somewhere. The main difference with my Ubuntu 9.04 setup was it had an older version of ZM which didn't support my UVC camera directly, so I had use mjpg-streamer (plus increase shmmax and reduce Image Buffer Size from 40 to 10). But back to the current problem....

Googling for "Can't get shared memory id '7a6d0001'" produces a zillion results but no single cause or solution. The reason became clear from this remark in one of those threads: "This is not a shared memory error per say as your thinking of, It is expected if for any reason that zmc can not grab an image for nothing to be in shared memory."

EDIT: Just noticed this is the 1.23.x section of the forum, so moved the rest of my post here.
edgar5
Posts: 20
Joined: Tue Nov 16, 2010 7:59 pm

Post by edgar5 »

I`ve the same situation as You. Have you got any solution of this problem??
I`ve still error:
01/24/11 23:10:30.161890 zmwatch[6157].ERR [Can't get shared memory id '7a6d0003', 3: No such file or directory]
01/24/11 23:10:40.164153 zmwatch[6157].ERR [Can't get shared memory id '7a6d0003', 3: No such file or directory]
01/24/11 23:10:50.166431 zmwatch[6157].ERR [Can't get shared memory id '7a6d0003', 3: No such file or directory]
01/24/11 23:11:00.168746 zmwatch[6157].ERR [Can't get shared memory id '7a6d0003', 3: No such file or directory]
01/24/11 23:11:10.170985 zmwatch[6157].ERR [Can't get shared memory id '7a6d0003', 3: No such file or directory]
01/24/11 23:11:20.173289 zmwatch[6157].ERR [Can't get shared memory id '7a6d0003', 3: No such file or directory]
01/24/11 23:11:30.175591 zmwatch[6157].ERR [Can't get shared memory id '7a6d0003', 3: No such file or directory]
Locked