Re: Server crash (FailedAssertion) due to catcache refcount mis-handling

From: Andreas Seltenreich <seltenreich(at)gmx(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Server crash (FailedAssertion) due to catcache refcount mis-handling
Date: 2017-08-13 13:48:00
Message-ID: 877ey7bmun.fsf@ansel.ydns.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane writes:
> I wonder if Andreas would be interested in trying the randomly-timed-
> SIGTERM thing with sqlsmith.

So far, most of the core dumps generated are Jeevan's assertion failing
with backtraces through SearchCatCacheList. The rest is failing this
assertion:

TRAP: FailedAssertion("!(portal->cleanup == ((void *)0))", File: "portalmem.c", Line: 846)

Example backtrace below. They all happened during a rollback statement.
Testing was done on master at 2336f84284.

regards,
Andreas

Core was generated by `postgres: smith regression [local] ROLLBACK '.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig(at)entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
#1 0x00007f4c26d3240a in __GI_abort () at abort.c:89
#2 0x0000559d18897a73 in ExceptionalCondition (conditionName=conditionName(at)entry=0x559d18a81370 "!(portal->cleanup == ((void *)0))", errorType=errorType(at)entry=0x559d188e3f7d "FailedAssertion", fileName=fileName(at)entry=0x559d18a81013 "portalmem.c", lineNumber=lineNumber(at)entry=846) at assert.c:54
#3 0x0000559d188c42f1 in AtCleanup_Portals () at portalmem.c:846
#4 0x0000559d18536cb7 in CleanupTransaction () at xact.c:2652
#5 0x0000559d1853b825 in AbortOutOfAnyTransaction () at xact.c:4278
#6 0x0000559d188a7799 in ShutdownPostgres (code=<optimized out>, arg=<optimized out>) at postinit.c:1146
#7 0x0000559d1876b4e9 in shmem_exit (code=code(at)entry=1) at ipc.c:228
#8 0x0000559d1876b5fa in proc_exit_prepare (code=code(at)entry=1) at ipc.c:185
#9 0x0000559d1876b688 in proc_exit (code=code(at)entry=1) at ipc.c:102
#10 0x0000559d188999b1 in errfinish (dummy=<optimized out>) at elog.c:543
#11 0x0000559d1878fefa in ProcessInterrupts () at postgres.c:2841
#12 0x0000559d18790829 in ProcessInterrupts () at postgres.c:2828
#13 0x0000559d18795395 in PortalRunMulti (portal=portal(at)entry=0x559d197f2bf0, isTopLevel=isTopLevel(at)entry=1 '\001', setHoldSnapshot=setHoldSnapshot(at)entry=0 '\000', dest=dest(at)entry=0x559d19850c40, altdest=altdest(at)entry=0x559d19850c40, completionTag=completionTag(at)entry=0x7ffc04f1b560 "") at pquery.c:1239
#14 0x0000559d18796069 in PortalRun (portal=portal(at)entry=0x559d197f2bf0, count=count(at)entry=9223372036854775807, isTopLevel=isTopLevel(at)entry=1 '\001', run_once=run_once(at)entry=1 '\001', dest=dest(at)entry=0x559d19850c40, altdest=altdest(at)entry=0x559d19850c40, completionTag=0x7ffc04f1b560 "") at pquery.c:799
#15 0x0000559d18791dca in exec_simple_query (query_string=0x559d1984fe00 "ROLLBACK;") at postgres.c:1099
#16 0x0000559d18793af1 in PostgresMain (argc=<optimized out>, argv=argv(at)entry=0x559d197fa078, dbname=<optimized out>, username=<optimized out>) at postgres.c:4090
#17 0x0000559d184a3428 in BackendRun (port=0x559d197e8f00) at postmaster.c:4357
#18 BackendStartup (port=0x559d197e8f00) at postmaster.c:4029
#19 ServerLoop () at postmaster.c:1753
#20 0x0000559d1871ad65 in PostmasterMain (argc=3, argv=0x559d197be5a0) at postmaster.c:1361
#21 0x0000559d184a4a6d in main (argc=3, argv=0x559d197be5a0) at main.c:228

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sokolov Yura 2017-08-13 15:05:24 Re: Lazy hash table for XidInMVCCSnapshot (helps Zipfian a bit)
Previous Message Haribabu Kommi 2017-08-13 13:23:30 Re: Pluggable storage