PxPlus User Forum

Twitter Twitter Twitter

Author Topic: How to clear the pvxiosvr -- Shared memory in use error  (Read 1397 times)

PxPlus

  • Administrator
  • Diamond Member
  • *****
  • Posts: 1091
    • View Profile
If, by chance, the ODBC IO dies and you try to restart it you may get an error message indicating that shared memory is in use already.

While this can be cleared by rebooting, you may be able to manuually clear it yourself.

First off make ABSOLUTELY sure the process is not running as what you about to do is effectively overriding the logic used to make sure only a single instance is in the system at any time.

Once you have assured yourself of the above you should remove the pvxiosvr.pid file which identifies the process that was the IO server.

Next you may also need to deal with the "Shared Memory Segments" and the "Semaphore Arrays".

To see if they are still registered, use the "ipcs -m" for the shared
memory and "ipcs -s" for the semaphore ID. Once you have identified the
shared memory location and semaphore, use the command "ipcrm -m" and
"ipcrm -s" with the appropriate id value to remove them.
Eg.

 [root@rhel4-x86mikep pvxiosvr]# ipcs -m
 ------ Shared Memory Segments --------
 key shmid owner perms bytes nattch status
 0x00000000 131072 root 600 393216 2 dest
 0x00000000 163841 root 600 393216 2 dest
 0x00000000 196610 root 600 393216 2 dest
 0x00000000 229379 root 777 393216 2 dest
 0x00000000 262148 root 600 393216 2 dest
 0x00000000 294917 root 600 393216 2 dest
 0x00000000 327686 root 600 393216 2 dest
 0x00000000 360455 root 600 393216 2 dest
 0x00000000 557064 root 600 393216 2 dest
 0x0041083f 589833 root 660 8192 0
 0x00000000 458762 root 600 393216 2 dest
 0x00000000 491531 root 600 393216 2 dest

Using the value of the shared memory ID namely 589833 use the "ipcrm -m"
with the ID to remove it.
 
 [root@rhel4-x86mikep pvxiosvr]# ipcrm -m 589833
 
Use the "ipcs -s" to find the semiphore ID.

 [root@rhel4-x86mikep pvxiosvr]# ipcs -s

 ------ Semaphore Arrays --------
 key semid owner perms nsems
 0x00184948 131072 root 660 1

Using the semiphore ID namely 131072 use the "ipcrm -s" with the ID to
remove it.

 [root@rhel4-x86mikep pvxiosvr]# ipcrm -s 131072

Please note that ProvideX uses key value "0x0041083f" for the shared
memory, and "00x00184948" for the semaphore.