Thread: Hang investigation

Hang investigation

From
"Ilja Golshtein"
Date:
Hello!

I'm developing application uses PG as backend.
A recent stress test found out a serious trouble. Briefly,
libpq does not return control after COMMIT, while
commit actually happened Ok.

It is not quite reproducible: the test hangs during commiting
different transactions. If I terminate PG server,
control returns to application and it goes futher.
It happens against PostgreSQL 8.1.0 and 8.1.1
on Windows and on Linux on several boxes
with different configurations. PostgreSQL 8.0.x is fine.

This stuff operates with significant amount of data
(database size is about 20Gb).

My own attempts to investigate this issue failed
and I badly need community assistance. The question
is what should be provided to make it possible.
At first glance I should get application
and server core files and may be strace of application
networking with server.
What else?
Do we have a sort of manual could be used in my case?

I can produce log or all PG queries, but [as far as I understand]
it is not enough to replay at least because PG does not put in log
values of bound parameters.

Many thanks.

--
Best regards
Ilja Golshtein

Re: Hang investigation

From
Martijn van Oosterhout
Date:
On Fri, Dec 30, 2005 at 12:02:59PM +0300, Ilja Golshtein wrote:
> Hello!
>
> I'm developing application uses PG as backend.
> A recent stress test found out a serious trouble. Briefly,
> libpq does not return control after COMMIT, while
> commit actually happened Ok.

Hmm, sounds like a race condition. Most important would be strace of
postmaster and client at time of hang. If you have gdb and have
compiled with debug, attaching to them both will pinpoint the exact
line of code both a stuck on. From there we should be able to provide
more advice.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment