Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184

From: Soni <diptatapa(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184
Date: 2019-04-23 03:04:19
Message-ID: fb770c7a-5c4e-a4dd-5a69-6218017c397b@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We have no other extensions installed, just plpgsql.
Here's the backtrace. Please let me know if it helps.

#0  errfinish (dummy=dummy(at)entry=0) at elog.c:414
#1  0x0000000000820068 in elog_finish (elevel=elevel(at)entry=20,
fmt=fmt(at)entry=0x864278 "cache lookup failed for function %u") at elog.c:1376
#2  0x0000000000821e63 in fmgr_info_cxt_security (functionId=1,
functionId(at)entry=18230952, finfo=finfo(at)entry=0x7ffcd9090460,
mcxt=<optimized out>,
    ignore_security=ignore_security(at)entry=0 '\000') at fmgr.c:184
#3  0x00000000008233f2 in fmgr_info (finfo=0x7ffcd9090460,
functionId=18230952) at fmgr.c:129
#4  OidFunctionCall1Coll (functionId=functionId(at)entry=1,
collation=collation(at)entry=0, arg1=arg1(at)entry=75471) at fmgr.c:1325
#5  0x0000000000532054 in ProcedureCreate (procedureName=<optimized
out>, procNamespace=procNamespace(at)entry=2200, replace=<optimized out>,
    returnsSet=returnsSet(at)entry=0 '\000',
returnType=returnType(at)entry=2950, proowner=10,
languageObjectId=languageObjectId(at)entry=13,
    languageValidator=languageValidator(at)entry=1,
prosrc=prosrc(at)entry=0x1139fb0 "uuid_nil", probin=probin(at)entry=0x1139f80
"$libdir/uuid-ossp", isAgg=isAgg(at)entry=0 '\000',
    isWindowFunc=isWindowFunc(at)entry=0 '\000',
security_definer=security_definer(at)entry=0 '\000',
isLeakProof=isLeakProof(at)entry=0 '\000', isStrict=isStrict(at)entry=1 '\001',
    volatility=volatility(at)entry=105 'i', parallel=parallel(at)entry=115
's', parameterTypes=parameterTypes(at)entry=0x1162e90,
allParameterTypes=allParameterTypes(at)entry=0,
    parameterModes=parameterModes(at)entry=0,
parameterNames=parameterNames(at)entry=0,
parameterDefaults=parameterDefaults(at)entry=0x0, trftypes=trftypes(at)entry=0,
    proconfig=proconfig(at)entry=0, procost=procost(at)entry=1,
prorows=prorows(at)entry=0) at pg_proc.c:714
#6  0x00000000005a3a2e in CreateFunction (pstate=pstate(at)entry=0x1133990,
stmt=stmt(at)entry=0x113a250) at functioncmds.c:1083
#7  0x0000000000720967 in ProcessUtilitySlow
(pstate=pstate(at)entry=0x1133990, pstmt=pstmt(at)entry=0x1149698,
    queryString=queryString(at)entry=0x113fb38 "/*
contrib/uuid-ossp/uuid-ossp--1.1.sql */\n\n-- complain if script is
sourced in psql, rather than via CREATE EXTENSION\n\n\nCREATE FUNCTION
uuid_nil()\nRETURNS uuid\nAS '$libdir/uuid-ossp', 'uuid_nil'\nIMMU"...,
context=context(at)entry=PROCESS_UTILITY_QUERY, params=params(at)entry=0x0,
    queryEnv=queryEnv(at)entry=0x0, completionTag=completionTag(at)entry=0x0,
dest=0xca42a0 <donothingDR>) at utility.c:1433
#8  0x000000000071fa6f in standard_ProcessUtility (pstmt=0x1149698,
    queryString=0x113fb38 "/* contrib/uuid-ossp/uuid-ossp--1.1.sql
*/\n\n-- complain if script is sourced in psql, rather than via CREATE
EXTENSION\n\n\nCREATE FUNCTION uuid_nil()\nRETURNS uuid\nAS
'$libdir/uuid-ossp', 'uuid_nil'\nIMMU"...,
context=PROCESS_UTILITY_QUERY, params=0x0, queryEnv=0x0, dest=0xca42a0
<donothingDR>,
    completionTag=0x0) at utility.c:931
#9  0x000000000059a6ac in execute_sql_string (filename=0x112bc18
"/usr/pgsql-10/share/extension/uuid-ossp--1.1.sql",
    sql=0x113fb38 "/* contrib/uuid-ossp/uuid-ossp--1.1.sql */\n\n--
complain if script is sourced in psql, rather than via CREATE
EXTENSION\n\n\nCREATE FUNCTION uuid_nil()\nRETURNS uuid\nAS
'$libdir/uuid-ossp', 'uuid_nil'\nIMMU"...) at extension.c:763
#10 execute_extension_script (extensionOid=extensionOid(at)entry=75470,
control=control(at)entry=0x112c310, from_version=from_version(at)entry=0x0,
    version=version(at)entry=0x1132b78 "1.1",
requiredSchemas=requiredSchemas(at)entry=0x0,
schemaName=schemaName(at)entry=0x112c2f8 "public", schemaOid=<optimized out>)
    at extension.c:924
#11 0x000000000059b135 in CreateExtensionInternal
(extensionName=0x10fa100 "uuid-ossp", schemaName=0x112c2f8 "public",
schemaName(at)entry=0x0, versionName=0x1132b78 "1.1",
    versionName(at)entry=0x0, oldVersionName=oldVersionName(at)entry=0x0,
cascade=<optimized out>, parents=parents(at)entry=0x0,
is_create=is_create(at)entry=1 '\001')
    at extension.c:1536
#12 0x000000000059b647 in CreateExtension
(pstate=pstate(at)entry=0x1149428, stmt=stmt(at)entry=0x10fa120) at
extension.c:1725
#13 0x0000000000720cdf in ProcessUtilitySlow
(pstate=pstate(at)entry=0x1149428, pstmt=pstmt(at)entry=0x10fa440,
    queryString=queryString(at)entry=0x10f9738 "create extension
\"uuid-ossp\" ;", context=context(at)entry=PROCESS_UTILITY_TOPLEVEL,
params=params(at)entry=0x0,
    queryEnv=queryEnv(at)entry=0x0,
completionTag=completionTag(at)entry=0x7ffcd9091930 "", dest=0x10fa520) at
utility.c:1352
#14 0x000000000071fa6f in standard_ProcessUtility (pstmt=0x10fa440,
queryString=0x10f9738 "create extension \"uuid-ossp\" ;",
context=PROCESS_UTILITY_TOPLEVEL,
    params=0x0, queryEnv=0x0, dest=0x10fa520,
completionTag=0x7ffcd9091930 "") at utility.c:931
#15 0x000000000071d368 in PortalRunUtility (portal=0x114a4c8,
pstmt=0x10fa440, isTopLevel=<optimized out>, setHoldSnapshot=<optimized
out>, dest=0x10fa520,
    completionTag=0x7ffcd9091930 "") at pquery.c:1178
#16 0x000000000071dda7 in PortalRunMulti (portal=portal(at)entry=0x114a4c8,
isTopLevel=isTopLevel(at)entry=1 '\001',
setHoldSnapshot=setHoldSnapshot(at)entry=0 '\000',
---Type <return> to continue, or q <return> to quit---
    dest=dest(at)entry=0x10fa520, altdest=altdest(at)entry=0x10fa520,
completionTag=completionTag(at)entry=0x7ffcd9091930 "") at pquery.c:1331
#17 0x000000000071e995 in PortalRun (portal=<optimized out>,
count=9223372036854775807, isTopLevel=<optimized out>,
run_once=<optimized out>, dest=0x10fa520,
    altdest=0x10fa520, completionTag=0x7ffcd9091930 "") at pquery.c:799
#18 0x000000000071aa13 in exec_simple_query (query_string=<optimized
out>) at postgres.c:1122
#19 0x000000000071bd0c in PostgresMain (argc=<optimized out>,
argv=<optimized out>, dbname=<optimized out>, username=<optimized out>)
at postgres.c:4117
#20 0x000000000047b246 in BackendRun (port=0x1098a20) at postmaster.c:4405
#21 BackendStartup (port=0x1098a20) at postmaster.c:4077
#22 ServerLoop () at postmaster.c:1755
#23 0x00000000006b25ef in PostmasterMain (argc=argc(at)entry=3,
argv=argv(at)entry=0x1070bc0) at postmaster.c:1363
#24 0x000000000047c06f in main (argc=3, argv=0x1070bc0) at main.c:228

Thanks,
Soni

On 22/04/2019 21:04, Tom Lane wrote:
> Soni <diptatapa(at)gmail(dot)com> writes:
>> When "create extension "uuid-ossp"", I got :
>> 2019-04-22 02:41:53.323 UTC [10305] XX000ERROR:  XX000: cache lookup
>> failed for function 1
>> 2019-04-22 02:41:53.323 UTC [10305] XX000LOCATION:
>> fmgr_info_cxt_security, fmgr.c:184
>> 2019-04-22 02:41:53.323 UTC [10305] XX000STATEMENT:  create extension
>> "uuid-ossp" ;
> That is just bizarre. uuid-ossp's installation script does nothing
> beyond a few simple CREATE FUNCTION commands, so it's really hard to
> see how you could be getting to an incorrect function call.
>
> Do you perhaps have any other extensions installed that could be
> running add-on code during DDL commands? I'm thinking of pgaudit
> or auto_explain or the like. If so, try disabling those to see
> if the problem goes away.
>
> If that's not it, could we trouble you to get a stack trace of
> this problem? Set a breakpoint at errfinish, run the CREATE
> EXTENSION, and when it stops send us the output of "bt".
> (Make sure that fmgr_info_cxt_security appears one or two levels
> down in the trace, else you stopped at the wrong message output.)
>
> https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_backend
>
> regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message rob stone 2019-04-23 03:05:13 Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184
Previous Message Soni 2019-04-23 02:15:55 Re: cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184