Linux Cannot attach to shared memory. errno = 43:
Posted in 2000
Topics: Installation, Setup & Upgrades, Server Administration, Versions, Editions & End-of-Life
I've recently installed IIF 2000 with IDS 9.21.UC2 on a Mandrake 7.1
Linux box. After I initialized the DB and started oninit I can do
'onstat -p' once and everything works great. The second time I do
'onstat -p' I get:
onstat: Cannot attach to shared memory. errno = 43
I can't bring the system down using 'onmode -ky' at this point. I've had
to kill the oninit to bring it down. The only way I can bring DB down
gracefully is if the onmode command is the first command to access
shared memory.
I can still go into dbaccess and work with the DB (it's configured to
accept tcp connections).
S.W.
swilcoxon@uswest.net
Steven Wilcoxon wrote:
>
> I've recently installed IIF 2000 with IDS 9.21.UC2 on a Mandrake 7.1
> Linux box. After I initialized the DB and started oninit I can do
> 'onstat -p' once and everything works great. The second time I do
> 'onstat -p' I get:
> onstat: Cannot attach to shared memory. errno = 43
errno 43 is EIDRM (identifier removed). It only takes a lot of grepping
to find this:
$ grep 43 /usr/include/errno.h
$ grep include /usr/include/errno.h/* The includer defined __need_Emath if he wants only the definitions
#include <features.h>
#include <bits/errno.h>
might need this definition sometimes even if this file was included
$ grep 43 /usr/include/bits/errno.h
$ grep include /usr/include/bits/errno.h
# include <linux/errno.h>
$ grep 43 /usr/include/linux/errno.h
$ grep include /usr/include/linux/errno.h
#include <asm/errno.h>
$ grep 43 /usr/include/asm/errno.h
#define EIDRM 43 /* Identifier removed */
$
So, when you include <errno.h>, there are a minimum of 4 other files
that are actually included...
The message means that the shared memory (or semaphore) identifier has
been removed from the system, so that the process cannot attach to it.
By implication, it once existed, but isn't present any more. So, you
need to look into the log file to see what errors are occurring. It
appears to me that the server is going down when it should not. You
might need to try 'oninit -v' to see what happens during the
initialization phase, too.
> I can't bring the system down using 'onmode -ky' at this point. I've had
> to kill the oninit to bring it down. The only way I can bring DB down
> gracefully is if the onmode command is the first command to access
> shared memory.
>
> I can still go into dbaccess and work with the DB (it's configured to
> accept tcp connections).
>
> S.W.
> swilcoxon@uswest.net
--
Yours,
Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h>
Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN
"I don't suffer from insanity; I enjoy every minute of it!"
Thats the strange part about it ... oninit is still running, the shared
memory shows up in 'ipcs -m' and I can still connect to the DB's via
tcp/ip and access the data. It's only the access for onstat & onmode
that appears to be affected.
It's almost as if when onstat closed it removed a reference to the
shared memory & the next time it can't find it. But everything else
still works fine!
S.W.
Jonathan Leffler wrote:
>
> Steven Wilcoxon wrote:
> >
> > I've recently installed IIF 2000 with IDS 9.21.UC2 on a Mandrake 7.1
> > Linux box. After I initialized the DB and started oninit I can do
> > 'onstat -p' once and everything works great. The second time I do
> > 'onstat -p' I get:
> > onstat: Cannot attach to shared memory. errno = 43
>
> errno 43 is EIDRM (identifier removed). It only takes a lot of grepping
> to find this:
>
> $ grep 43 /usr/include/errno.h
> $ grep include /usr/include/errno.h> /* The includer defined __need_Emath if he wants only the definitions
> #include <features.h>
> #include <bits/errno.h>
> might need this definition sometimes even if this file was included
> $ grep 43 /usr/include/bits/errno.h
> $ grep include /usr/include/bits/errno.h
> # include <linux/errno.h>
> $ grep 43 /usr/include/linux/errno.h
> $ grep include /usr/include/linux/errno.h
> #include <asm/errno.h>
> $ grep 43 /usr/include/asm/errno.h
> #define EIDRM 43 /* Identifier removed */
> $>
> So, when you include <errno.h>, there are a minimum of 4 other files
> that are actually included...
>
> The message means that the shared memory (or semaphore) identifier has
> been removed from the system, so that the process cannot attach to it.
> By implication, it once existed, but isn't present any more. So, you
> need to look into the log file to see what errors are occurring. It
> appears to me that the server is going down when it should not. You
> might need to try 'oninit -v' to see what happens during the
> initialization phase, too.
>
> > I can't bring the system down using 'onmode -ky' at this point. I've had
> > to kill the oninit to bring it down. The only way I can bring DB down
> > gracefully is if the onmode command is the first command to access
> > shared memory.
> >
> > I can still go into dbaccess and work with the DB (it's configured to
> > accept tcp connections).
> >
> > S.W.
> > swilcoxon@uswest.net
>
> --
> Yours,
> Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h>
> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN
> "I don't suffer from insanity; I enjoy every minute of it!"