On 2021-Jul-28, PG Bug reporting form wrote:
> Dropping a user that owns a number of procedures, while some of them are
> being dropped, can cause the server crash:
>
> Core was generated by `postgres: law regression [local] DROP ROLE
> '.
> Program terminated with signal SIGABRT, Aborted.
> #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
> 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
> (gdb) bt
> #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
> #1 0x00007f268882b859 in __GI_abort () at abort.c:79
> #2 0x000055a23a628276 in ExceptionalCondition (conditionName=conditionName@entry=0x55a23a77fd4d "pointer != NULL",
> errorType=errorType@entry=0x55a23a68700b "FailedAssertion", fileName=0x7ffdf4459470 "W\202b:\242U",
> fileName@entry=0x55a23a7886b0 "../../../../src/include/utils/memutils.h", lineNumber=lineNumber@entry=123)
> at assert.c:69
> #3 0x000055a23a65b46e in GetMemoryChunkContext (pointer=0x0) at ../../../../src/include/utils/memutils.h:123
> #4 pfree (pointer=pointer@entry=0x0) at mcxt.c:1171
> #5 0x000055a23a23254f in storeObjectDescription (descs=descs@entry=0x7ffdf44598b0, type=LOCAL_OBJECT,
> object=object@entry=0x55a23b5efe10, deptype=SHARED_DEPENDENCY_OWNER, count=count@entry=0) at pg_shdepend.c:1267
There's many places that deal correctly with the possibility that
getObjectDescription() would return NULL, but I found two places that
don't.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/