Re: LARGE Oracle Installation (Buffer Problems)

Michael Lausch (mla@gams.co.at)
Thu, 25 Mar 1999 12:48:58 +0100


>>>>> "cw" == Chris Wedgwood <cw@ix.net.nz>
>>>>> wrote the following on Thu, 25 Mar 1999 14:28:48 +1200

cw> On Tue, Mar 23, 1999 at 01:47:13PM +0100, Anas Nashif wrote:
>> ORA-27123: unable to attach to shared memory segment
>> Linux Error: 22: Invalid argument
>> ^^^^^^^^^^^

cw> I still think this is probably because your trying to use more sysV
cw> memory that then kernel will allow.

I found the problem. It's a bad interaction with glibc's malloc()
implementation and programming proctice.
malloc() uses mmap() for large memory chunks. Tghis mapping occurs at
an memory area where the oracle programmers want to put their shared
memory area. Look into the new strace oputput done with `strace -f '
to catpure the child process.

You see that mmap() happens around the same memory addres which is
passed to the shmat() call as the desired address parameter.

Solutions?

o either change the program to use no address or another
address for the shmat() call,

o configure glibc's malloc() to not use mmap

o Use another malloc() implementation and apply the LD_PRELOAD trick
to activate it.

o change the address choosing algorithm for mmap()ed areas in the
kernel

--
Michael Lausch
See my web page <http://www.lausch.at/> or query PGP key server for PGP key.
"Reality is that which, when you stop believing in it, doesn't go away".
                -- Philip K. Dick

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/