Re: Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create().
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, amul sul <sul_amul@yahoo.co.in>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2016-08-22T20:41:05Z
Lists: pgsql-hackers
On Tue, Aug 16, 2016 at 7:41 PM, Thomas Munro <thomas.munro@enterprisedb.com> wrote: > I still think it's worth thinking about something along these lines on > Linux only, where holey Swiss tmpfs files can bite you. Otherwise > disabling overcommit on your OS isn't enough to prevent something > which is really a kind of deferred overcommit with a surprising > failure mode (SIGBUS rather than OOM SIGKILL). Yeah, I am inclined to agree. I mean, creating a DSM is fairly heavyweight already, so one extra system call isn't (I hope) a crazy overhead. We could test to see how much it slows things down. But it may be worth paying the cost even if it ends up being kinda expensive. We don't really have any way of knowing whether the caller's request is reasonable relative to the amount of virtual memory available, and converting a possible SIGBUS into an ereport(ERROR, ...) is a big win. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Fix failure-to-read-man-page in commit 899bd785c.
- e5c058e2eed8 9.4.15 landed
- 06852f21544c 9.5.10 landed
- 12ac252f9014 9.6.6 landed
- d29f30d8c3b2 10.0 landed
- 5ea96efaa010 11.0 landed
-
Avoid SIGBUS on Linux when a DSM memory request overruns tmpfs.
- 3a07a6f3e8d2 9.4.15 landed
- 175061222470 9.6.6 landed
- 05297416f362 9.5.10 landed
- 899bd785c0ed 11.0 landed
- 4621c7f7a432 10.0 landed