Can't get shared memory id '1', 1: No such file or directory

Support and queries relating to all previous versions of ZoneMinder
Locked
facoliveira
Posts: 7
Joined: Wed Apr 12, 2006 6:21 pm
Location: Goiania - GO - Brazil

Can't get shared memory id '1', 1: No such file or directory

Post by facoliveira »

Hi,
Sorry my english!!!
I decided compiled ZoneMinder 1.22.1. Let's all fine.
But now when I run the monitor I get the following errors.
I use Creative Webcam Pro

(/var/log/messages)

Code: Select all

INF ['zmc -d /dev/video0' died, signal 6]
INF [Starting pending process, zmc -d /dev/video0]
INF ['zmc -d /dev/video0' starting at 06/04/27 17:32:32, pid = 2150]
zmc_dvideo0[2150]: INF [Debug Level = 0, Debug Log = <none>]
zmdc[2107]: INF ['zmc -d /dev/video0' died, signal 6]
In (/var/log/syslog)

Code: Select all

zmfix[19921]: ERR [Can't stat (null): Bad address]
zmwatch[19896]: ERR [Can't get shared memory id '7a6d2001', 1: Arquivo ou diretório não encontrado]
zmdc[19864]: WAR [Can't find process with command of 'zmc -d /dev/video0']
zmdc[2107]: WAR [Can't find process with command of 'zma -m 1']
zmdc[19864]: ERR ['zmc -d /dev/video0' crashed, exit status 255]
zmc_dvideo0[20062]: ERR [Failed to set window attributes: Invalid argument]
zms[20088]: ERR [Shared memory not initialised by capture daemon]
zmc_dvideo0[2515]: ERR [Can't shmget, probably not enough shared memory space free: Permission denied
In (zmupdate.log)

Code: Select all

zmwatch[20729].INF [Restarting capture daemon for teste, shared memory not valid]
*** glibc detected *** malloc(): memory corruption: 0x0dac9b20 *** in first moment i receive this error, when a start the monitor.

In strace zmc -d /dev/video0
writev(6, [{"*** glibc detected *** ", 23}, {"malloc(): memory corruption", 27}, {": 0x", 4}, {"0dac9b20", 8}, {" ***\n", 5}], 5*** glibc detected *** malloc(): memory corruption: 0x0dac9b20 ***

and
ioctl(5, VIDIOCSWIN, 0xbffff410) = -1 EINVAL (Invalid argument)

Help me[/quote]
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

zmfix[19921]: ERR [Can't stat (null): Bad address]
would seem to imply you haven't set a device for your monitor. Can you confirm whether this is true or not?
Phil
facoliveira
Posts: 7
Joined: Wed Apr 12, 2006 6:21 pm
Location: Goiania - GO - Brazil

Post by facoliveira »

No, the device is configured.
It stows observing that when dumb the resolution the error modifies.
Example (Origem):
/dev/video0
0
0
RGB24
176x144

Errors:
In /var/log/syslog

Code: Select all

zmwatch[4160]: ERR [Can't read 'shared_data:size' from shared memory '7a6d2001/131075': Permission denied
zmc_dvideo0[4147]: ERR [Can't shmget, probably not enough shared memory space free: Permission denied]
zmdc[4124]: ERR ['zmc -d /dev/video0' crashed, exit status 255]
In /var/log/messages

Code: Select all

zmwatch[4160]: INF [Restarting capture daemon for teste, shared memory not valid]
zmdc[4124]: INF ['zmc -d /dev/video0' starting at 06/04/27 18:33:08, pid = 4210]
zmdc[4210]: INF ['zmc -d /dev/video0' started at 06/04/27 18:33:08]
zmc_dvideo0[4210]: INF [Debug Level = 0, Debug Log = <none>]
zmwatch[4160]: INF ['zmc -d /dev/video0' starting at 06/04/27 18:33:08, pid = 4210]
zmwatch[4160]: INF [Restarting capture daemon for teste, shared memory not valid]
In zmdc.log

Code: Select all

Use of uninitialized value in numeric ne (!=) at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder/SharedMem.pm line 247.
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.7/ZoneMinder/SharedMem.pm line 255.
zmdc[4124].INF ['zmc -d /dev/video0' starting at 06/04/27 18:35:00, pid = 4256]
zmdc[4124].ERR ['zmc -d /dev/video0' crashed, exit status 255]
In zmwatch.lgog

Code: Select all

zmwatch[4160].ERR [Can't read 'shared_data:size' from shared memory '7a6d2001/131075': Permission denied
zmwatch[4160].INF [Restarting capture daemon for teste, shared memory not valid]
In strace zmc -d /dev/video0
open("/dev/tty", O_RDWR|O_NONBLOCK|O_NOCTTY) = 6
writev(6, [{"*** glibc detected *** ", 23}, {"malloc(): memory corruption", 27}, {": 0x", 4}, {"0dac9b20", 8}, {" ***\n", 5}], 5*** glibc detected *** malloc(): memory corruption: 0x0dac9b20 ***
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

If you do an 'ipcs -m' what do you get?
Phil
facoliveira
Posts: 7
Joined: Wed Apr 12, 2006 6:21 pm
Location: Goiania - GO - Brazil

ipcs -m

Post by facoliveira »

Code: Select all

chave      shmid      proprietário perms      bytes      nattch     status
0x00000000 0          root      600        33554432   11         dest
0x00000000 32769      root      600        33554432   11         dest
0x00000000 65538      root      600        46084      11         dest
0x7a6d2001 131075     root      700        9216708    0
0x00000001 294916     nobody    700        3041988    0
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

This indicates that you have a ZM shared memory segment owned by root. Unless you have run the process manually as root, or have specified root as your web user this should not be possible. You should delete this segment with ipcrm and then try and restart ZM.
Phil
facoliveira
Posts: 7
Joined: Wed Apr 12, 2006 6:21 pm
Location: Goiania - GO - Brazil

Post by facoliveira »

I delete this segment: ipcrm -m <id>
And restart ZM.

The first error was after command: /etc/rc.d/rc.zm restart

Code: Select all

*** glibc detected *** malloc(): memory corruption: 0x0dac9b20 ***
*** glibc detected *** malloc(): memory corruption: 0x0dac9b20 ***
*** glibc detected *** malloc(): memory corruption: 0x0dac9b20 ***
*** glibc detected *** malloc(): memory corruption: 0x0dac9b20 ***
In /var/log/messages:

Code: Select all

zmpkg[5789]: INF [Command: start]
zmdc[5802]: INF [Server starting at 06/04/27 20:17:09]
zmdc[5802]: INF ['zmc -d /dev/video0' starting at 06/04/27 20:17:12, pid = 5825]
zmdc[5825]: INF ['zmc -d /dev/video0' started at 06/04/27 20:17:12]
zmc_dvideo0[5825]: INF [Debug Level = 0, Debug Log = <none>]
zmdc[5802]: INF ['zmfilter.pl' starting at 06/04/27 20:17:12, pid = 5829]
zmdc[5829]: INF ['zmfilter.pl' started at 06/04/27 20:17:12]
zmdc[5802]: INF ['zmaudit.pl -c' starting at 06/04/27 20:17:12, pid = 5833]
zmdc[5833]: INF ['zmaudit.pl -c' started at 06/04/27 20:17:12]
zmdc[5802]: INF ['zmwatch.pl' starting at 06/04/27 20:17:13, pid = 5837]
zmdc[5837]: INF ['zmwatch.pl' started at 06/04/27 20:17:13]
zmfilter[5829]: INF [Scanning for events]
zmdc[5802]: INF ['zmupdate.pl -c' starting at 06/04/27 20:17:13, pid = 5843]
zmdc[5843]: INF ['zmupdate.pl -c' started at 06/04/27 20:17:13]
zmdc[5802]: INF ['zmc -d /dev/video0' died, signal 6]
zmdc[5802]: INF [Starting pending process, zmc -d /dev/video0]
zmdc[5802]: INF ['zmc -d /dev/video0' starting at 06/04/27 20:17:13, pid = 5844]
zmdc[5844]: INF ['zmc -d /dev/video0' started at 06/04/27 20:17:13]
zmc_dvideo0[5844]: INF [Debug Level = 0, Debug Log = <none>]
zmwatch[5837]: INF [Watchdog starting]
zmwatch[5837]: INF [Watchdog pausing for 30 seconds]
zmdc[5802]: INF ['zmc -d /dev/video0' died, signal 6]
zmdc[5802]: INF [Starting pending process, zmc -d /dev/video0]
zmdc[5802]: INF ['zmc -d /dev/video0' starting at 06/04/27 20:17:19, pid = 5850]
zmdc[5850]: INF ['zmc -d /dev/video0' started at 06/04/27 20:17:19]
zmc_dvideo0[5850]: INF [Debug Level = 0, Debug Log = <none>]
zmdc[5802]: INF ['zmc -d /dev/video0' died, signal 6]
zmdc[5802]: INF [Starting pending process, zmc -d /dev/video0]
zmdc[5802]: INF ['zmc -d /dev/video0' starting at 06/04/27 20:17:29, pid = 5860]
zmdc[5860]: INF ['zmc -d /dev/video0' started at 06/04/27 20:17:29]
zmc_dvideo0[5860]: INF [Debug Level = 0, Debug Log = <none>]
zmdc[5802]: INF ['zmc -d /dev/video0' died, signal 6]
In /var/log/syslog

Code: Select all

zmc_dvideo0[5675]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
zmdc[5570]: ERR ['zmc -d /dev/video0' crashed, exit status 255]
zmc_dvideo0[5677]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
zmdc[5570]: ERR ['zmc -d /dev/video0' crashed, exit status 255]
zmc_dvideo0[5687]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
zmdc[5570]: ERR ['zmc -d /dev/video0' crashed, exit status 255]
zmc_dvideo0[5689]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
zmdc[5570]: ERR ['zmc -d /dev/video0' crashed, exit status 255]
zmc_dvideo0[5692]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
zmdc[5570]: ERR ['zmc -d /dev/video0' crashed, exit status 255]
In zmdc.log

Code: Select all

zmdc[5802].INF ['zmc -d /dev/video0' starting at 06/04/27 20:17:12, pid = 5825]
zmdc[5825].INF ['zmc -d /dev/video0' started at 06/04/27 20:17:12]
zmdc[5802].INF ['zmfilter.pl' starting at 06/04/27 20:17:12, pid = 5829]
zmdc[5829].INF ['zmfilter.pl' started at 06/04/27 20:17:12]
zmdc[5802].INF ['zmaudit.pl -c' starting at 06/04/27 20:17:12, pid = 5833]
zmdc[5833].INF ['zmaudit.pl -c' started at 06/04/27 20:17:12]
zmdc[5802].INF ['zmwatch.pl' starting at 06/04/27 20:17:13, pid = 5837]
zmdc[5837].INF ['zmwatch.pl' started at 06/04/27 20:17:13]
zmdc[5802].INF ['zmupdate.pl -c' starting at 06/04/27 20:17:13, pid = 5843]
zmdc[5843].INF ['zmupdate.pl -c' started at 06/04/27 20:17:13]
zmdc[5802].INF ['zmc -d /dev/video0' died, signal 6]
zmdc[5802].INF [Starting pending process, zmc -d /dev/video0]
zmdc[5802].INF ['zmc -d /dev/video0' starting at 06/04/27 20:17:13, pid = 5844]
zmdc[5844].INF ['zmc -d /dev/video0' started at 06/04/27 20:17:13]
zmdc[5802].INF ['zmc -d /dev/video0' died, signal 6]
In 'strace zmc -d /dev/video0'

Code: Select all

open("/dev/tty", O_RDWR|O_NONBLOCK|O_NOCTTY) = 6
writev(6, [{"*** glibc detected *** ", 23}, {"malloc(): memory c                                                                                             orruption", 27}, {": 0x", 4}, {"0dac9b20", 8}, {" ***\n", 5}], 5                                                                                             *** glibc detected *** malloc(): memory corruption: 0x0dac9b20 *                                                                                             **
) = 67
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
getpid()                                = 5985
kill(5985, SIGABRT)                     = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT +++
In 'ipcs -m'

Code: Select all

- Segmentos da memória compartilhada -
chave      shmid      proprietário perms      bytes      nattch     status
0x00000000 0          root      600        33554432   11         dest
0x00000000 32769      root      600        33554432   11         dest
0x00000000 65538      root      600        46084      11         dest
0x7a6d2001 458755     nobody    700        9216708    0
0x00000001 294916     nobody    700        3041988    0
What it can be?
Thanks lot
facoliveira
Posts: 7
Joined: Wed Apr 12, 2006 6:21 pm
Location: Goiania - GO - Brazil

Post by facoliveira »

I`ve updated the default shared memory limit for SHMMAX is 101 MB and for SHMALL is 101 MB.
But i receive the folowing erros:
In 176x144 and 320x240 - 5fps

Code: Select all

*** glibc detected *** malloc(): memory corruption: 0x0daff980 ***
*** glibc detected *** malloc(): memory corruption: 0x0daff980 ***
*** glibc detected *** malloc(): memory corruption: 0x0daff980 ***
In strace zmc -d /dev/video0 is exactly error.

In /var/log/messages is the same error.

In /var/log/syslog

Code: Select all

zmdc[7769]: WAR [Can't find process with command of 'zma -m 1']
zms[7626]: ERR [Shared memory not initialised by capture daemon]
zmu[7628]: ERR [Shared memory not initialised by capture daemon]
zms[7632]: ERR [Shared memory not initialised by capture daemon]
zms[7903]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
zmc_dvideo0[7905]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
zmdc[7769]: ERR ['zmc -d /dev/video0' crashed, exit status 255]
And others logs is the same.
Locked