Re: Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create().
Thomas Munro <thomas.munro@enterprisedb.com>
From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@anarazel.de>, amul sul <sul_amul@yahoo.co.in>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-09-25T21:34:50Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-error-handling-for-posix_fallocate.patch (application/octet-stream) patch 0001
On Tue, Sep 26, 2017 at 10:12 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Thomas Munro <thomas.munro@enterprisedb.com> writes: >> I think the problem here is that posix_fallocate() doesn't set errno. > > Huh. So the fact that it worked for me is likely because glibc's > emulation *does* allow errno to get set. > >> Will write a patch. > > Thanks, I'm out of time for today. See attached, which also removes the ENOSYS stuff which I believe to be now useless. Does this make sense? Survives make check-world and my simple test procedure on a 3.10.0-327.36.1.el7.x86_64 system. postgres=# select test_dsm(1000000000000); ERROR: could not resize shared memory segment "/PostgreSQL.2043796572" to 1000000000000 bytes: No space left on device postgres=# select test_dsm(1000); test_dsm ---------- (1 row) -- Thomas Munro http://www.enterprisedb.com
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