Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h2QYa-0000Vi-J0 for pgsql-admin@arkaria.postgresql.org; Sat, 09 Mar 2019 01:13:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h2QYZ-0007jW-5D for pgsql-admin@arkaria.postgresql.org; Sat, 09 Mar 2019 01:13:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h2QYY-0007jP-Td for pgsql-admin@lists.postgresql.org; Sat, 09 Mar 2019 01:13:42 +0000 Received: from uucp.dinoex.org ([2a0b:f840::12] helo=uucp.dinoex.sub.de) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h2QYW-0007li-9R for pgsql-admin@postgresql.org; Sat, 09 Mar 2019 01:13:42 +0000 Received: from uucp.dinoex.sub.de (uucp.dinoex.sub.de [194.45.71.2]) by uucp.dinoex.sub.de (8.15.2/8.15.2) with ESMTPS id x291D4IS039877 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 9 Mar 2019 02:13:05 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) Received: from citylink.dinoex.sub.org (uucp@localhost) by uucp.dinoex.sub.de (8.15.2/8.15.2/Submit) with UUCP id x291D48w039876; Sat, 9 Mar 2019 02:13:04 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by citylink.dinoex.sub.de (8.15.2/8.15.2) with ESMTP id x290Jp47030479; Sat, 9 Mar 2019 01:19:52 +0100 (CET) (envelope-from peter@gate.oper.dinoex.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by gate.oper.dinoex.org (8.15.2/8.15.2) with ESMTP id x290H79n030113; Sat, 9 Mar 2019 01:17:07 +0100 (CET) (envelope-from peter@gate.oper.dinoex.org) Received: (from peter@localhost) by gate.oper.dinoex.org (8.15.2/8.15.2/Submit) id x290H7Qt030112; Sat, 9 Mar 2019 01:17:07 +0100 (CET) (envelope-from peter) Date: Sat, 9 Mar 2019 01:17:07 +0100 From: Peter To: Andrew Gierth , girgen@FreeBSD.org Cc: pgsql-admin@postgresql.org, pgsql@FreeBSD.org Subject: Re: Upgrade 10.5->10.6 : db crash BUS ERROR (sig 10), reproducible Message-ID: <20190309001707.GA14810@gate.oper.dinoex.org> References: <20190308012012.GA49481@gate.oper.dinoex.org> <87y35p9l0k.fsf@news-spur.riddles.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y35p9l0k.fsf@news-spur.riddles.org.uk> User-Agent: Mutt/1.11.1 (2018-12-01) X-Milter: Spamilter (Reciever: uucp.dinoex.sub.de; Sender-ip: 194.45.71.2; Sender-helo: uucp.dinoex.sub.de;) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (uucp.dinoex.sub.de [194.45.71.2]); Sat, 09 Mar 2019 02:13:08 +0100 (CET) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Mar 08, 2019 at 08:22:33PM +0000, Andrew Gierth wrote: ! >>>>> "Peter" == Peter writes: ! ! Peter> Extra Compiler-Options: ! Peter> -march=pentium3 ! ! I CC'd you on my response to Palle, but to spell it out, what you need ! to do to fix this is either: ! ! 1. Remove the -march=pentium3 option. ! ! 2. Add the -mstackrealign option as well. Yes, thank You, this got clear to me in the afternoon. ! Either way should work. Could you try (one or both, your preference) and ! report back? Yes, -mstackrealign helps. So, as my local problem is now solved, I am thinking about that "greater good for mankind" thing. ;) At least one other person did run into the issue, and from Your explanation I understand that this is not a postgres issue, but could happen to any piece of software that decides to use gcc. Now it seems easy to put this compiler option into the port's specific makefile for postgreSQL, but it should actually be fixed systemwide. But, while it gets recommended to set the cpu-type systemwide on FreeBSD, it is not recommend for the system owner to set CFLAGS systemwide (even less specific ones for gcc - and I didn't find a proper way to do that, anyway). So my proposal is that this one belongs into /usr/ports/Mk/bsd.gcc.mk + .if ${MACHINE_CPU:Msse} && ${MACHINE_ARCH} == i386 + CFLAGS+= -mstackrealign + .endif That seems to work. Palle, Your opinion? rgds, PMc