Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwYYc-0002bw-Gk for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Sep 2017 18:56:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dwYYc-0001ZU-3V for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Sep 2017 18:56:42 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dwYYb-0001ZK-BQ for pgsql-hackers@postgresql.org; Mon, 25 Sep 2017 18:56:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dwYYY-0006sZ-QL for pgsql-hackers@postgresql.org; Mon, 25 Sep 2017 18:56:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v8PIuYos002035; Mon, 25 Sep 2017 14:56:34 -0400 From: Tom Lane To: Thomas Munro cc: Robert Haas , Andres Freund , amul sul , PostgreSQL-development Subject: Re: Server crash due to SIGBUS(Bus Error) when trying to access the memory created using dsm_create(). In-reply-to: <488.1506364109@sss.pgh.pa.us> References: <25838.1471010881@sss.pgh.pa.us> <20170628230458.n5ehizmvhoerr5yq@alap3.anarazel.de> <26247.1506349378@sss.pgh.pa.us> <488.1506364109@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 25 Sep 2017 14:28:29 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2033.1506365794.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 25 Sep 2017 14:56:34 -0400 Message-ID: <2034.1506365794@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org I wrote: > Hmm, so I tested this patch on my RHEL6 box (kernel 2.6.32) and it > immediately fell over with > 2017-09-25 14:23:48.410 EDT [325] FATAL: could not resize shared memory = segment "/PostgreSQL.1682054886" to 6928 bytes: Operation not supported > during startup. I wonder whether we need to round off the request. Nope, rounding off doesn't help. What does help is using posix_fallocate instead. I surmise that glibc knows something we don't about how to call fallocate(2) successfully on this kernel version. Rather than dig into the guts of glibc to find that out, though, I think we should just s/fallocate/posix_fallocate/g on this patch. The argument for using the former seemed pretty thin to begin with. regards, tom lane --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers