BUG #16340: lo_manage() crashs DB instance

Lists: Postg토토SQL : Postg토토SQL 메일 링리스트 : 2020-04-03 이후 PGSQL-BUGS 13:46
From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: william(dot)crowell(at)openlogic(dot)com
Subject: BUG #16340: lo_manage() crashs DB instance
Date: 2020-04-03 13:46:15
Message-ID: 16340-591c7449dc7c8c47@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: Postg토토SQL : Postg토토SQL 메일 링리스트 : 2020-04-03 이후 PGSQL-BUGS 13:46

The following bug has been logged on the website:

Bug reference: 16340
Logged by: William Crowell
Email address: william(dot)crowell(at)openlogic(dot)com
PostgreSQL version: 11.7
Operating system: RHEL 7.7
Description:

PostgreSQL crashes if you do the following:

$psql postgres -c 'create extension lo'
CREATE EXTENSION
$psql postgres -c 'select lo_manage()' server closed the connection
unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
connection to server was lost

...
2020-04-02 13:42:23 CEST / postgres / xxxx / 1043 / 00000 / [local]] - LOG:
AUDIT: SESSION,1,2,FUNCTION,EXECUTE,FUNCTION,public.lo_manage,select
lo_manage(),<none>
[2020-04-02 13:42:23 CEST / / / 24618 / 00000 / ] - LOG: server process
(PID 1043) was terminated by signal 11: Segmentation fault
[2020-04-02 13:42:23 CEST / / / 24618 / 00000 / ] - DETAIL: Failed
process was running: select lo_manage()
[2020-04-02 13:42:23 CEST / / / 24618 / 00000 / ] - LOG: terminating any
other active server processes

I do know that lo_manage requires an argument, but it should not create a
segmentation fault even though the argument is not provided.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: william(dot)crowell(at)openlogic(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16340: lo_manage() crashs DB instance
Date: 2020-04-03 14:40:13
Message-ID: 24271.1585924813@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> PostgreSQL crashes if you do the following:
> $psql postgres -c 'create extension lo'
> CREATE EXTENSION
> $psql postgres -c 'select lo_manage()'
> server closed the connection unexpectedly

Huh, somebody was a bit too cute here:

if (!CALLED_AS_TRIGGER(fcinfo)) /* internal error */
elog(ERROR, "%s: not fired by trigger manager",
trigdata->tg_trigger->tgname);

Will fix, thanks for the report!

regards, tom lane


From: wcrowell <wcrowell(at)perforce(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #16340: lo_manage() crashs DB instance
Date: 2020-04-03 15:02:20
Message-ID: 1585926140672-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Tim,

No problem. Do you happen to know what release this will be fixed in?
Maybe 11.8?

Regards,

Bill Crowell

--
Sent from: https://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html