Operating System - HP-UX
1753684 Members
5619 Online
108799 Solutions
New Discussion юеВ

ONTAPE error msg shmat [22]

 
Ivon JUNAIDI_1
Advisor

ONTAPE error msg shmat [22]

Hi ALL ,
I'm using Informix for our core database and HP-UX machine as our main server.

I'm using HP-UX B.10.20 U and using Informix IDS ver 7.30.UC10X5, ISQL and i4GL version 7.20.UE1. As backup daily LOG and archive, I run ontape -s and ontape -a command from informix user id. But now I had aproblem with it, when I execute ontape -a or ontape -s command, it shows me the error msg like this ;

usr/informi73@informix $ ontape -a
performing automatic backup of logical logs.
Please mount tape 1 on /dev/rmt/0m and press Return to continue ...

10:56:42 shmat: [22]: operating system error
10:56:42 shmat: [22]: operating system error
10:56:58 shmat: [22]: operating system error 10:57:00 shmat: [22]: operating system error

/usr/informi73@informix $ ontape -s
Please enter the level of archive to be performed (0, 1, or 2) 0 Please mount tape 1 on /dev/rmt/0m and press Return to continue ...
10:57:40 shmat: [22]: operating system error
10:57:41 shmat: [22]: operating system error
10:57:44 shmat: [22]: operating system error
10:57:45 shmat: [22]: operating system error

If we see the error message, it's a O/S error not from Informix, ( many friends also told me )

When I used tape DAT or the tape drive , I can backup and restore the file, with command tar.

Have you ever face this case ? Please advice.
Thank's for your info and help.

Regards,
Ivon JUNAIDI,


8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor

Re: ONTAPE error msg shmat [22]

First, look at /usr/include/sys/errno.h and you will find that errno 22 = EINVAL. Next do a man 2 shmat and find the conditions underwhich shmat can set errno = EINVAL (there are several) and pick the one that best fits. This is rather standard UNIX troubleshooting.
If it ain't broke, I can fix that.
Steve Lewis
Honored Contributor

Re: ONTAPE error msg shmat [22]

According to IBM Informix, although the error came from the o/s, it isn't necessarily the operating system, see http://www-306.ibm.com/software/data/informix/ids/support/

and search for shmat .

With that in mind, check the number of shared memory segments that you have allocated to the database using onstat -g seg.
Check the total size of the V class segments against the onconfig parameters SHMVIRTSIZE.
Then check those values against that of SHMTOTAL. If have run up against SHMTOTAL, then you need to increase that value and also the SHMVIRTSIZE value.
If you have a lot of shared memory segments and they are large, then check the totals against the values of your kernel parameters shmmax, shmmni and shmseg, to ensure that you have not run out of shared memory or identifiers.


Ivon JUNAIDI_1
Advisor

Re: ONTAPE error msg shmat [22]

Hi Stepen ,
I've done with those parameter changes but after reboot the server, the error still same.
Is there any parameter should change also ?
Thank's for help.
Steve Lewis
Honored Contributor

Re: ONTAPE error msg shmat [22]

Hi Ivon,

Please tell me the values of these:
How much memory in your system?
How much swap? (swapinfo -tm)
Output of vmstat -S
values of shmmax, shmmni, shmseg
ONCONFIG parameters: SHMVIRTSIZE, BUFFERS, SHMTOTAL, SHMADD
Output of onstat -g seg
Output of ipcs -ma

Are you running more than one instance on the server? If so, then please tell me the values of SERVERNUM for each and the onconfig values of all instances.

There is a known problem (bug?) in that old version of informix where it sometimes gets confused about which shmid it should be attached to, if it has had to allocate more than one segment. This causes the o/s to tell it that it that it cannot attach using shmat().

freddy_21
Respected Contributor

Re: ONTAPE error msg shmat [22]

could you give me output from ioscan -fnC tape. i am afraid you wrong to catch your tape device. at your ontape will point to /dev/rmt/0m, but i dont know at your system. is it 0m too?


thanks
Freddy
Ivon JUNAIDI_1
Advisor

Re: ONTAPE error msg shmat [22]

Hi Steve Lewis ,
here's the info that you need.
Total Physical Mem = 1048576 KB (1GB)

Swapinfo, vmstat, onstat -g and ipcs-ma OUTPUT I attach in this reply with name info.zip


shmmax=1048576000
shmmni=1024
shmseg=1024

ONCONFIG parameter ;
SHMVIRTSIZE=307200
BUFFERS=40000
SHMTOTAL=0
SHMADD=8192

In my server, it only running one instance.
Thank's for help.
Ivon JUNAIDI_1
Advisor

Re: ONTAPE error msg shmat [22]

Hi Fredy ,
I'm sure that I'm using /dev/rmt/0m
I used tar cvf /dev/rmt/0m , it's working fine.
Here the output from ioscan ( attach )
TQ for help
Gonzalo Tipola
Occasional Contributor

Re: ONTAPE error msg shmat [22]

Hi Ivon,
I have the same problem, please you can say me if you solved this problem.

TIA
Gonzalo T.