Thread: BUG #15133: make check fails

BUG #15133: make check fails

From
PG Bug reporting form
Date:
The following bug has been logged on the website:

Bug reference:      15133
Logged by:          Stefan Krüger
Email address:      stadtkind2@gmx.de
PostgreSQL version: 10.3
Operating system:   Solaris 11.4 Beta
Description:

$ make check
...
test errors                   ... FAILED (test process exited with exit code
2)
test select                   ... FAILED (test process exited with exit code
2)
parallel group (20 tests):  select_implicit select_having select_distinct
select_into union select_distinct_on case subselect join aggregates
transactions arrays hash_index portals btree_index update prepared_xacts
namespace delete random
     select_into              ... FAILED (test process exited with exit code
2)
     select_distinct          ... FAILED (test process exited with exit code
2)
     select_distinct_on       ... FAILED (test process exited with exit code
2)
     select_implicit          ... FAILED (test process exited with exit code
2)
     select_having            ... FAILED (test process exited with exit code
2)
     subselect                ... FAILED (test process exited with exit code
2)
     union                    ... FAILED (test process exited with exit code
2)
     case                     ... FAILED (test process exited with exit code
2)
     join                     ... FAILED (test process exited with exit code
2)
     aggregates               ... FAILED (test process exited with exit code
2)
     transactions             ... FAILED (test process exited with exit code
2)
     random                   ... failed (ignored) (test process exited with
exit code 2)
     portals                  ... FAILED (test process exited with exit code
2)
     arrays                   ... FAILED (test process exited with exit code
2)
     btree_index              ... FAILED (test process exited with exit code
2)
     hash_index               ... FAILED (test process exited with exit code
2)
     update                   ... FAILED (test process exited with exit code
2)
     namespace                ... FAILED (test process exited with exit code
2)
     prepared_xacts           ... FAILED (test process exited with exit code
2)
     delete                   ... FAILED (test process exited with exit code
2)
parallel group (17 tests):  gin brin spgist privileges gist init_privs
security_label collate replica_identity rowsecurity matview lock tablesample
object_address groupingsets drop_operator password
     brin                     ... FAILED (test process exited with exit code
2)
     gin                      ... FAILED (test process exited with exit code
2)
     gist                     ... FAILED (test process exited with exit code
2)
     spgist                   ... FAILED (test process exited with exit code
2)
     privileges               ... FAILED (test process exited with exit code
2)
     init_privs               ... FAILED (test process exited with exit code
2)
     security_label           ... FAILED (test process exited with exit code
2)
     collate                  ... FAILED (test process exited with exit code
2)
     matview                  ... FAILED (test process exited with exit code
2)
     lock                     ... FAILED (test process exited with exit code
2)
     replica_identity         ... FAILED (test process exited with exit code
2)
     rowsecurity              ... FAILED (test process exited with exit code
2)
     object_address           ... FAILED (test process exited with exit code
2)
     tablesample              ... FAILED (test process exited with exit code
2)
     groupingsets             ... FAILED (test process exited with exit code
2)
     drop_operator            ... FAILED (test process exited with exit code
2)
     password                 ... FAILED (test process exited with exit code
2)
parallel group (11 tests):  alter_operator psql alter_generic misc async
dbsize tsrf misc_functions sysviews stats_ext tidscan
     alter_generic            ... FAILED (test process exited with exit code
2)
     alter_operator           ... FAILED (test process exited with exit code
2)
     misc                     ... FAILED (test process exited with exit code
2)
     psql                     ... FAILED (test process exited with exit code
2)
     async                    ... FAILED (test process exited with exit code
2)
     dbsize                   ... FAILED (test process exited with exit code
2)
     misc_functions           ... FAILED (test process exited with exit code
2)
     sysviews                 ... FAILED (test process exited with exit code
2)
     tsrf                     ... FAILED (test process exited with exit code
2)
     tidscan                  ... FAILED (test process exited with exit code
2)
     stats_ext                ... FAILED (test process exited with exit code
2)
parallel group (3 tests):  rules psql_crosstab amutils
     rules                    ... FAILED (test process exited with exit code
2)
     psql_crosstab            ... FAILED (test process exited with exit code
2)
     amutils                  ... FAILED (test process exited with exit code
2)
test select_parallel          ... FAILED (test process exited with exit code
2)
parallel group (2 tests):  publication subscription
     publication              ... FAILED (test process exited with exit code
2)
     subscription             ... FAILED (test process exited with exit code
2)
parallel group (20 tests):  select_views cluster foreign_key portals_p2
combocid tsdicts guc dependency bitmapops foreign_data xmlmap window tsearch
functional_deps json_encoding advisory_lock indirect_toast jsonb json
equivclass
     select_views             ... FAILED (test process exited with exit code
2)
     portals_p2               ... FAILED (test process exited with exit code
2)
     foreign_key              ... FAILED (test process exited with exit code
2)
     cluster                  ... FAILED (test process exited with exit code
2)
     dependency               ... FAILED (test process exited with exit code
2)
     guc                      ... FAILED (test process exited with exit code
2)
     bitmapops                ... FAILED (test process exited with exit code
2)
     combocid                 ... FAILED (test process exited with exit code
2)
     tsearch                  ... FAILED (test process exited with exit code
2)
     tsdicts                  ... FAILED (test process exited with exit code
2)
     foreign_data             ... FAILED (test process exited with exit code
2)
     window                   ... FAILED (test process exited with exit code
2)
     xmlmap                   ... FAILED (test process exited with exit code
2)
     functional_deps          ... FAILED (test process exited with exit code
2)
     advisory_lock            ... FAILED (test process exited with exit code
2)
     json                     ... FAILED (test process exited with exit code
2)
     jsonb                    ... FAILED (test process exited with exit code
2)
     json_encoding            ... FAILED (test process exited with exit code
2)
     indirect_toast           ... FAILED (test process exited with exit code
2)
     equivclass               ... FAILED (test process exited with exit code
2)
parallel group (19 tests):  limit plancache copy2 plpgsql domain rangefuncs
temp conversion prepare sequence alter_table polymorphism without_oid
truncate returning largeobject rowtypes with xml
     plancache                ... FAILED (test process exited with exit code
2)
     limit                    ... FAILED (test process exited with exit code
2)
     plpgsql                  ... FAILED (test process exited with exit code
2)
     copy2                    ... FAILED (test process exited with exit code
2)
     temp                     ... FAILED (test process exited with exit code
2)
     domain                   ... FAILED (test process exited with exit code
2)
     rangefuncs               ... FAILED (test process exited with exit code
2)
     prepare                  ... FAILED (test process exited with exit code
2)
     without_oid              ... FAILED (test process exited with exit code
2)
     conversion               ... FAILED (test process exited with exit code
2)
     truncate                 ... FAILED (test process exited with exit code
2)
     alter_table              ... FAILED (test process exited with exit code
2)
     sequence                 ... FAILED (test process exited with exit code
2)
     polymorphism             ... FAILED (test process exited with exit code
2)
     rowtypes                 ... FAILED (test process exited with exit code
2)
     returning                ... FAILED (test process exited with exit code
2)
     largeobject              ... FAILED (test process exited with exit code
2)
     with                     ... FAILED (test process exited with exit code
2)
     xml                      ... FAILED (test process exited with exit code
2)
...
 95 of 178 tests failed, 1 of these failures ignored.


Here's the core dump information:

$ mdb ./src/backend/postgres ./src/test/regress/tmp_check/data/core
postgres:core> ::status
debugging core file of postgres (64-bit) from solaris
file: src/backend/postgres
initial argv: postgres -D
/tmp/postgresql-10.3/src/test/regress/./tmp_check/data -F -c listen
threading model: raw lwps
status: process terminated by SIGABRT (Abort), pid=7312 uid=12273 code=-1
postgres:core> $C
ffffffe0b0839b41 libc.so.1`__lwp_sigqueue+8(6, ffffffffffffffec,
ffffffe0b083a3e0, 5, 0, 0)
ffffffe0b0839bf1 libc.so.1`abort+0xfc(1, 1210, 0, 1000, 1fff248d83b830,
1fff248d83b730)
ffffffe0b0839cd1 libc.so.1`adistack_clear_stack_impl+0x178(ffffffe0b083a640,
ffffffe0b0a362e1, 0, 0,
ffffffe0b08d1f31, 1)
ffffffe0b0839d81
libc.so.1`adistack_clear_stack%sun4v-adi+0x70(ffffffe0b0a360e1, 1,
ffffffe0b0a360e1, 1, 0,
ffffffe0b083acc0)
ffffffe0b083a131 libc.so.1`setcontext+0x4c(ffffffe0b083ad80,
ffffffe0b083ad78, 1fff248f2a2a40, 1fff248d828000,
ffffffe0b083a9e0, 1)
ffffffe0b083a4c1 libc.so.1`siglongjmp+0x144(ffffffe0b0a369c8, 1, 1,
ffffffe0b0a362e1, ffffffe0b0a368e0,
ffffffe0b083ad80)
ffffffe0b083a861 postgres`pg_re_throw+0x50(0, 1fff248eeaa958,
30000034b26db478, 2f000000, 2f, 8080808080808080)
ffffffe0b083a921 postgres`errfinish+0x260(0, 0, 0, 1fff248dfa8960, 0,
20000034b4a85be0)
ffffffe0b083aa21 check_stack_depth+0x114(20000034b4a86320, 20000034b4a86520,
20000034b4a865a0, 0, 800000, 0)
ffffffe0b083aaf1 transformExprRecurse+0x44(20000034b4a865a0,
20000034b4a86320, 0, 0, 0, 0)
ffffffe0b083ac41 transformExpr+0x50(20000034b4a865a0, 20000034b4a86320, d,
110, 101010100000000, 1010101)
ffffffe0b083ad31 transformTargetEntry+0x98(20000034b4a865a0,
20000034b4a86320, 0, d, 0, 0)
ffffffe0b083ae31 transformTargetList+0x1e4(20000034b4a865a0,
20000034b4a863e0, d, 1fff248ed31360, 0, 29)
ffffffe0b083af41 transformSelectStmt+0x250(20000034b4a865a0,
20000034b4a86410, 20000034b4a86410, 110,
20000034b4a85cc8, 20000034b4a85df0)
ffffffe0b083b0a1 transformStmt+0x1b4(20000034b4a865a0, 20000034b4a86410,
20000034b4a86410, 1fff248ed31360, ff00
, 8080808080808080)
ffffffe0b083b191 transformOptionalSelectInto+0x164(20000034b4a865a0,
20000034b4a86410, 20000034b4a865a0,
1fff248ed31360, 1, 20000034b4a85be0)
ffffffe0b083b281 transformTopLevelStmt+0x40(20000034b4a865a0,
20000034b4a86520, 20000034b4a865a0, 0, 800000, 0)
ffffffe0b083b361 inline_function+0x4fc(7972, 17, 0, 0, 0, 0)
ffffffe0b083b541 simplify_function+0x30c(7972, 17, ffffffffffffffff, 0, 0,
ffffffe0b083c3a8)
ffffffe0b083b6b1 eval_const_expressions_mutator+0x544(40000034b4f7e880,
ffffffe0b083d710, 1fff248e7786a0,
40000034b4f7e900, 0, 40000034b4f7eed8)
ffffffe0b083bbd1 expression_tree_mutator+0x1248(40000034b4f7e8d0,
1fff248e7786a0, ffffffe0b083d710,
ffffffe0b083d710, 0, 40000034b4f7dc68)
ffffffe0b083bff1 eval_const_expressions_mutator+0x2afc(40000034b4f7e8d0,
ffffffe0b083d710, ffffffe0b083d710,
1fff248e7786a0, 1, 40000034b4f7dd20)
ffffffe0b083c511 expression_tree_mutator+0x140c(40000034b4f7e940,
1fff248e7786a0, ffffffe0b083d710,
ffffffe0b083d710, 40000034b4f7dc00, 0)
ffffffe0b083c931 eval_const_expressions_mutator+0x2afc(40000034b4f7e940,
ffffffe0b083d710, 40000034b4f7ec88,
210, 1, 1)
ffffffe0b083ce51 eval_const_expressions+0x70(40000034b4f7ec98,
40000034b4f7e940, 40000034b4f7e940, 0, 0, 0)
ffffffe0b083cf51 preprocess_expression+0xc8(40000034b4f7ec98,
40000034b4f7e940, 1, 40000034b4f7ee18, 0, 0)
ffffffe0b083d031 subquery_planner+0x3a4(40000034b4f7ec08, 40000034b4f7e720,
0, 0, ffffffffffffffff, 0)
ffffffe0b083d1b1 standard_planner+0x364(40000034b4f7e720, 100, 0, 0, 0,
40000034b4f7de60)
ffffffe0b083d311 planner+0xb4(40000034b4f7e720, 100, 0, 40000034b4f7eba0, 0,
40000034b4f7dc68)
ffffffe0b083d401 pg_plan_query+0x8c(40000034b4f7e720, 100, 0,
1fff248e548480, 1, 40000034b4f7dd20)
ffffffe0b083d4e1 init_execution_state+0x170(40000034b4f7ea60,
40000034b4f7dbc8, 1, 1, 40000034b4f7dc00, 0)
ffffffe0b083d631 init_sql_fcache+0x5f0(50000034b4f762b8, 0, 1, 1, 1, 1)
ffffffe0b083d7c1 fmgr_sql+0x2b8(50000034b4f76308, 1fff248e54a0c0, 1, 1, 0,
30000034b3a99070)
ffffffe0b083d911 ExecInterpExpr+0x7e8(50000034b4f76230, 50000034b4f75f28,
ffffffe0b083e5b7, 50000034b4f75f28,
ffffffe0b083e5b7, 1fff248e500490)
ffffffe0b083dc01 ExecEvalExprSwitchContext+0x6c(50000034b4f76230,
50000034b4f75f28, ffffffe0b083e5b7, 1, 1, 1)
ffffffe0b083dcf1 ExecProject+0x5c(50000034b4f76228, 50000034b4f75e18,
50000034b4f75e18, 1, 0, 30000034b3a98fb0)
ffffffe0b083dde1 ExecResult+0x168(50000034b4f75e18, 1fff248e5bca70,
50000034b4f75e18, 10, 1fff248d828000, 0)
ffffffe0b083ded1 ExecProcNodeFirst+0x70(50000034b4f75e18, 1fff248e52c6c0,
50000034b4f75e18, 1fff248ed31360,
1fff248df88480, 0)
ffffffe0b083dfa1 ExecProcNode+0x48(50000034b4f75e18, 50000034b4f75c08,
30000034b4f6fac0, 10, 800000, 0)
ffffffe0b083e071 ExecutePlan+0xe8(50000034b4f75c08, 50000034b4f75e18, 0, 1,
1, 1)
ffffffe0b083e181 standard_ExecutorRun+0x214(30000034b4f6fac0, 1, 1, 1, 0,
30000034b3a99070)
ffffffe0b083e2c1 ExecutorRun+0xc4(30000034b4f6fac0, 1, 1, 1,
30000034b4f6fb50, 0)
ffffffe0b083e3a1 postquel_getnext+0x13c(30000034b4f6fa40, 30000034b4f6dbc8,
30000034b4f6dbc8, 1, 1, 1)
ffffffe0b083e4b1 fmgr_sql+0x530(80000034b4f66308, 1fff248e54a0c0, 1, 1, 0,
30000034b3a98fb0)
...


Re: BUG #15133: make check fails

From
Alvaro Herrera
Date:
PG Bug reporting form wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      15133
> Logged by:          Stefan Krüger
> Email address:      stadtkind2@gmx.de
> PostgreSQL version: 10.3
> Operating system:   Solaris 11.4 Beta
> Description:        

I'm not sure of the support status for Solaris 11.  We don't have any
buildfarm member for that, much less the 11.4 beta.  Maybe this is a
problem in the OS, or the compiler?  I can't see siglongjmp() failing in
this way being a Postgres bug, frankly ...

> Here's the core dump information:
> 
> $ mdb ./src/backend/postgres ./src/test/regress/tmp_check/data/core
> postgres:core> ::status
> debugging core file of postgres (64-bit) from solaris
> file: src/backend/postgres
> initial argv: postgres -D
> /tmp/postgresql-10.3/src/test/regress/./tmp_check/data -F -c listen
> threading model: raw lwps
> status: process terminated by SIGABRT (Abort), pid=7312 uid=12273 code=-1
> postgres:core> $C
> ffffffe0b0839b41 libc.so.1`__lwp_sigqueue+8(6, ffffffffffffffec, ffffffe0b083a3e0, 5, 0, 0)
> ffffffe0b0839bf1 libc.so.1`abort+0xfc(1, 1210, 0, 1000, 1fff248d83b830, 1fff248d83b730)
> ffffffe0b0839cd1 libc.so.1`adistack_clear_stack_impl+0x178(ffffffe0b083a640, ffffffe0b0a362e1, 0, 0,
ffffffe0b08d1f31,1)
 
> ffffffe0b0839d81 libc.so.1`adistack_clear_stack%sun4v-adi+0x70(ffffffe0b0a360e1, 1, ffffffe0b0a360e1, 1, 0,
ffffffe0b083acc0)
> ffffffe0b083a131 libc.so.1`setcontext+0x4c(ffffffe0b083ad80, ffffffe0b083ad78, 1fff248f2a2a40, 1fff248d828000,
ffffffe0b083a9e0,1)
 
> ffffffe0b083a4c1 libc.so.1`siglongjmp+0x144(ffffffe0b0a369c8, 1, 1, ffffffe0b0a362e1, ffffffe0b0a368e0,
ffffffe0b083ad80)
> ffffffe0b083a861 postgres`pg_re_throw+0x50(0, 1fff248eeaa958, 30000034b26db478, 2f000000, 2f, 8080808080808080)
> ffffffe0b083a921 postgres`errfinish+0x260(0, 0, 0, 1fff248dfa8960, 0, 20000034b4a85be0)
> ffffffe0b083aa21 check_stack_depth+0x114(20000034b4a86320, 20000034b4a86520, 20000034b4a865a0, 0, 800000, 0)
> ffffffe0b083aaf1 transformExprRecurse+0x44(20000034b4a865a0, 20000034b4a86320, 0, 0, 0, 0)
> ffffffe0b083ac41 transformExpr+0x50(20000034b4a865a0, 20000034b4a86320, d, 110, 101010100000000, 1010101)
> ffffffe0b083ad31 transformTargetEntry+0x98(20000034b4a865a0, 20000034b4a86320, 0, d, 0, 0)

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Re: BUG #15133: make check fails

From
Tom Lane
Date:
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> I'm not sure of the support status for Solaris 11.  We don't have any
> buildfarm member for that, much less the 11.4 beta.  Maybe this is a
> problem in the OS, or the compiler?  I can't see siglongjmp() failing in
> this way being a Postgres bug, frankly ...

I think the key thing in this stack trace is

>> ffffffe0b083a921 postgres`errfinish+0x260(0, 0, 0, 1fff248dfa8960, 0, 20000034b4a85be0)
>> ffffffe0b083aa21 check_stack_depth+0x114(20000034b4a86320, 20000034b4a86520, 20000034b4a865a0, 0, 800000, 0)
>> ffffffe0b083aaf1 transformExprRecurse+0x44(20000034b4a865a0, 20000034b4a86320, 0, 0, 0, 0)

That is, we died while trying to throw an error out of check_stack_depth,
which suggests that we were in recursion trouble.  Either that or
something's broken about the stack depth test.  The most plausible theory
about why siglongjmp failed is that it SIGSEGV'd against the end of the
stack, which would also imply something's broken about the stack depth
test, because it ought to trigger well before we actually run out of
stack.

Does Solaris even have getrlimit(RLIMIT_STACK)?  If so, does it tell the
truth on this beta version?

It'd be interesting to know which regression test query failed.  If it was
anything other than the intentional infinite_recurse call, then there's
something else wrong too.

            regards, tom lane


Re: BUG #15133: make check fails

From
Alvaro Herrera
Date:
Tom Lane wrote:

> It'd be interesting to know which regression test query failed.  If it was
> anything other than the intentional infinite_recurse call, then there's
> something else wrong too.

They *all* fail with a crash, according to the original post.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Re: BUG #15133: make check fails

From
Andres Freund
Date:
On 2018-03-28 12:37:31 -0300, Alvaro Herrera wrote:
> Tom Lane wrote:
> 
> > It'd be interesting to know which regression test query failed.  If it was
> > anything other than the intentional infinite_recurse call, then there's
> > something else wrong too.
> 
> They *all* fail with a crash, according to the original post.

That could just be the consequence of trying to establish a connection
while recovery is ongoing.

Greetings,

Andres Freund


Re: BUG #15133: make check fails

From
Alvaro Herrera
Date:
Andres Freund wrote:
> On 2018-03-28 12:37:31 -0300, Alvaro Herrera wrote:
> > Tom Lane wrote:
> > 
> > > It'd be interesting to know which regression test query failed.  If it was
> > > anything other than the intentional infinite_recurse call, then there's
> > > something else wrong too.
> > 
> > They *all* fail with a crash, according to the original post.
> 
> That could just be the consequence of trying to establish a connection
> while recovery is ongoing.

You're right.  (Also: I hadn't noticed that the OP elided the lines
with tests reporting "ok").

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Re: BUG #15133: make check fails

From
Stefan Krüger
Date:
On Wed, 28 Mar 2018, Tom Lane wrote:

>Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
>> I'm not sure of the support status for Solaris 11.  We don't have any
>> buildfarm member for that, much less the 11.4 beta.  Maybe this is a
>> problem in the OS, or the compiler?  I can't see siglongjmp() failing in
>> this way being a Postgres bug, frankly ...
>
>I think the key thing in this stack trace is
>
>>> ffffffe0b083a921 postgres`errfinish+0x260(0, 0, 0, 1fff248dfa8960, 0, 20000034b4a85be0)
>>> ffffffe0b083aa21 check_stack_depth+0x114(20000034b4a86320, 20000034b4a86520, 20000034b4a865a0, 0, 800000, 0)
>>> ffffffe0b083aaf1 transformExprRecurse+0x44(20000034b4a865a0, 20000034b4a86320, 0, 0, 0, 0)
>
>That is, we died while trying to throw an error out of check_stack_depth,
>which suggests that we were in recursion trouble.  Either that or
>something's broken about the stack depth test.  The most plausible theory
>about why siglongjmp failed is that it SIGSEGV'd against the end of the
>stack, which would also imply something's broken about the stack depth
>test, because it ought to trigger well before we actually run out of
>stack.
>
>Does Solaris even have getrlimit(RLIMIT_STACK)?  If so, does it tell the
>truth on this beta version?
>
>It'd be interesting to know which regression test query failed.  If it was
>anything other than the intentional infinite_recurse call, then there's
>something else wrong too.
>
>            regards, tom lane

Seems like I had ADI protection for stack on when building postgres 10.3...

https://swisdev.oracle.com/_files/What-Is-ADI.html

I get "All 178 tests passed." when ADI stack protection is off.