A note about testing EXEC_BACKEND on recent Linuxen

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: A note about testing EXEC_BACKEND on recent Linuxen
Date: 2006-01-26 23:40:08
Message-ID: 25585.1138318808@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I just wasted a couple hours trying to determine why an EXEC_BACKEND
build would randomly fail on Fedora Core 4. It seems the reason is that
by default, recent Linux kernels randomize the stack base address ---
not by a lot, but enough to cause child processes to sometimes be unable
to attach to the shared memory segment at the same place the postmaster
did.

You can work around this by doing (as root)
echo 0 >/proc/sys/kernel/randomize_va_space
before starting the postmaster. You'll probably want to set it back to
1 when done experimenting with EXEC_BACKEND, since address randomization
is a useful security hack.

Just seems like something that should be in our archives ...

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2006-01-27 00:09:15 Re: Suggestions for post-mortem...
Previous Message Peter Eisentraut 2006-01-26 23:36:14 Re: Cleaning up the INET/CIDR mess