When a program dynamically unloads one of the SNA libraries, but the program does not exit, the memory usage of that program can grow a little. If this process of dynamically loading and unloading SNA libraries repeatedly occurs in a process, and the process does not exit, memory will be used and not freed each time this occurs.
The SNA libraries are not designed to be dynamically unloaded prior to the end of the process. When the library is loaded, it creates a thread to communicate with the kernel drivers. This thread has to operate asynchronously to receive information from the kernel. The behavior would be unpredictable if the library were reloaded. The APPC, CPI-C, and LUA libraries may fail in unpredictable ways. The CSV library may work but will exhibit a memory leak.
Resolving the problem
Do not explicitly unload the SNA libraries.
In some cases, if the SNA libraries are used by another shared library that is dynamically loaded and unloaded, this can cause the SNA libraries to be unloaded without explicitly targeting the SNA libraries. To prevent this, LDR_PRELOAD can be used to explicitly load the SNA libraries prior to loading the shared library that uses them. If the SNA libraries are already loaded before the shared library that needs them is loaded, then they will not be unloaded when that shared library is unloaded.
When the process using the SNA libraries ends, all memory it is using will be released.
For reference, these libraries include any library found in /usr/lib/sna/ on AIX and /opt/ibm/sna/lib/ and /opt/ibm/sna/lib64/ on Linux.
|Networking||Communications Server for Linux||All||Linux xSeries||6.0.1, 6.2, 6.2.1, 6.2.2, 6.2.3, 18.104.22.168, 22.214.171.124, 126.96.36.199, 6.4, 188.8.131.52, 184.108.40.206, 220.127.116.11, 18.104.22.168, 22.214.171.124|
|Networking||Communications Server for Linux on zSeries||All||Linux zSeries||6.0.1, 6.2, 6.2.1, 6.2.2, 6.2.3, 126.96.36.199, 6.4, 188.8.131.52, 184.108.40.206, 220.127.116.11, 18.104.22.168, 22.214.171.124, 126.96.36.199|
|Networking||IBM Communications Server for Data Center Deployment||All||AIX, Linux, Linux on System z||188.8.131.52|
csaix cs/aix commserver comm server aix sna aixsna csl cslin cslinux