pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: lr@pcorp.us
To: pgsql-bugs@postgresql.org
Subject: BUG #14283: PostgreSQL 9.6 head crashing PostGIS bot
Date: Sun, 07 Aug 2016 05:18:54 +0000
Message-ID: <20160807051854.1427.32414@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      14283
Logged by:          Regina Obe
Email address:      lr@pcorp.us
PostgreSQL version: 9.6beta3
Operating system:   Mingw64 Windows 7 and Debian
Description:        

Note this is after 9.6beta3 release, but I had to select a version.

Since around 8/3/2016 our Debian PostGIS build bot has been crashing during
test to install PostGIS (using non-extension), what's interesting is that
when installed via 

CREATE EXTENSION postgis;

it does not crash.  I was able to replacate the issue under windows as well
mingw64, and traced it to the part of the install script that does this:

CREATE OR REPLACE VIEW geography_columns AS
		SELECT
			current_database() AS f_table_catalog, 
			n.nspname AS f_table_schema, 
			c.relname AS f_table_name, 
			a.attname AS f_geography_column,
			postgis_typmod_dims(a.atttypmod) AS coord_dimension,
			postgis_typmod_srid(a.atttypmod) AS srid,
			postgis_typmod_type(a.atttypmod) AS type
		FROM 
			pg_class c, 
			pg_attribute a, 
			pg_type t, 
			pg_namespace n
		WHERE t.typname = 'geography'
	        AND a.attisdropped = false
	        AND a.atttypid = t.oid
	        AND a.attrelid = c.oid
	        AND c.relnamespace = n.oid
	        AND NOT pg_is_other_temp_schema(c.relnamespace)
	        AND has_table_privilege( c.oid, 'SELECT'::text );



The backtrace of the error is showing:

Reading symbols from
C:\ming64gcc48\projects\postgresql\rel\pg9.6w64gcc48\bin\postgres.exe...done.
0x00000000777cae11 in ntdll!DbgBreakPoint ()
   from C:\Windows\SYSTEM32\ntdll.dll
(gdb) cont
Continuing.
[Thread 27196.0x7f9c exited with code 0]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 27196.0x7198]
GetOldestSnapshot () at snapmgr.c:422
422                     return OldestActiveSnapshot->as_snap;
(gdb) bt
#0  GetOldestSnapshot () at snapmgr.c:422
#1  0x000000000044efdd in init_toast_snapshot (toast_snapshot=0x299e9b0)
    at tuptoaster.c:2314
#2  0x000000000044f123 in toast_fetch_datum (attr=<optimized out>)
    at tuptoaster.c:1869
#3  0x00000000004508c6 in heap_tuple_untoast_attr (attr=0x59c04ca)
    at tuptoaster.c:179
#4  0x00000000007bc9da in pg_detoast_datum_packed (datum=<optimized out>)
    at fmgr.c:2266
#5  0x0000000000790620 in text_to_cstring (t=0x59c04ca) at varlena.c:186
#6  0x00000000007a3a95 in RelationBuildRuleLock (
    relation=relation@entry=0xe7dcd48) at relcache.c:732
#7  0x00000000007a621a in RelationBuildDesc (
    targetRelId=targetRelId@entry=58124, insertIt=insertIt@entry=0 '\000')
    at relcache.c:1035
#8  0x00000000007a6625 in RelationClearRelation (
    relation=relation@entry=0xe7dc4d0, rebuild=rebuild@entry=1 '\001')
    at relcache.c:2218
#9  0x00000000007a70b8 in RelationFlushRelation (relation=0xe7dc4d0)
    at relcache.c:2330
#10 RelationCacheInvalidateEntry (relationId=58124) at relcache.c:2392
#11 0x00000000007a075e in LocalExecuteInvalidationMessage (
    msg=msg@entry=0xe707990) at inval.c:568
#12 0x00000000007a0876 in ProcessInvalidationMessages (hdr=0x4e13088,
    func=0x7a0650 <LocalExecuteInvalidationMessage>) at inval.c:444
#13 0x00000000007a08a9 in CommandEndInvalidationMessages () at
inval.c:1056
#14 0x0000000000489486 in AtCCI_LocalCache () at xact.c:1377
#15 CommandCounterIncrement () at xact.c:956
#16 0x00000000006b0d22 in exec_simple_query (
    query_string=0x100000000000000 <error: Cannot access memory at address
0x100000000000000>) at postgres.c:1133
#17 PostgresMain (argc=<optimized out>, argv=argv@entry=0x2495c8,
    dbname=0x18001700160015 <error: Cannot access memory at address
0x18001700160015>, username=<optimized out>) at postgres.c:4074
#18 0x000000000064794d in BackendRun (port=0x299f400) at postmaster.c:4262
#19 SubPostmasterMain (argc=argc@entry=3, argv=argv@entry=0x2b7e80)
    at postmaster.c:4752
#20 0x0000000000803ac8 in main (argc=3, argv=0x2b7e80) at main.c:205

This is also logged in PostGIS bug tracker:
https://trac.osgeo.org/postgis/ticket/3609

Given the timing of when the error started, I am highly suspecting this
commit:


Prevent "snapshot too old" from trying to return pruned TOAST tuples.
(Commit 3e2f3c2e423b3ae906668c186bac79522b8e3e29 by rhaas)

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=3e2f3c2e423b3ae906668c186bac79522b8e3...








-- 
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 (3+ messages)  latest in thread

Message-ID: <20160807051854.1427.32414@wrigleys.postgresql.org>
Permalink:  ../20160807051854.1427.32414@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20160807051854.1427.32414@wrigleys.postgresql.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: lr@pcorp.us
  Subject: Re: BUG #14283: PostgreSQL 9.6 head crashing PostGIS bot
  In-Reply-To: <20160807051854.1427.32414@wrigleys.postgresql.org>

* 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