Skip site navigation (1) Skip section navigation (2)

Re: Backend with closed connection at 99% CPU

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Guy Thornley <guy(at)esphion(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Backend with closed connection at 99% CPU
Date: 2004-09-21 00:36:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Guy Thornley <guy(at)esphion(dot)com> writes:
> Postgres 7.4.1. (Yes I know, we _should_ upgrade).


> As the subject says, it is spinning at 99% CPU. ...
> This backend has recently lost its client connection, ...
> You can even have a backtrace, how about that:

>         (gdb) bt
>         #0  0x0811cf40 in enlargeStringInfo ()
>         #1  0x081249b8 in pq_getmessage ()
>         #2  0x0817bdfe in HandleFunctionRequest ()
>         #3  0x0817bfda in HandleFunctionRequest ()
>         #4  0x0817eacc in PostgresMain ()

I'm betting this is this bug:

2004-05-11 16:07  tgl

	* src/backend/lib/stringinfo.c (REL7_4_STABLE): Add tests to
	enlargeStringInfo() to avoid possible buffer-overrun or
	infinite-loop problems if a bogus data length is passed.

Somehow the dying client injected a few bogus bytes into the
communication channel, and managed to trigger the infinite-loop
variant of this bug.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Alvaro HerreraDate: 2004-09-21 01:11:06
Subject: Re: psql missing feature: show permissions for functions
Previous:From: Guy ThornleyDate: 2004-09-20 23:13:58
Subject: Backend with closed connection at 99% CPU

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group