Re: SEGFAULT in CREATE EXTENSION related pg_init_privs

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SEGFAULT in CREATE EXTENSION related pg_init_privs
Date: 2016-04-14 09:13:54
Message-ID: CAFj8pRCNsJ3szUfsHZHy+EyrfZy13_h44J1o6wNhXXbdR1i+Uw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2016-04-14 10:49 GMT+02:00 Peter Geoghegan <pg(at)bowt(dot)ie>:

> On Thu, Apr 14, 2016 at 1:27 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
> > (gdb) bt
> > #0 heap_deform_tuple (tuple=tuple(at)entry=0x1d87e90,
> > tupleDesc=tupleDesc(at)entry=0x7f1dab9525b0, values=values(at)entry=0x1d87a28,
> > isnull=isnull(at)entry=0x1d882d8 "\177\177\177\177\177~\177\177") at
> > heaptuple.c:881
>
> The memory appears to be freed -- CLOBBER_FREED_MEMORY stuff does this.
>
> You might try using Valgrind, with --track-origins, which will show
> where the memory was first allocated.
>

I did it, but there is nothing interesting

==00:00:00:03.519 17221== For counts of detected and suppressed errors,
rerun with: -v
==00:00:00:03.519 17221== ERROR SUMMARY: 0 errors from 0 contexts
(suppressed: 0 from 0)
==00:00:01:09.357 17228== Invalid read of size 2
==00:00:01:09.357 17228== at 0x477A15: heap_deform_tuple
(heaptuple.c:881)
==00:00:01:09.357 17228== by 0x477ED9: heap_modify_tuple
(heaptuple.c:817)
==00:00:01:09.357 17228== by 0x516DDA: recordExtensionInitPriv.part.2
(aclchk.c:5305)
==00:00:01:09.357 17228== by 0x51954F: recordExtensionInitPriv
(aclchk.c:5262)
==00:00:01:09.357 17228== by 0x51954F: ExecGrant_Relation (aclchk.c:1965)
==00:00:01:09.357 17228== by 0x51A324: ExecGrantStmt_oids (aclchk.c:564)
==00:00:01:09.357 17228== by 0x51BDFE: ExecuteGrantStmt (aclchk.c:549)
==00:00:01:09.357 17228== by 0x6F88F8: ProcessUtilitySlow.isra.5
(utility.c:1514)
==00:00:01:09.357 17228== by 0x6F76BA: standard_ProcessUtility
(utility.c:907)
==00:00:01:09.357 17228== by 0x58ED9C: execute_sql_string
(extension.c:748)
==00:00:01:09.357 17228== by 0x58ED9C: execute_extension_script.isra.5
(extension.c:908)
==00:00:01:09.357 17228== by 0x58FC71: CreateExtensionInternal.isra.6
(extension.c:1500)
==00:00:01:09.357 17228== by 0x5901D7: CreateExtension (extension.c:1558)
==00:00:01:09.357 17228== by 0x6F8378: ProcessUtilitySlow.isra.5
(utility.c:1296)
==00:00:01:09.357 17228== Address 0x7f7f7f7f7f7f7f91 is not stack'd,
malloc'd or (recently) free'd
==00:00:01:09.357 17228==.
{
<insert_a_suppression_name_here>
Memcheck:Addr2
fun:heap_deform_tuple
fun:heap_modify_tuple
fun:recordExtensionInitPriv.part.2
fun:recordExtensionInitPriv
fun:ExecGrant_Relation
fun:ExecGrantStmt_oids
fun:ExecuteGrantStmt
fun:ProcessUtilitySlow.isra.5
fun:standard_ProcessUtility
fun:execute_sql_string
fun:execute_extension_script.isra.5
fun:CreateExtensionInternal.isra.6
fun:CreateExtension
fun:ProcessUtilitySlow.isra.5
}

Regards

Pavel

>
> --
> Peter Geoghegan
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2016-04-14 09:34:05 Re: \crosstabview fixes
Previous Message Peter Geoghegan 2016-04-14 08:49:52 Re: SEGFAULT in CREATE EXTENSION related pg_init_privs