pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
R: R: BUG #6342: libpq blocks forever in "poll" function
6+ messages / 4 participants
[nested] [flat]

* R: R: BUG #6342: libpq blocks forever in "poll" function
@ 2011-12-19 08:40  Andrea Grassi <andreagrassi@sogeasoft.com>
  2 siblings, 0 replies; 6+ messages in thread

From: Andrea Grassi @ 2011-12-19 08:40 UTC (permalink / raw)
  To: 'Craig Ringer' <ringerc@ringerc.id.au>; +Cc: pgsql-bugs

1. Yes, obviously I launched that command when the program was blocked.

2. The system release is "SUSE SLES 10 SP4 64 BIT" with kernel 2.6.16.60. 
Maybe it's not the last release but it can justify the blocks ? In other systems (VMWARE) the same system work fine.
What you suspect ? libpq ? linux release ? hardware ? 

If you need other informations let me know.  

Regards, Andrea


-----Messaggio originale-----
Da: Craig Ringer [mailto:ringerc@ringerc.id.au] 
Inviato: sabato 17 dicembre 2011 7.19
A: Andrea Grassi
Cc: pgsql-bugs@postgresql.org
Oggetto: Re: R: [BUGS] BUG #6342: libpq blocks forever in "poll" function

On 16/12/2011 10:10 PM, Andrea Grassi wrote:
> The client program and the postgres server are on the same host, client connects to 127.0.0.1.
> In the meantime, my original program blocks (not my example but very probably the reasons are the same).
>
> I typed "ps -C testprogramname -o wchan:80=" and the output was only a single dash ( "-" ).
That means it's not waiting in a kernel call right now. Was the program 
in the hung state you've observed at the time you ran the command? Its 
output would only be interesting when it's hung.
> I searched for the complete stack in /proc/$pid/stack (where $pid) was the pid of my process but this file doesn't exists !! Why ?
Old kernel, maybe? You're running on some kind of enterprise-y distro, 
so who knows how ancient half the stuff in there is.

--
Craig Ringer




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* R: R: BUG #6342: libpq blocks forever in "poll" function
@ 2011-12-19 15:14  Andrea Grassi <andreagrassi@sogeasoft.com>
  2 siblings, 1 reply; 6+ messages in thread

From: Andrea Grassi @ 2011-12-19 15:14 UTC (permalink / raw)
  To: 'Craig Ringer' <ringerc@ringerc.id.au>; +Cc: pgsql-bugs

Hi, Craig
Now my process is blocked and I have the case in my hands.
Do you have something to ask me in order to have more details ?

Regards, Andrea

-----Messaggio originale-----
Da: Craig Ringer [mailto:ringerc@ringerc.id.au] 
Inviato: sabato 17 dicembre 2011 7.19
A: Andrea Grassi
Cc: pgsql-bugs@postgresql.org
Oggetto: Re: R: [BUGS] BUG #6342: libpq blocks forever in "poll" function

On 16/12/2011 10:10 PM, Andrea Grassi wrote:
> The client program and the postgres server are on the same host, client connects to 127.0.0.1.
> In the meantime, my original program blocks (not my example but very probably the reasons are the same).
>
> I typed "ps -C testprogramname -o wchan:80=" and the output was only a single dash ( "-" ).
That means it's not waiting in a kernel call right now. Was the program 
in the hung state you've observed at the time you ran the command? Its 
output would only be interesting when it's hung.
> I searched for the complete stack in /proc/$pid/stack (where $pid) was the pid of my process but this file doesn't exists !! Why ?
Old kernel, maybe? You're running on some kind of enterprise-y distro, 
so who knows how ancient half the stuff in there is.

--
Craig Ringer




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* R: R: BUG #6342: libpq blocks forever in "poll" function
@ 2011-12-20 09:01  Andrea Grassi <andreagrassi@sogeasoft.com>
  2 siblings, 2 replies; 6+ messages in thread

From: Andrea Grassi @ 2011-12-20 09:01 UTC (permalink / raw)
  To: 'Craig Ringer' <ringerc@ringerc.id.au>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

Sorry if I insist, but now I have the case at hand (my test program is now blocked), so I can check and verify all what you want.
I would like to know if it can be a libpq bug or if you think the fault is due to a system bug or to a machine issue and in this case I would be grateful if you could give me a hint on what could be.

Regards, Andrea

-----Messaggio originale-----
Da: Craig Ringer [mailto:ringerc@ringerc.id.au] 
Inviato: sabato 17 dicembre 2011 7.19
A: Andrea Grassi
Cc: pgsql-bugs@postgresql.org
Oggetto: Re: R: [BUGS] BUG #6342: libpq blocks forever in "poll" function

On 16/12/2011 10:10 PM, Andrea Grassi wrote:
> The client program and the postgres server are on the same host, client connects to 127.0.0.1.
> In the meantime, my original program blocks (not my example but very probably the reasons are the same).
>
> I typed "ps -C testprogramname -o wchan:80=" and the output was only a single dash ( "-" ).
That means it's not waiting in a kernel call right now. Was the program 
in the hung state you've observed at the time you ran the command? Its 
output would only be interesting when it's hung.
> I searched for the complete stack in /proc/$pid/stack (where $pid) was the pid of my process but this file doesn't exists !! Why ?
Old kernel, maybe? You're running on some kind of enterprise-y distro, 
so who knows how ancient half the stuff in there is.

--
Craig Ringer




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: R: R: BUG #6342: libpq blocks forever in "poll" function
@ 2011-12-20 14:58  Harry Rossignol <harrywr2@comcast.net>
  parent: Andrea Grassi <andreagrassi@sogeasoft.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Harry Rossignol @ 2011-12-20 14:58 UTC (permalink / raw)
  To: pgsql-bugs

I also have a client suffering an occasional 'application hang' running 
Suse 11.2 and postgressql 8.4 on an 8 core box which is not reproducable 
in a VMWare test environment.
Access to postgres is libpq 127.0.0.1 as well. Unfortunately the client 
must restart ASAP and I have not produced a 'test case'.


On 12/20/2011 1:01 AM, Andrea Grassi wrote:
> Sorry if I insist, but now I have the case at hand (my test program is now blocked), so I can check and verify all what you want.
> I would like to know if it can be a libpq bug or if you think the fault is due to a system bug or to a machine issue and in this case I would be grateful if you could give me a hint on what could be.
>
> Regards, Andrea
>
> -----Messaggio originale-----
> Da: Craig Ringer [mailto:ringerc@ringerc.id.au]
> Inviato: sabato 17 dicembre 2011 7.19
> A: Andrea Grassi
> Cc: pgsql-bugs@postgresql.org
> Oggetto: Re: R: [BUGS] BUG #6342: libpq blocks forever in "poll" function
>
> On 16/12/2011 10:10 PM, Andrea Grassi wrote:
>> The client program and the postgres server are on the same host, client connects to 127.0.0.1.
>> In the meantime, my original program blocks (not my example but very probably the reasons are the same).
>>
>> I typed "ps -C testprogramname -o wchan:80=" and the output was only a single dash ( "-" ).
> That means it's not waiting in a kernel call right now. Was the program
> in the hung state you've observed at the time you ran the command? Its
> output would only be interesting when it's hung.
>> I searched for the complete stack in /proc/$pid/stack (where $pid) was the pid of my process but this file doesn't exists !! Why ?
> Old kernel, maybe? You're running on some kind of enterprise-y distro,
> so who knows how ancient half the stuff in there is.
>
> --
> Craig Ringer
>
>




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: R: R: BUG #6342: libpq blocks forever in "poll" function
@ 2011-12-20 15:43  Alvaro Herrera <alvherre@commandprompt.com>
  parent: Andrea Grassi <andreagrassi@sogeasoft.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Alvaro Herrera @ 2011-12-20 15:43 UTC (permalink / raw)
  To: Andrea Grassi <andreagrassi@sogeasoft.com>; +Cc: Craig Ringer <ringerc@ringerc.id.au>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs


Excerpts from Andrea Grassi's message of mar dic 20 06:01:55 -0300 2011:
> Sorry if I insist, but now I have the case at hand (my test program is now blocked), so I can check and verify all what you want.
> I would like to know if it can be a libpq bug or if you think the fault is due to a system bug or to a machine issue and in this case I would be grateful if you could give me a hint on what could be.

Please attach GDB to the stuck process (gdb -p `pidof testprogram`) and
grab a backtrace (bt full).

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: R: R: BUG #6342: libpq blocks forever in "poll" function
@ 2011-12-20 23:59  Craig Ringer <ringerc@ringerc.id.au>
  parent: Andrea Grassi <andreagrassi@sogeasoft.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Craig Ringer @ 2011-12-20 23:59 UTC (permalink / raw)
  To: Andrea Grassi <andreagrassi@sogeasoft.com>; +Cc: pgsql-bugs

On 19/12/2011 11:14 PM, Andrea Grassi wrote:
> Hi, Craig
> Now my process is blocked and I have the case in my hands.
> Do you have something to ask me in order to have more details ?
>
As I tend to agree with Tom re this being a kernel issue, try (as root):

# Enable stack dumps etc via sysrq
echo 8 > /proc/sys/kernel/sysrq
# Trigger kernel stack dump of all processes via sysrq mechanism
echo t > /proc/sysrq-trigger

... then search the kernel log files to find the kernel stack dump 
associated with your test program.

If you're not on the latest kernel for your OS, you should update it.

--
Craig Ringer



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2011-12-20 23:59 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-12-19 08:40 ` Andrea Grassi <andreagrassi@sogeasoft.com>
2011-12-19 15:14 ` Andrea Grassi <andreagrassi@sogeasoft.com>
2011-12-20 23:59   ` Craig Ringer <ringerc@ringerc.id.au>
2011-12-20 09:01 ` Andrea Grassi <andreagrassi@sogeasoft.com>
2011-12-20 14:58   ` Harry Rossignol <harrywr2@comcast.net>
2011-12-20 15:43   ` Alvaro Herrera <alvherre@commandprompt.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox