PQexec hangs, stuck on malloc_consolidate

Поиск
Список
Период
Сортировка
От Tor Gunston
Тема PQexec hangs, stuck on malloc_consolidate
Дата
Msg-id 1073265519.14733.46.camel@cletus.localdomain
обсуждение исходный текст
Ответы Re: PQexec hangs, stuck on malloc_consolidate  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
I have a C program using libpq.  After a successful connection to the
database over the network using PQsetdbLogin, the first call to PQexec
never returns.  top shows the process using 100% of CPU.

Here is my collection of clues:

1) My setup is Red Hat Linux 9.0, Postgresql version 7.4.0, installed
from binary RPMs.

2) The postmaster logs indicate that the query was received, and get as
far as "CommitTransactionCommand".

3) ethereal shows the query going out to the postmaster, and what looks
to me like a response coming back.

4) gdb backtrace shows the process stuck in malloc_consolidate:

#0  0x42074d44 in malloc_consolidate () from /lib/tls/libc.so.6
#1  0x420743c9 in _int_malloc () from /lib/tls/libc.so.6
#2  0x4207378d in malloc () from /lib/tls/libc.so.6
#3  0x408f8954 in pqResultAlloc () from /usr/lib/libpq.so.3
#4  0x409007fe in pqParseInput3 () from /usr/lib/libpq.so.3
#5  0x4090060f in pqParseInput3 () from /usr/lib/libpq.so.3
#6  0x408f9869 in PQconsumeInput () from /usr/lib/libpq.so.3
#7  0x408f99f1 in PQgetResult () from /usr/lib/libpq.so.3
#8  0x408f9cfb in PQexecPrepared () from /usr/lib/libpq.so.3
#9  0x0804aa38 in GetNextVal () at sql.c:106

5) The client and the postmaster are actually running on the same
machine.  If I switch from a network connection to a local connection
(using PQsetdb), everything works fine.

6) Any query I try (even "SELECT 1") produces the same result.

This seems like a bug in libpq to me, but since this is my first attempt
at using Postgresql, I'm going to assume that I'm the idiot and post it
here.

Thanks for any help in this matter.  I'll be happy to provide any
additional information, if it is needed.

--
Tor Gunston <tor@tor.to>


В списке pgsql-novice по дате отправления:

Предыдущее
От: "Sukellusseura Vesikot r.y."
Дата:
Сообщение: Re: install
Следующее
От: Martin Hampl
Дата:
Сообщение: Disk usage