v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..) - Mailing list pgsql-hackers

From Justin Pryzby
Subject v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)
Date
Msg-id ZDW5DyEf/FG2mUmP@telsasoft.com
Whole thread Raw
Responses Re: v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)  (Andres Freund <andres@anarazel.de>)
Re: v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
Yes, $SUBJECT is correct.

On an old centos6 VM which I'd forgotten about and never removed from
monitoring, I noticed that a process had recently crashed...

Maybe this is an issue which was already fixed, but I looked and find no
bug report nor patch about it.  Feel free to dismiss the problem report
if it's not interesting or useful. 

postgres was compiled locally at 4e54d231a.  It'd been running
continuously since September without crashing until a couple weeks ago
(and running nearly-continuously for months before that).

The VM is essentially idle, so maybe that's related to the crash.

TRAP: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File:
"dsa.c",Line: 1770, PID: 24257)
 
postgres: telsasoft old_ts ::1(50284) authentication(ExceptionalCondition+0x91)[0x991451]
postgres: telsasoft old_ts ::1(50284) authentication[0x9b9f97]
postgres: telsasoft old_ts ::1(50284) authentication(dsa_get_address+0x92)[0x9ba192]
postgres: telsasoft old_ts ::1(50284) authentication(pgstat_get_entry_ref+0x442)[0x868892]
postgres: telsasoft old_ts ::1(50284) authentication(pgstat_prep_pending_entry+0x54)[0x862b14]
postgres: telsasoft old_ts ::1(50284) authentication(pgstat_assoc_relation+0x54)[0x866764]
postgres: telsasoft old_ts ::1(50284) authentication(_bt_first+0xb1b)[0x51399b]
postgres: telsasoft old_ts ::1(50284) authentication(btgettuple+0xc2)[0x50e792]
postgres: telsasoft old_ts ::1(50284) authentication(index_getnext_tid+0x51)[0x4ff271]
postgres: telsasoft old_ts ::1(50284) authentication(index_getnext_slot+0x72)[0x4ff442]
postgres: telsasoft old_ts ::1(50284) authentication(systable_getnext+0x132)[0x4fe282]
postgres: telsasoft old_ts ::1(50284) authentication[0x9775cb]
postgres: telsasoft old_ts ::1(50284) authentication(SearchCatCache+0x20d)[0x978e6d]
postgres: telsasoft old_ts ::1(50284) authentication(GetSysCacheOid+0x30)[0x98c7c0]
postgres: telsasoft old_ts ::1(50284) authentication(get_role_oid+0x2d)[0x86b1ad]
postgres: telsasoft old_ts ::1(50284) authentication(hba_getauthmethod+0x22)[0x6f5592]
postgres: telsasoft old_ts ::1(50284) authentication(ClientAuthentication+0x39)[0x6f1f59]
postgres: telsasoft old_ts ::1(50284) authentication(InitPostgres+0x8c6)[0x9a33d6]
postgres: telsasoft old_ts ::1(50284) authentication(PostgresMain+0x109)[0x84bb79]
postgres: telsasoft old_ts ::1(50284) authentication(PostmasterMain+0x1a6a)[0x7ac1aa]
postgres: telsasoft old_ts ::1(50284) authentication(main+0x461)[0x6fe5a1]
/lib64/libc.so.6(__libc_start_main+0x100)[0x36e041ed20]

(gdb) bt
#0  0x00000036e04324f5 in raise () from /lib64/libc.so.6
#1  0x00000036e0433cd5 in abort () from /lib64/libc.so.6
#2  0x0000000000991470 in ExceptionalCondition (conditionName=<value optimized out>, errorType=<value optimized out>,
fileName=<valueoptimized out>, lineNumber=1770) at assert.c:69
 
#3  0x00000000009b9f97 in get_segment_by_index (area=0x22818c0, index=<value optimized out>) at dsa.c:1769
#4  0x00000000009ba192 in dsa_get_address (area=0x22818c0, dp=1099511703168) at dsa.c:953
#5  0x0000000000868892 in pgstat_get_entry_ref (kind=PGSTAT_KIND_RELATION, dboid=<value optimized out>, objoid=<value
optimizedout>, create=true, created_entry=0x0) at pgstat_shmem.c:508
 
#6  0x0000000000862b14 in pgstat_prep_pending_entry (kind=PGSTAT_KIND_RELATION, dboid=0, objoid=2676,
created_entry=0x0)at pgstat.c:1067
 
#7  0x0000000000866764 in pgstat_prep_relation_pending (rel=0x22beba8) at pgstat_relation.c:855
#8  pgstat_assoc_relation (rel=0x22beba8) at pgstat_relation.c:138
#9  0x000000000051399b in _bt_first (scan=0x22eb5c8, dir=ForwardScanDirection) at nbtsearch.c:882
#10 0x000000000050e792 in btgettuple (scan=0x22eb5c8, dir=ForwardScanDirection) at nbtree.c:243
#11 0x00000000004ff271 in index_getnext_tid (scan=0x22eb5c8, direction=<value optimized out>) at indexam.c:533
#12 0x00000000004ff442 in index_getnext_slot (scan=0x22eb5c8, direction=ForwardScanDirection, slot=0x22eb418) at
indexam.c:625
#13 0x00000000004fe282 in systable_getnext (sysscan=0x22eb3c0) at genam.c:511
#14 0x00000000009775cb in SearchCatCacheMiss (cache=0x229e280, nkeys=<value optimized out>, hashValue=3877703461,
hashIndex=5,v1=<value optimized out>, v2=<value optimized out>, v3=0, v4=0) at catcache.c:1364
 
#15 0x0000000000978e6d in SearchCatCacheInternal (cache=0x229e280, v1=36056248, v2=0, v3=0, v4=0) at catcache.c:1295
#16 SearchCatCache (cache=0x229e280, v1=36056248, v2=0, v3=0, v4=0) at catcache.c:1149
#17 0x000000000098c7c0 in GetSysCacheOid (cacheId=10, oidcol=<value optimized out>, key1=<value optimized out>,
key2=<valueoptimized out>, key3=<value optimized out>, key4=<value optimized out>) at syscache.c:1293
 
#18 0x000000000086b1ad in get_role_oid (rolname=0x2262cb8 "telsasoft", missing_ok=true) at acl.c:5181
#19 0x00000000006f5592 in check_hba (port=<value optimized out>) at hba.c:2100
#20 hba_getauthmethod (port=<value optimized out>) at hba.c:2699
#21 0x00000000006f1f59 in ClientAuthentication (port=0x224b5d0) at auth.c:396
#22 0x00000000009a33d6 in PerformAuthentication (in_dbname=0x2268a48 "old_ts", dboid=0, username=0x2262cb8 "telsasoft",
useroid=0,out_dbname=0x0, override_allow_connections=false) at postinit.c:245
 
#23 InitPostgres (in_dbname=0x2268a48 "old_ts", dboid=0, username=0x2262cb8 "telsasoft", useroid=0, out_dbname=0x0,
override_allow_connections=false)at postinit.c:836
 
#24 0x000000000084bb79 in PostgresMain (dbname=0x2268a48 "old_ts", username=0x2262cb8 "telsasoft") at postgres.c:4130
#25 0x00000000007ac1aa in BackendRun (argc=<value optimized out>, argv=<value optimized out>) at postmaster.c:4504
#26 BackendStartup (argc=<value optimized out>, argv=<value optimized out>) at postmaster.c:4232
#27 ServerLoop (argc=<value optimized out>, argv=<value optimized out>) at postmaster.c:1806
#28 PostmasterMain (argc=<value optimized out>, argv=<value optimized out>) at postmaster.c:1478
#29 0x00000000006fe5a1 in main (argc=3, argv=0x22239a0) at main.c:202

Unfortunately:
(gdb) p area->control->handle 
$3 = 0
(gdb) p segment_map->header->magic
value has been optimized out
(gdb) p index
$4 = <value optimized out>

-- 
Justin



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Show various offset arrays for heap WAL records
Next
From: Andres Freund
Date:
Subject: Re: Assertion being hit during WAL replay