shared mem./malloc() problem while using Informix
Posted in 1996
Topics: Installation, Setup & Upgrades, Networking & sqlhosts Configuration
Hi, We are an applic. on sol2.4 using informix 7.10. While using the applic., when you select a feature on the GUI to fetch some data from database, it malloc()s about 4MB but fails. The applic. was working fine before. The only change is that mem. has been upgraded from 128MB to 327 MB. Doing truss on it, we see brk() system call failing with ENOMEM error although the system has a lot of mem. and swap available. Using pmap on the process-id before and after that fetch feature is used in the applic. and found that something attaches at an addr. (0x00800000) segment a little above the heap segment(which is 0x0014C000). The truss also shows a shmat() call attaching at 0x00800000. This happens on each invocation of the application. The SHMBASE value in Informix config. is set to 0xa000000. The following are the pmap and truss outputs for reference and I have used arrows to point to important lines: pmap <pid> output (before using the fetch feature): -------------------------------------------------- 8588: suserve -p 1073741904 -d 355 -v 1 00010000 556K read/exec dev: 32,25 ino: 133392 000AA000 520K read/write/exec dev: 32,25 ino: 133392 0012C000 616K read/write/exec 0014C000 488K [ heap ] <---------- EF5A0000 12K read/exec /usr/lib/nss_files.so.1 EF5B2000 4K read/write/exec /usr/lib/nss_files.so.1 EF5C0000 8K read/exec /usr/lib/straddr.so.2 EF5D1000 4K read/write/exec /usr/lib/straddr.so.2 EF5E0000 28K read/exec /usr/lib/libw.so.1 EF5F6000 4K read/write/exec /usr/lib/libw.so.1 EF600000 432K read/exec /usr/lib/libc.so.1 EF67B000 24K read/write/exec /usr/lib/libc.so.1 EF681000 16K read/write/exec EF6A0000 8K read/exec /usr/lib/libintl.so.1 EF6B1000 8K read/write/exec /usr/lib/libintl.so.1 EF6C0000 368K read/exec /usr/lib/libnsl.so.1 EF72B000 36K read/write/exec /usr/lib/libnsl.so.1 EF734000 28K read/write/exec EF740000 4K read/exec /usr/lib/libdl.so.1 EF760000 52K read/exec /usr/lib/libsocket.so.1 EF77C000 8K read/write/exec /usr/lib/libsocket.so.1 EF780000 84K read/exec /usr/lib/libm.so.1 EF7A4000 12K read/write/exec /usr/lib/libm.so.1 EF7C0000 4K read/write/exec EF7D0000 80K read/exec /usr/lib/ld.so.1 EF7F3000 8K read/write/exec /usr/lib/ld.so.1 EFFFA000 24K read/write/exec EFFFA000 24K [ stack ] pmap <pid> output (after using the fetch feature): -------------------------------------------------- scud /home/ontrac09/mem: pmap 8588 8588: suserve -p 1073741904 -d 355 -v 1 00010000 556K read/exec dev: 32,25 ino: 133392 000AA000 520K read/write/exec dev: 32,25 ino: 133392 0012C000 4104K read/write/exec 0014C000 3976K [ heap ] <----- 00800000 560K read/write/exec/shared <----- # something attaching # to this shared segment here EF5A0000 12K read/exec /usr/lib/nss_files.so.1 EF5B2000 4K read/write/exec /usr/lib/nss_files.so.1 EF5C0000 8K read/exec /usr/lib/straddr.so.2 EF5D1000 4K read/write/exec /usr/lib/straddr.so.2 EF5E0000 28K read/exec /usr/lib/libw.so.1 EF5F6000 4K read/write/exec /usr/lib/libw.so.1 EF600000 432K read/exec /usr/lib/libc.so.1 EF67B000 24K read/write/exec /usr/lib/libc.so.1 EF681000 16K read/write/exec EF6A0000 8K read/exec /usr/lib/libintl.so.1 EF6B1000 8K read/write/exec /usr/lib/libintl.so.1 EF6C0000 368K read/exec /usr/lib/libnsl.so.1 EF72B000 36K read/write/exec /usr/lib/libnsl.so.1 EF734000 28K read/write/exec EF740000 4K read/exec /usr/lib/libdl.so.1 EF760000 52K read/exec /usr/lib/libsocket.so.1 EF77C000 8K read/write/exec /usr/lib/libsocket.so.1 EF780000 84K read/exec /usr/lib/libm.so.1 EF7A4000 12K read/write/exec /usr/lib/libm.so.1 EF7C0000 4K read/write/exec EF7D0000 80K read/exec /usr/lib/ld.so.1 EF7F3000 8K read/write/exec /usr/lib/ld.so.1 EFFF2000 56K read/write/exec EFFF2000 56K [ stack ] truss <pid> output ------------------ poll(0xEFFFDB50, 3, -1) (sleeping...) poll(0xEFFFDB50, 3, -1) = 1 getmsg(9, 0xEFFFD63C, 0xEFFFD630, 0xEFFFD6AC) = 0 alarm(0) = 100 getuid() = 507 [507] open("/etc/passwd", O_RDONLY) = 10 fstat(10, 0xEFFFC798) = 0 ioctl(10, TCGETA, 0xEFFFC724) Err#25 ENOTTY read(10, " r o o t : x : 0 : 1 : S".., 8192) = 8192 read(10, " 1 0 : E d H a d d a d".., 8192) = 8192 read(10, " : / b i n / k s h\\n m a".., 8192) = 8192 lseek(10, 0xFFFFED87, SEEK_CUR) = 19847 close(10) = 0 open("/usr/informix/etc/sqlhosts", O_RDONLY) = 10 lseek(10, 0, SEEK_SET) = 0 fstat(10, 0xEFFFC800) = 0 ioctl(10, TCGETA, 0xEFFFC78C) Err#25 ENOTTY read(10, " # * * * * * * * * * * *".., 8192) = 964 read(10, 0x001883B4, 8192) = 0 uname(0xEFFFC318) = 1 lseek(10, 0, SEEK_CUR) = 964 close(10) = 0 getuid() = 507 [507] open("/etc/passwd", O_RDONLY) = 10 fstat(10, 0xEFFFC8C8) = 0 ioctl(10, TCGETA, 0xEFFFC854) Err#25 ENOTTY read(10, " r o o t : x : 0 : 1 : S".., 8192) = 8192 read(10, " 1 0 : E d H a d d a d".., 8192) = 8192 read(10, " : / b i n / k s h\\n m a".., 8192) = 8192 lseek(10, 0xFFFFED87, SEEK_CUR) = 19847 close(10) = 0 open("/usr/informix/etc/sqlhosts", O_RDONLY) = 10 lseek(10, 0, SEEK_SET) = 0 fstat(10, 0xEFFFC930) = 0 ioctl(10, TCGETA, 0xEFFFC8BC) Err#25 ENOTTY read(10, " # * * * * * * * * * * *".., 8192) = 964 read(10, 0x001883B4, 8192) = 0 uname(0xEFFFC448) = 1 lseek(10, 0, SEEK_CUR) = 964 close(10) = 0 time() = 848527008 getpid() = 6424 [1] time() = 848527008 open("/INFORMIXTMP/.inf.ontrac09tli", O_RDONLY) = 10 read(10, "\\0\\0\\001", 4) = 4 getpid() = 6424 [1] sysconfig(_CONFIG_PAGESIZE) = 4096 lseek(10, 4, SEEK_SET) = 4 read(10, "\\0\\0\\002\\0\\0\\001\\0\\0\\0 2".., 36) = 36 shmat(2, 8388608, 0) = 0x00800000 <------- semop(1, 0xEFFFCB40, 1) = 0 semop(1, 0xEFFFCB40, 1) = 0 close(10) = 0 semctl(1, 0, 8, 1) = 0 semop(1, 0xEFFFCC50, 1) = 0 semop(1, 0xEFFFCBE8, 1) = 0 semop(1, 0x001278A0, 1) = 0 semop(1, 0xEFFF5440, 1) = 0 semop(1, 0x001278A0, 1) = 0 semop(1, 0xEFFF5478, 1) = 0 semop(1, 0x001278A0, 1) = 0 brk(0x0052D4E0) = 0 brk(0x009094E0) Err#12 ENOMEM <------- time() = 848527008 write(5, " 1 6 : 5 6 : 4 8 R o u".., 77) = 77 time() = 848527008 write(5, " 1 6 : 5 6 : 4 8 R o u".., 82) = 82 time() = 848527008 write(5, " 1 6 : 5 6 : 4 8 R o u".., 85) = 85 time() = 848527008 write(5, " 1 6 : 5 6 : 4 8 R o u".., 81) = 81 time() = 848527008 write(5, " 1 6 : 5 6 : 4 8 R o u".., 77) = 77 time() = 848527008 write(5, " 1 6 : 5 6 : 4 8 R o u".., 101) = 101 time() = 848527008 write(5, " 1 6 : 5 6 : 4 8 R o u".., 78) =