help debugging hung process

From: webmaster(at)iarms(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: help debugging hung process
Date: 2006-05-06 21:57:49
Message-ID: 445D1BDD.9000200@iarms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm having problems with hanging apache processes that seem
to be stuck in pqSocketPoll.

I'm running postgresql 7.4.11 on CentOS 3 (upgraded from
7.4.5 that was also having this problem; haven't upgraded
to 7.4.12 because I haven't found RPMs yet). Using Apache
1.3.35 with mod_perl.

I haven't been able to reproduce the problem, but it's happening
at least a few times a day in production. Here's a backtrace of a
hung apache process:

#0 0x00f28919 in poll () from /lib/tls/libc.so.6
#1 0x0016d1cf in pqSocketPoll (sock=-4, forRead=-1, forWrite=1,
end_time=-1)
at fe-misc.c:1040
#2 0x0016d08a in pqSocketCheck (conn=0x998cf18, forRead=1, forWrite=0,
end_time=-1) at fe-misc.c:982
#3 0x0016cf77 in pqWaitTimed (forRead=-4, forWrite=-4, conn=0x998cf18,
finish_time=-4) at fe-misc.c:914
#4 0x0016cf35 in pqWait (forRead=-4, forWrite=-4, conn=0xfffffffc)
at fe-misc.c:897
#5 0x0016a9a9 in PQgetResult (conn=0x998cf18) at fe-exec.c:1074
#6 0x0016acbc in PQexecFinish (conn=0x998cf18) at fe-exec.c:1307
#7 0x001a885b in dbd_st_execute (sth=0x9e20ccc, imp_sth=0x9e337c0)
at dbdimp.c:2135
#8 0x00199d29 in XS_DBD__Pg__st_execute (my_perl=0x8b0fca0, cv=0x982279c)
at Pg.xsi:562
#9 0x0012295c in XS_DBI_dispatch (my_perl=0x8b0fca0, cv=0x857c6ac)
at DBI.xs:2812
#10 0x002910d5 in Perl_pp_entersub (my_perl=0x8b0fca0) at pp_hot.c:2781

So I see it's stuck polling, but I don't know how to figure out what
the actual query/operation is that it's wait for. Any suggestions on
what I should try next?

Thank you.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message HH 2006-05-06 22:51:07 Can't Figure Out Where Rows Are Going
Previous Message Martijn van Oosterhout 2006-05-06 20:46:15 Re: intarray internals