IBM Support

Oncheck cannot attach to shared memory. errno = 22. on Windows Server 2003 after installing Kaseya Agent

Troubleshooting


Problem

This article describes how a third party application called Kaseya Agent can cause oncheck to fail to attach shared memory on Microsoft Windows Server 2003.

Symptom

After you install a third party application called Kaseya Agent on Windows 2003, your oncheck utility can fail to attach to shared memory with the following error:

    MapViewOfFileEx: w32ec=487 at nt_shm.c:663
    19:07:59  shmat: [22]: operating system error
    Unable attach to shared memory.
    Invalid argument

The problem can occur with very small amount of shared memory configured for IBM® Informix Dynamic Server™ (IDS) on Windows Server 2003.

Cause

Applications which attach to IDS shared memory segments, such as oninit, oncheck, onstat, and onbarneed a contiguous free block of address space as large as the segment they are attaching to. Therefore, if oncheck connects to the resident segment, and the segment size is 500MB, the oncheck address space needs a 500MB contiguous memory space where no DLLs loaded. The first place oncheck will attach to the IDS shared memory base address as configured in onconfig parameter SHMBASE. By default, SHMBASE is 0xC000000 on Windows platform.

The problem occurs when a DLL has a base address somewhere in the middle of the IDS shared memory segments. This will fragment the address space and reduces the maximum size of shared memory segment that could be attached. If a DLL base address not set at link time, it will get the default base address of 0x10000000. A DLL loaded at 0x10000000 would cause a problem as it is only 64 MB higher than default SHMBASE.

The Kaseya Agent application version 4.04 loads the kaseyasp.dll at base address 0x10000000, which causes oncheck to fail.

Resolving The Problem

  • Uninstall the third party application, or
  • Modify the SHMBASE onconfig parameter, setting it to a higher value i.e., 0x10030000

[{"Product":{"code":"SSGU8G","label":"Informix Servers"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF033","label":"Windows"}],"Version":"10.0;7.3;9.3;9.4","Edition":"Workgroup;Enterprise;Express","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
16 June 2018

UID

swg21247793