Re: Upgrade 10.5->10.6 : db crash BUS ERROR (sig 10), reproducible

From: Palle Girgensohn <girgen(at)FreeBSD(dot)org>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: Peter <pmc(at)citylink(dot)dinoex(dot)sub(dot)org>, pgsql-admin(at)postgresql(dot)org, "pgsql(at)freebsd(dot)org" <pgsql(at)FreeBSD(dot)org>
Subject: Re: Upgrade 10.5->10.6 : db crash BUS ERROR (sig 10), reproducible
Date: 2019-03-07 19:25:29
Message-ID: E4B6F953-A971-4791-8355-BC74A167A52A@FreeBSD.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> 7 mars 2019 kl. 18:20 skrev Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>:
>
>>>>>> "Peter" == Peter <pmc(at)citylink(dot)dinoex(dot)sub(dot)org> writes:
>
> Peter> Hi,
> Peter> after upgrading from 10.5 to 10.6.2, database now says this:
>
> Peter> Mar 7 13:58:43 <local0.info> edge postgres[1816]: [8-1] :[] LOG:
> Peter> worker process: parallel worker for PID 3526 (PID 3527) was
> Peter> terminated by signal 10: Bus error
>
> I'm assuming from the CC that this is on FreeBSD, but on what
> architecture?
>
> Did it drop a core file (look in the data dir for postgres.core) and if
> so can you get a backtrace?
>
> Peter> Time to read the relnotes:
>
>>> When building on i386 with the clang compiler, require -msse2 to be
>>> used (Andres Freund) This avoids problems with missed floating point
>>> overflow checks.
>
> Peter> What the hell does that mean? Does it concern the build process?
> Peter> Or the operation? Why does it only concern the Clang? And what
> Peter> is SSE2 concerned with?
>
> It concerns only overflow checks in floating-point computations.
>
> Clang's __builtin_isinf(x) function, which is supposed to test if x is
> infinite, does not work reliably on i386 when the x87 registers are used
> for floating point. It does work if the SSE2 registers are used instead,
> which clang will do if the -msse2 option is used. The downside of course
> is that the code will no longer run on CPUs that are old enough to vote.
>

For this reason, we build i386 with gcc starting with version 10.6. the CFLAGS+=--msse2 was not realiable for all CPU:s since not all i386 CPU:s support SSE2.

We had one report of a user who had SSE2 flag still on (int /etc/make.conf) when building, and got the same problem. [https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236025 <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236025>]

> This is only a problem on clang because gcc has other options we can use
> to force working infinity tests.
>
> You can check whether your CPU supports SSE2 by looking at the Features=
> line in /var/run/dmesg.boot. It seems unlikely that it does not, because
> SSE2 was introduced in 2000 with the Pentium 4.
>
> --
> Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2019-03-07 19:30:42 Re: Too many Row Exclusive Locks held for a long time
Previous Message Andrew Gierth 2019-03-07 17:20:42 Re: Upgrade 10.5->10.6 : db crash BUS ERROR (sig 10), reproducible