Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Andrew Dunstan <andrew@dunslane.net>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2021-08-09T18:04:07Z
Lists: pgsql-hackers
Hi, On 2021-08-09 13:54:25 -0400, Tom Lane wrote: > Andres Freund <andres@anarazel.de> writes: > > On 2021-08-09 13:43:03 -0400, Robert Haas wrote: > >> On Mon, Aug 9, 2021 at 1:30 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > > How common is to get a failure? I know I've run tests under > > EXEC_BACKEND and not seen any failures. Not many runs though. > > > I get check-world failures in about 1/2-1/3 of the runs, and a plain check > > fails in maybe 1/4 of the cases. It's pretty annoying because it often isn't > > trivial to distinguish whether I've broken something or whether it's > > randomization related... > > I don't have numbers, but I do know that on Linux EXEC_BACKEND builds fail > often enough to be annoying if you don't disable ASLR. If we can do > something not-too-invasive about that, it'd be great. I now not sure if personality(NO_RANDOMIZE) in postmaster is actually sufficient. It does seem to drastically reduce the frequency of issues, but there's still conceivable failures where postmaster's layout would class with the non-randomized children - obviously personality(NO_RANDOMIZE) cannot retroactively change the layout of the already running binary. So maybe we should put it into pg_ctl? Greetings, Andres Freund
Commits
-
Make EXEC_BACKEND more convenient on Linux and FreeBSD.
- 6b4dba711a4e 12.15 landed
- 1e4fda6da918 13.11 landed
- 0801345758db 14.8 landed
- f3e78069db7f 15.0 landed
-
Make EXEC_BACKEND more convenient on macOS.
- 8201b60565b8 14.0 landed
- 2c6275423535 13.5 landed
- a8096e30f4d0 12.9 landed
- 0bfefb7dafe0 11.14 landed
- d49e228a664d 10.19 landed
- 715a8668a5f7 9.6.24 landed
- 88cbbbfa3e2b 15.0 landed