pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
REL_13_STABLE Windows 10 Regression Failures
9+ messages / 5 participants
[nested] [flat]

Commits from this thread:
  2021-03-15 146cb3889c  Work around issues in MinGW-64's setjmp/longjmp support.
* REL_13_STABLE Windows 10 Regression Failures
@ 2020-10-30 17:05 Heath Lord <heath.lord@crunchydata.com>
  2020-10-30 17:25 ` Re: REL_13_STABLE Windows 10 Regression Failures Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 9+ messages in thread

From: Heath Lord @ 2020-10-30 17:05 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org

All,

I have been investigating an odd Windows regression failure that I encountered.

When building from source on a Windows 10 VM using MinGW (8.1.0), I
get a random number of regression failures off the REL_13_STABLE
branch.  I debugged this a little bit and found out that the "random"
number of failures is fully dependent on the machine and if I disable
the "stats_ext.sql" regression test; all other tests pass without
issue. When the "stats_ext.sql" regression test runs, it causes a
database exception and PostgreSQL crashes.  This is why the number of
regression failures is random: it depends upon the speed of the
machine that is running them.  However, this behavior is not seen when
building off of master.

I did some digging and determined that on the REL_13_STABLE branch
this instability was introduced with this commit
"b380484a850b6bf7d9fc0d85c555a2366e38451f"[1]. This corresponds to
commit "19f5a37b9fc48a12c77edafb732543875da2f4a3"[1] on master. I
worked backwards from there to determine when the regressions stopped
failing and determined that with commit
"be0a6666656ec3f68eb7d8e7abab5139fcd47012"[2] the regression tests are
no longer failing.

I then checked out REL_13_STABLE and cherry picked the
"be0a6666656ec3f68eb7d8e7abab5139fcd47012" commit and ran a clean full
build of postgres.  This build ran through with no issues and passed
all 200 tests.

I have also built using REL_12_STABLE and earlier with no regression failures.

This failure also does not seem to occur on a Server 2016 based system
as the buildfarm machines that run these builds do not see this
regression failure.  I have not fully investigated why it appears to
be confined to Windows 10 or what the issue is that causes the PG
database to die during regression.

I was hoping that I could get commit
"be0a6666656ec3f68eb7d8e7abab5139fcd47012" backpatched to the
REL_13_STABLE branch so these regression failures would be resolved.

Thanks,
   Heath





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: REL_13_STABLE Windows 10 Regression Failures
  2020-10-30 17:05 REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
@ 2020-10-30 17:25 ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-10-30 19:47   ` Re: REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Tom Lane @ 2020-10-30 17:25 UTC (permalink / raw)
  To: Heath Lord <heath.lord@crunchydata.com>; +Cc: pgsql-bugs@lists.postgresql.org

Heath Lord <heath.lord@crunchydata.com> writes:
> When building from source on a Windows 10 VM using MinGW (8.1.0), I
> get a random number of regression failures off the REL_13_STABLE
> branch.  I debugged this a little bit and found out that the "random"
> number of failures is fully dependent on the machine and if I disable
> the "stats_ext.sql" regression test; all other tests pass without
> issue. When the "stats_ext.sql" regression test runs, it causes a
> database exception and PostgreSQL crashes.

Hmph ... it's weird that we have not seen this in the buildfarm.
Have you tried to extract any info from the crash, like a stack trace?

> I did some digging and determined that on the REL_13_STABLE branch
> this instability was introduced with this commit
> "b380484a850b6bf7d9fc0d85c555a2366e38451f"[1]. This corresponds to
> commit "19f5a37b9fc48a12c77edafb732543875da2f4a3"[1] on master. I
> worked backwards from there to determine when the regressions stopped
> failing and determined that with commit
> "be0a6666656ec3f68eb7d8e7abab5139fcd47012"[2] the regression tests are
> no longer failing.

I'm having a hard time believing that b380484a8 would have introduced
a portability problem, and an even harder time believing that be0a66666
would have resolved it if so.  What seems more likely is that there's
some underlying issue such as a memory stomp, that the first commit
accidentally exposed and the second one accidentally hid again.
So, even if back-patching be0a66666 seemed feasible from a stability
standpoint (which I don't think it is), I fear it'd just mask a problem
that would eventually bite us again.

So I think we need to dig down and try to identify the root cause,
without any preconceptions about how to fix it.  Again, a stack trace
would be pretty useful.  Or at least some info about which step of
stats_ext.sql is crashing.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: REL_13_STABLE Windows 10 Regression Failures
  2020-10-30 17:05 REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-10-30 17:25 ` Re: REL_13_STABLE Windows 10 Regression Failures Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-10-30 19:47   ` Heath Lord <heath.lord@crunchydata.com>
  2020-11-09 17:07     ` Re: REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Heath Lord @ 2020-10-30 19:47 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@lists.postgresql.org

Tom,
   We are working to set up our environment to allow us to get a stack
trace as we do not have any of the Visual Studios stuff installed
right now.  However, I thought I would send you a little more
information while we are trying to get that working.
   Going through the stats_ext.sql file line by line with a freshly
built REL_13_STABLE database stood up we have determined that running
any of the following commands back to back will cause the database to
crash:

CREATE STATISTICS tst ON relnatts + relpages FROM pg_class;
CREATE STATISTICS tst ON (relpages, reltuples) FROM pg_class;

  If you run another command in between them like:

SELECT version();

  Then it will not crash when you run either of those commands again.
However if you run any combination of those 2 commands back to back it
will crash the database.  The output from the psql instance after
stepping through the stats_ext.sql file is in the
stats_ext_psql_output.txt file attached.

  The information from the postgres logfile for the above is attached
in the pg_logfile_output.txt file.

   Hopefully, this will at least give you some information while we
are working on getting the backtrace.  Thanks.

-Heath

On Fri, Oct 30, 2020 at 1:25 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Heath Lord <heath.lord@crunchydata.com> writes:
> > When building from source on a Windows 10 VM using MinGW (8.1.0), I
> > get a random number of regression failures off the REL_13_STABLE
> > branch.  I debugged this a little bit and found out that the "random"
> > number of failures is fully dependent on the machine and if I disable
> > the "stats_ext.sql" regression test; all other tests pass without
> > issue. When the "stats_ext.sql" regression test runs, it causes a
> > database exception and PostgreSQL crashes.
>
> Hmph ... it's weird that we have not seen this in the buildfarm.
> Have you tried to extract any info from the crash, like a stack trace?
>
> > I did some digging and determined that on the REL_13_STABLE branch
> > this instability was introduced with this commit
> > "b380484a850b6bf7d9fc0d85c555a2366e38451f"[1]. This corresponds to
> > commit "19f5a37b9fc48a12c77edafb732543875da2f4a3"[1] on master. I
> > worked backwards from there to determine when the regressions stopped
> > failing and determined that with commit
> > "be0a6666656ec3f68eb7d8e7abab5139fcd47012"[2] the regression tests are
> > no longer failing.
>
> I'm having a hard time believing that b380484a8 would have introduced
> a portability problem, and an even harder time believing that be0a66666
> would have resolved it if so.  What seems more likely is that there's
> some underlying issue such as a memory stomp, that the first commit
> accidentally exposed and the second one accidentally hid again.
> So, even if back-patching be0a66666 seemed feasible from a stability
> standpoint (which I don't think it is), I fear it'd just mask a problem
> that would eventually bite us again.
>
> So I think we need to dig down and try to identify the root cause,
> without any preconceptions about how to fix it.  Again, a stack trace
> would be pretty useful.  Or at least some info about which step of
> stats_ext.sql is crashing.
>
>                         regards, tom lane

Attachments:

pg_logfile_output.txt (text/plain, 3.2K) download 2020-10-30 12:16:29.443 PDT [1260] LOG: starting PostgreSQL 13.0 on x86_64-w64-mingw32, compiled by x86_64-w64-mingw32-gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0, 64-bit^M 2020-10-30 12:16:29.461 PDT [1260] LOG: listening on IPv6 address "::1", port 5432^M 2020-10-30 12:16:29.461 PDT [1260] LOG: listening on IPv4 address "127.0.0.1", port 5432^M 2020-10-30 12:16:29.597 PDT [5768] LOG: database system was shut down at 2020-10-30 12:15:43 PDT 2020-10-30 12:16:29.637 PDT [1260] LOG: database system is ready to accept connections^M 2020-10-30 12:16:52.268 PDT [4116] ERROR: syntax error at or near ";" at character 22 2020-10-30 12:16:52.268 PDT [4116] STATEMENT: CREATE STATISTICS tst; 2020-10-30 12:16:52.293 PDT [4116] ERROR: syntax error at or near ";" at character 30 2020-10-30 12:16:52.293 PDT [4116] STATEMENT: CREATE STATISTICS tst ON a, b; 2020-10-30 12:16:52.337 PDT [4116] ERROR: syntax error at or near "FROM" at character 23 2020-10-30 12:16:52.337 PDT [4116] STATEMENT: CREATE STATISTICS tst FROM sometab; 2020-10-30 12:16:52.362 PDT [4116] ERROR: relation "nonexistent" does not exist 2020-10-30 12:16:52.362 PDT [4116] STATEMENT: CREATE STATISTICS tst ON a, b FROM nonexistent; 2020-10-30 12:16:52.386 PDT [4116] ERROR: column "a" does not exist 2020-10-30 12:16:52.386 PDT [4116] STATEMENT: CREATE STATISTICS tst ON a, b FROM pg_class; 2020-10-30 12:16:52.386 PDT [4116] ERROR: duplicate column name in statistics definition 2020-10-30 12:16:52.386 PDT [4116] STATEMENT: CREATE STATISTICS tst ON relname, relname, relnatts FROM pg_class; 2020-10-30 12:16:52.435 PDT [1260] LOG: server process (PID 4116) was terminated by exception 0xC0000028^M 2020-10-30 12:16:52.435 PDT [1260] DETAIL: Failed process was running: CREATE STATISTICS tst ON relnatts + relpages FROM pg_class;^M 2020-10-30 12:16:52.435 PDT [1260] HINT: See C include file "ntstatus.h" for a description of the hexadecimal value.^M 2020-10-30 12:16:52.435 PDT [1260] LOG: terminating any other active server processes^M 2020-10-30 12:16:52.435 PDT [4292] WARNING: terminating connection because of crash of another server process 2020-10-30 12:16:52.435 PDT [4292] 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. 2020-10-30 12:16:52.435 PDT [4292] HINT: In a moment you should be able to reconnect to the database and repeat your command. 2020-10-30 12:16:52.505 PDT [1260] LOG: all server processes terminated; reinitializing^M 2020-10-30 12:16:52.813 PDT [7184] LOG: database system was interrupted; last known up at 2020-10-30 12:16:29 PDT 2020-10-30 12:16:52.832 PDT [3996] FATAL: the database system is in recovery mode 2020-10-30 12:16:53.441 PDT [7184] LOG: database system was not properly shut down; automatic recovery in progress 2020-10-30 12:16:53.441 PDT [7184] LOG: redo starts at 0/17A47E8 2020-10-30 12:16:53.441 PDT [7184] LOG: invalid record length at 0/17AE208: wanted 24, got 0 2020-10-30 12:16:53.441 PDT [7184] LOG: redo done at 0/17AE1A0 2020-10-30 12:16:53.560 PDT [1260] LOG: database system is ready to accept connections^
stats_ext_psql_output.txt (text/plain, 2.0K) download $ psql postgres psql (13.0) WARNING: Console code page (437) differs from Windows code page (1252) 8-bit characters might not work correctly. See psql reference page "Notes for Windows users" for details. Type "help" for help. postgres=# create function check_estimated_rows(text) returns table (estimated int, actual int) postgres-# language plpgsql as postgres-# $$ postgres$# declare postgres$# ln text; postgres$# tmp text[]; postgres$# first_row bool := true; postgres$# begin postgres$# for ln in postgres$# execute format('explain analyze %s', $1) postgres$# loop postgres$# if first_row then postgres$# first_row := false; postgres$# tmp := regexp_match(ln, 'rows=(\d*) .* rows=(\d*)'); postgres$# return query select tmp[1]::int, tmp[2]::int; postgres$# end if; postgres$# end loop; postgres$# end; postgres$# $$; CREATE FUNCTION postgres=# CREATE STATISTICS tst; ERROR: syntax error at or near ";" LINE 1: CREATE STATISTICS tst; ^ postgres=# CREATE STATISTICS tst ON a, b; ERROR: syntax error at or near ";" LINE 1: CREATE STATISTICS tst ON a, b; ^ postgres=# CREATE STATISTICS tst FROM sometab; ERROR: syntax error at or near "FROM" LINE 1: CREATE STATISTICS tst FROM sometab; ^ postgres=# CREATE STATISTICS tst ON a, b FROM nonexistent; ERROR: relation "nonexistent" does not exist postgres=# CREATE STATISTICS tst ON a, b FROM pg_class; ERROR: column "a" does not exist postgres=# CREATE STATISTICS tst ON relname, relname, relnatts FROM pg_class; ERROR: duplicate column name in statistics definition postgres=# CREATE STATISTICS tst ON relnatts + relpages FROM pg_class; server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed.
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: REL_13_STABLE Windows 10 Regression Failures
  2020-10-30 17:05 REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-10-30 17:25 ` Re: REL_13_STABLE Windows 10 Regression Failures Tom Lane <tgl@sss.pgh.pa.us>
  2020-10-30 19:47   ` Re: REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
@ 2020-11-09 17:07     ` Heath Lord <heath.lord@crunchydata.com>
  2020-11-09 17:14       ` Re: REL_13_STABLE Windows 10 Regression Failures Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 1 reply; 9+ messages in thread

From: Heath Lord @ 2020-11-09 17:07 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@lists.postgresql.org

On Fri, Oct 30, 2020 at 3:47 PM Heath Lord <heath.lord@crunchydata.com> wrote:
>
> Tom,
>    We are working to set up our environment to allow us to get a stack
> trace as we do not have any of the Visual Studios stuff installed
> right now.  However, I thought I would send you a little more
> information while we are trying to get that working.
>    Going through the stats_ext.sql file line by line with a freshly
> built REL_13_STABLE database stood up we have determined that running
> any of the following commands back to back will cause the database to
> crash:
>
> CREATE STATISTICS tst ON relnatts + relpages FROM pg_class;
> CREATE STATISTICS tst ON (relpages, reltuples) FROM pg_class;
>
>   If you run another command in between them like:
>
> SELECT version();
>
>   Then it will not crash when you run either of those commands again.
> However if you run any combination of those 2 commands back to back it
> will crash the database.  The output from the psql instance after
> stepping through the stats_ext.sql file is in the
> stats_ext_psql_output.txt file attached.
>
>   The information from the postgres logfile for the above is attached
> in the pg_logfile_output.txt file.
>
>    Hopefully, this will at least give you some information while we
> are working on getting the backtrace.  Thanks.
>
> -Heath
>
> On Fri, Oct 30, 2020 at 1:25 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >
> > Heath Lord <heath.lord@crunchydata.com> writes:
> > > When building from source on a Windows 10 VM using MinGW (8.1.0), I
> > > get a random number of regression failures off the REL_13_STABLE
> > > branch.  I debugged this a little bit and found out that the "random"
> > > number of failures is fully dependent on the machine and if I disable
> > > the "stats_ext.sql" regression test; all other tests pass without
> > > issue. When the "stats_ext.sql" regression test runs, it causes a
> > > database exception and PostgreSQL crashes.
> >
> > Hmph ... it's weird that we have not seen this in the buildfarm.
> > Have you tried to extract any info from the crash, like a stack trace?
> >
> > > I did some digging and determined that on the REL_13_STABLE branch
> > > this instability was introduced with this commit
> > > "b380484a850b6bf7d9fc0d85c555a2366e38451f"[1]. This corresponds to
> > > commit "19f5a37b9fc48a12c77edafb732543875da2f4a3"[1] on master. I
> > > worked backwards from there to determine when the regressions stopped
> > > failing and determined that with commit
> > > "be0a6666656ec3f68eb7d8e7abab5139fcd47012"[2] the regression tests are
> > > no longer failing.
> >
> > I'm having a hard time believing that b380484a8 would have introduced
> > a portability problem, and an even harder time believing that be0a66666
> > would have resolved it if so.  What seems more likely is that there's
> > some underlying issue such as a memory stomp, that the first commit
> > accidentally exposed and the second one accidentally hid again.
> > So, even if back-patching be0a66666 seemed feasible from a stability
> > standpoint (which I don't think it is), I fear it'd just mask a problem
> > that would eventually bite us again.
> >
> > So I think we need to dig down and try to identify the root cause,
> > without any preconceptions about how to fix it.  Again, a stack trace
> > would be pretty useful.  Or at least some info about which step of
> > stats_ext.sql is crashing.
> >
> >                         regards, tom lane

All,
   I was finally able to get a stack trace.  I apologize for it taking
so long, but for some reason when I did a configure with
"--enable-cassert --enable-debug" all of the regression tests passed.
However I finally was able to get it to work with only using
"--enable-debug" and then using the mingw version of gdb to get what I
have attached.  Please let me know if this contains any useful
information.  I also noticed that causing the crash was slightly
different and it definitely behaved differently with debug enabled.
Thank you in advance for any help.

-Heath

Attachments:

back_trace.txt (text/plain, 3.0K) download Continuing. [New Thread 4440.0xf1c] [Thread 4440.0x1590 exited with code 0] [New Thread 4440.0x105c] gdb: unknown target exception 0xc0000028 at 0x7ffbf387e598 Thread 1 received signal ?, Unknown signal. [Switching to Thread 4440.0x39c] 0x00007ffbf387e598 in ntdll!RtlRaiseStatus () from C:\Windows\SYSTEM32\ntdll.dll #0 0x00007ffbf387e598 in ntdll!RtlRaiseStatus () from C:\Windows\SYSTEM32\ntdll.dll #1 0x00007ffbf37e6673 in ntdll!RtlUnwindEx () from C:\Windows\SYSTEM32\ntdll.dll #2 0x00007ffbf0a734bd in msvcrt!_setjmpex () from C:\Windows\System32\msvcrt.dll #3 0x000000000082535a in pg_re_throw () at elog.c:1717 #4 0x000000000082517a in errfinish (filename=<optimized out>, filename@entry=0x9595a7 <__func__.114045+79> "statscmds.c", lineno=lineno@entry=204, funcname=funcname@entry=0x959990 <__func__.111351> "CreateStatistics") at elog.c:502 #5 0x000000000056552c in CreateStatistics (stmt=0x4c05858, stmt@entry=0x4b6ee30) at statscmds.c:202 #6 0x0000000000712821 in ProcessUtilitySlow (pstate=0x858d93 <CopySnapshot+51>, pstate@entry=0x4b897f8, pstmt=0x56f1df0, pstmt@entry=0x4c05928, queryString=0x0, queryString@entry=0x4c051a8 "CREATE STATISTICS tst ON relnatts + relpages FROM pg_class;", context=79482168, context@entry=PROCESS_UTILITY_TOPLEVEL, params=params@entry=0x0, queryEnv=queryEnv@entry=0x0, qc=qc@entry=0x4b6f2c0, dest=0x4c05be8) at utility.c:1836 #7 0x00000000007111a0 in standard_ProcessUtility (pstmt=0x4c05928, queryString=0x4c051a8 "CREATE STATISTICS tst ON relnatts + relpages FROM pg_class;", context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, dest=0x4c05be8, qc=0x4b6f2c0) at utility.c:1069 #8 0x000000000070eac8 in PortalRunUtility (portal=0x4bccd38, pstmt=0x4c05928, isTopLevel=<optimized out>, setHoldSnapshot=<optimized out>, dest=0x4c05be8, qc=0x4b6f2c0) at pquery.c:1157 #9 0x000000000070f50d in PortalRunMulti (portal=0x4bccd38, portal@entry=0x7fffffff, isTopLevel=true, isTopLevel@entry=false, setHoldSnapshot=setHoldSnapshot@entry=false, dest=dest@entry=0x4c05be8, altdest=0x4c05be8, altdest@entry=0x4b6f2c0, qc=0x4b6f2c0, qc@entry=0x0) at pquery.c:1303 #10 0x00000000007100e0 in PortalRun (portal=0x7fffffff, portal@entry=0x4bccd38, count=0, count@entry=2147483647, isTopLevel=isTopLevel@entry=true, run_once=run_once@entry=true, dest=dest@entry=0x4c05be8, altdest=altdest@entry=0x4c05be8, qc=qc@entry=0x4b6f2c0) at pquery.c:779 #11 0x000000000070bc2b in exec_simple_query (query_string=0x4c051a8 "CREATE STATISTICS tst ON relnatts + relpages FROM pg_class;") at postgres.c:1239 #12 0x000000000070d881 in PostgresMain (argc=<optimized out>, argv=argv@entry=0x4b94b78, dbname=<optimized out>, username=<optimized out>) at postgres.c:4315 #13 0x00000000006970c8 in BackendRun (port=0x4b6f7b0, port=0x4b6f7b0) at postmaster.c:4536 #14 SubPostmasterMain (argc=argc@entry=3, argv=argv@entry=0x56f1750) at postmaster.c:5059 #15 0x000000000088367b in main (argc=3, argv=0x56f1750) at main.c:187 Detaching from program: c:\Users\IEUser\source\postgres\tmp_install\c\Users\IEUser\postgres\bin\postgres.exe, Pid 4440
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: REL_13_STABLE Windows 10 Regression Failures
  2020-10-30 17:05 REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-10-30 17:25 ` Re: REL_13_STABLE Windows 10 Regression Failures Tom Lane <tgl@sss.pgh.pa.us>
  2020-10-30 19:47   ` Re: REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-11-09 17:07     ` Re: REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
@ 2020-11-09 17:14       ` Alvaro Herrera <alvherre@alvh.no-ip.org>
  2020-11-09 17:18         ` Re: REL_13_STABLE Windows 10 Regression Failures Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 9+ messages in thread

From: Alvaro Herrera @ 2020-11-09 17:14 UTC (permalink / raw)
  To: Heath Lord <heath.lord@crunchydata.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs@lists.postgresql.org

On 2020-Nov-09, Heath Lord wrote:

> Thread 1 received signal ?, Unknown signal.
> [Switching to Thread 4440.0x39c]
> 0x00007ffbf387e598 in ntdll!RtlRaiseStatus () from C:\Windows\SYSTEM32\ntdll.dll
> #0  0x00007ffbf387e598 in ntdll!RtlRaiseStatus () from C:\Windows\SYSTEM32\ntdll.dll
> #1  0x00007ffbf37e6673 in ntdll!RtlUnwindEx () from C:\Windows\SYSTEM32\ntdll.dll
> #2  0x00007ffbf0a734bd in msvcrt!_setjmpex () from C:\Windows\System32\msvcrt.dll
> #3  0x000000000082535a in pg_re_throw () at elog.c:1717
> #4  0x000000000082517a in errfinish (filename=<optimized out>, filename@entry=0x9595a7 <__func__.114045+79> "statscmds.c", lineno=lineno@entry=204, funcname=funcname@entry=0x959990 <__func__.111351> "CreateStatistics") at elog.c:502
> #5  0x000000000056552c in CreateStatistics (stmt=0x4c05858, stmt@entry=0x4b6ee30) at statscmds.c:202

Hmm, line 202 is the ereport in this test:

        if (!IsA(expr, ColumnRef))
            ereport(ERROR,
                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                     errmsg("only simple column references are allowed in CREATE STATISTICS")));

Not sure why that gives rise to the upper parts of the stack there.





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: REL_13_STABLE Windows 10 Regression Failures
  2020-10-30 17:05 REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-10-30 17:25 ` Re: REL_13_STABLE Windows 10 Regression Failures Tom Lane <tgl@sss.pgh.pa.us>
  2020-10-30 19:47   ` Re: REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-11-09 17:07     ` Re: REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-11-09 17:14       ` Re: REL_13_STABLE Windows 10 Regression Failures Alvaro Herrera <alvherre@alvh.no-ip.org>
@ 2020-11-09 17:18         ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-11-11 01:32           ` Re: REL_13_STABLE Windows 10 Regression Failures Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 9+ messages in thread

From: Tom Lane @ 2020-11-09 17:18 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: Heath Lord <heath.lord@crunchydata.com>; pgsql-bugs@lists.postgresql.org

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Hmm, line 202 is the ereport in this test:

>         if (!IsA(expr, ColumnRef))
>             ereport(ERROR,
>                     (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
>                      errmsg("only simple column references are allowed in CREATE STATISTICS")));

> Not sure why that gives rise to the upper parts of the stack there.

Yeah, it seems like the error-recovery longjmp has suddenly broken;
but why here?  There's nothing unusual about this specific error case.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: REL_13_STABLE Windows 10 Regression Failures
  2020-10-30 17:05 REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-10-30 17:25 ` Re: REL_13_STABLE Windows 10 Regression Failures Tom Lane <tgl@sss.pgh.pa.us>
  2020-10-30 19:47   ` Re: REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-11-09 17:07     ` Re: REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-11-09 17:14       ` Re: REL_13_STABLE Windows 10 Regression Failures Alvaro Herrera <alvherre@alvh.no-ip.org>
  2020-11-09 17:18         ` Re: REL_13_STABLE Windows 10 Regression Failures Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-11-11 01:32           ` Andres Freund <andres@anarazel.de>
  2020-11-11 09:27             ` Re: REL_13_STABLE Windows 10 Regression Failures Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Andres Freund @ 2020-11-11 01:32 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; Heath Lord <heath.lord@crunchydata.com>; pgsql-bugs@lists.postgresql.org

High,

On 2020-11-09 12:18:34 -0500, Tom Lane wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > Hmm, line 202 is the ereport in this test:
> 
> >         if (!IsA(expr, ColumnRef))
> >             ereport(ERROR,
> >                     (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
> >                      errmsg("only simple column references are allowed in CREATE STATISTICS")));
> 
> > Not sure why that gives rise to the upper parts of the stack there.
> 
> Yeah, it seems like the error-recovery longjmp has suddenly broken;
> but why here?  There's nothing unusual about this specific error case.

Perhaps PG_exception_stack got corrupted somehow? An oversized write to
a neighboring var?

Not sure if that works on mingw, but building with address sanitizer /
asan might be informative.

Greetings,

Andres Freund





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: REL_13_STABLE Windows 10 Regression Failures
  2020-10-30 17:05 REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-10-30 17:25 ` Re: REL_13_STABLE Windows 10 Regression Failures Tom Lane <tgl@sss.pgh.pa.us>
  2020-10-30 19:47   ` Re: REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-11-09 17:07     ` Re: REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-11-09 17:14       ` Re: REL_13_STABLE Windows 10 Regression Failures Alvaro Herrera <alvherre@alvh.no-ip.org>
  2020-11-09 17:18         ` Re: REL_13_STABLE Windows 10 Regression Failures Tom Lane <tgl@sss.pgh.pa.us>
  2020-11-11 01:32           ` Re: REL_13_STABLE Windows 10 Regression Failures Andres Freund <andres@anarazel.de>
@ 2020-11-11 09:27             ` Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
  2020-11-11 15:25               ` Re: REL_13_STABLE Windows 10 Regression Failures Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 9+ messages in thread

From: Juan José Santamaría Flecha @ 2020-11-11 09:27 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Alvaro Herrera <alvherre@alvh.no-ip.org>; Heath Lord <heath.lord@crunchydata.com>; PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

On Wed, Nov 11, 2020 at 2:32 AM Andres Freund <andres@anarazel.de> wrote:

> High,
>
> On 2020-11-09 12:18:34 -0500, Tom Lane wrote:
> > Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > > Hmm, line 202 is the ereport in this test:
> >
> > >         if (!IsA(expr, ColumnRef))
> > >             ereport(ERROR,
> > >                     (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
> > >                      errmsg("only simple column references are allowed
> in CREATE STATISTICS")));
> >
> > > Not sure why that gives rise to the upper parts of the stack there.
> >
> > Yeah, it seems like the error-recovery longjmp has suddenly broken;
> > but why here?  There's nothing unusual about this specific error case.
>
> Perhaps PG_exception_stack got corrupted somehow? An oversized write to
> a neighboring var?
>
> Not sure if that works on mingw, but building with address sanitizer /
> asan might be informative.
>

This looks like a known issue in MinGW64 builds [1], which is derived from
an also known issue in MSVC's handling of setjmp/longjmp [2].

[1] https://sourceforge.net/p/mingw-w64/bugs/406/
[2] https://docs.microsoft.com/en-us/cpp/cpp/using-setjmp-longjmp

Regards,

Juan José Santamaría Flecha

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: REL_13_STABLE Windows 10 Regression Failures
  2020-10-30 17:05 REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-10-30 17:25 ` Re: REL_13_STABLE Windows 10 Regression Failures Tom Lane <tgl@sss.pgh.pa.us>
  2020-10-30 19:47   ` Re: REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-11-09 17:07     ` Re: REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
  2020-11-09 17:14       ` Re: REL_13_STABLE Windows 10 Regression Failures Alvaro Herrera <alvherre@alvh.no-ip.org>
  2020-11-09 17:18         ` Re: REL_13_STABLE Windows 10 Regression Failures Tom Lane <tgl@sss.pgh.pa.us>
  2020-11-11 01:32           ` Re: REL_13_STABLE Windows 10 Regression Failures Andres Freund <andres@anarazel.de>
  2020-11-11 09:27             ` Re: REL_13_STABLE Windows 10 Regression Failures Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
@ 2020-11-11 15:25               ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 9+ messages in thread

From: Tom Lane @ 2020-11-11 15:25 UTC (permalink / raw)
  To: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>; +Cc: Andres Freund <andres@anarazel.de>; Alvaro Herrera <alvherre@alvh.no-ip.org>; Heath Lord <heath.lord@crunchydata.com>; PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

=?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= <juanjo.santamaria@gmail.com> writes:
> On Wed, Nov 11, 2020 at 2:32 AM Andres Freund <andres@anarazel.de> wrote:
>> On 2020-11-09 12:18:34 -0500, Tom Lane wrote:
>>> Yeah, it seems like the error-recovery longjmp has suddenly broken;
>>> but why here?  There's nothing unusual about this specific error case.

> This looks like a known issue in MinGW64 builds [1], which is derived from
> an also known issue in MSVC's handling of setjmp/longjmp [2].
> [1] https://sourceforge.net/p/mingw-w64/bugs/406/
> [2] https://docs.microsoft.com/en-us/cpp/cpp/using-setjmp-longjmp

Not sure I believe that.  The trouble with diagnosing this as a generic
"setjmp is broken" situation is that then it's not very credible that the
regression tests got this far.  As for [2], that's talking specifically
about longjmp not executing C++ destructors, which isn't an issue for us.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 9+ messages in thread


end of thread, other threads:[~2020-11-11 15:25 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-10-30 17:05 REL_13_STABLE Windows 10 Regression Failures Heath Lord <heath.lord@crunchydata.com>
2020-10-30 17:25 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-10-30 19:47   ` Heath Lord <heath.lord@crunchydata.com>
2020-11-09 17:07     ` Heath Lord <heath.lord@crunchydata.com>
2020-11-09 17:14       ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2020-11-09 17:18         ` Tom Lane <tgl@sss.pgh.pa.us>
2020-11-11 01:32           ` Andres Freund <andres@anarazel.de>
2020-11-11 09:27             ` Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
2020-11-11 15:25               ` Tom Lane <tgl@sss.pgh.pa.us>

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