pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Turelinckx <tom@turelinckx.be>
To: 'Alvaro Herrera' <alvherre@2ndquadrant.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Bus error in formatting.c NUM_numpart_to_char (9.4.12, 9.6.3, sparc)
Date: Thu, 22 Jun 2017 15:49:27 +0200
Message-ID: <000001d2eb5e$5e3f36e0$1abda4a0$@turelinckx.be> (raw)
In-Reply-To: <20170621154447.eazyyleirccpofju@alvherre.pgsql>
References: <006b01d2eaa2$d4317be0$7c9473a0$@turelinckx.be>
	<20170621154447.eazyyleirccpofju@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Alvaro Herrera wrote:

> You're probably misreading the git log, because this code was touched
> just before 9.4.9.  See commit
> https://git.postgresql.org/pg/commitdiff/20f870fd7cab8446c208a4a9cfa5ec2a441ef69c

Thanks for the pointer! When I reverse patch that commit against 9.4.12 it builds successfully and passes all tests.

Against the original 9.4.12, only the numeric and sanity check tests fail. Depending on the run, various other tests appear to fail, but those failures are caused by the numeric test crashing the backend and the tests being run in parallel:

WARNING:  terminating connection because of crash of another server process
DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.

I've verified that 10~beta1 also fails the numeric test:

Reading symbols from /home/turelto/src/original/postgresql-10-10~beta1/build/src/backend/postgres...done.
[New LWP 20199]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/sparc-linux-gnu/libthread_db.so.1".
Core was generated by `postgres: turelto regression [local] SELECT                                   '.
Program terminated with signal 10, Bus error.
#0  NUM_numpart_to_char (id=3, Np=0xffd22aa4)
    at /home/turelto/src/original/postgresql-10-10~beta1/build/../src/backend/utils/adt/formatting.c:4471
4471                            if (Np->Num->lsign == NUM_LSIGN_PRE)
(gdb) l
4466                    (Np->num_curr >= Np->out_pre_spaces || (IS_ZERO(Np->Num) && Np->Num->zero_start == Np->num_curr)) &&
4467                    (IS_PREDEC_SPACE(Np) == FALSE || (Np->last_relevant && *Np->last_relevant == '.')))
4468            {
4469                    if (IS_LSIGN(Np->Num))
4470                    {
4471                            if (Np->Num->lsign == NUM_LSIGN_PRE)
4472                            {
4473                                    if (Np->sign == '-')
4474                                            strcpy(Np->inout_p, Np->L_negative_sign);
4475                                    else

When I reverse patch the above commit against 10~beta1 it also builds successfully and passes all tests.

When I reverse patch the above commit against 9.6.3 it passes the numeric test, but (still) fails the object_address test:

******** build/src/test/regress/regression.diffs ********
inline patch 1: /home/turelto/src/tmp/postgresql-9.6-9.6.3/build/src/test/regress/results/object_address.out (+3/-3 lines) download inline-1.patch*** /home/turelto/src/tmp/postgresql-9.6-9.6.3/build/../src/test/regress/expected/object_address.out 2017-05-08 23:15:12.000000000 +0200 --- /home/turelto/src/tmp/postgresql-9.6-9.6.3/build/src/test/regress/results/object_address.out 2017-06-22 11:11:23.000000000 +0200 *************** *** 263,273 **** WARNING: error for policy,{eins,zwei,drei},{}: schema "eins" does not exist WARNING: error for policy,{eins,zwei,drei},{integer}: schema "eins" does not exist WARNING: error for user mapping,{eins},{}: argument list length must be exactly 1 ! WARNING: error for user mapping,{eins},{integer}: user mapping for user "eins" on server "integer" does not exist WARNING: error for user mapping,{addr_nsp,zwei},{}: argument list length must be exactly 1 ! WARNING: error for user mapping,{addr_nsp,zwei},{integer}: user mapping for user "addr_nsp" on server "integer" does not exist WARNING: error for user mapping,{eins,zwei,drei},{}: argument list length must be exactly 1 ! WARNING: error for user mapping,{eins,zwei,drei},{integer}: user mapping for user "eins" on server "integer" does not exist WARNING: error for default acl,{eins},{}: argument list length must be exactly 1 WARNING: error for default acl,{eins},{integer}: unrecognized default ACL object type i WARNING: error for default acl,{addr_nsp,zwei},{}: argument list length must be exactly 1 --- 263,273 ---- WARNING: error for policy,{eins,zwei,drei},{}: schema "eins" does not exist WARNING: error for policy,{eins,zwei,drei},{integer}: schema "eins" does not exist WARNING: error for user mapping,{eins},{}: argument list length must be exactly 1 ! WARNING: error for user mapping,{eins},{integer}: user mapping for user "(null)" on server "integer" does not exist WARNING: error for user mapping,{addr_nsp,zwei},{}: argument list length must be exactly 1 ! WARNING: error for user mapping,{addr_nsp,zwei},{integer}: user mapping for user "(null)" on server "integer" does not exist WARNING: error for user mapping,{eins,zwei,drei},{}: argument list length must be exactly 1 ! WARNING: error for user mapping,{eins,zwei,drei},{integer}: user mapping for user "(null)" on server "integer" does not exist WARNING: error for default acl,{eins},{}: argument list length must be exactly 1 WARNING: error for default acl,{eins},{integer}: unrecognized default ACL object type i WARNING: error for default acl,{addr_nsp,zwei},{}: argument list length must be exactly 1
====================================================================== The failing user mapping-related tests were introduced in commit 890192e (which is not in 9.4), and may have been resolved by commit 8b6d6cf (which is in 10~beta1). Best regards, Tom Turelinckx -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs

view thread (14+ messages)  latest in thread

Message-ID: <000001d2eb5e$5e3f36e0$1abda4a0$@turelinckx.be>
Permalink:  ../000001d2eb5e$5e3f36e0$1abda4a0$@turelinckx.be/
Also on:    postgresql.org/message-id/000001d2eb5e$5e3f36e0$1abda4a0$@turelinckx.be

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tom@turelinckx.be, alvherre@2ndquadrant.com
  Subject: Re: Bus error in formatting.c NUM_numpart_to_char (9.4.12, 9.6.3, sparc)
  In-Reply-To: <000001d2eb5e$5e3f36e0$1abda4a0$@turelinckx.be>
  References: <006b01d2eaa2$d4317be0$7c9473a0$@turelinckx.be> <20170621154447.eazyyleirccpofju@alvherre.pgsql> <000001d2eb5e$5e3f36e0$1abda4a0$@turelinckx.be>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox