query stuck at SOCK_wait_for_ready function call

From: "tamanna madaan" <tamanna(dot)madan(at)globallogic(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: query stuck at SOCK_wait_for_ready function call
Date: 2010-12-30 10:28:14
Message-ID: 68666423656E1444A011106C4E085F4D96F1C3@ex3-del1.synapse.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All

I am using postgres-8.1.2 and have been using psqlodbc-08.03.0200 driver to connect
to the databse. One of the queries I executed from my appilcation have got stuck for an
indefinite amount of time causing my application to hang. So I cored the application. The
core file gives a backtrace which shows it got stuck while waiting for a socket to get
ready as follows :

#0 0xb7fe4410 in ?? ()
#1 0xbfca07b8 in ?? ()
#2 0xffffffff in ?? ()
#3 0x00000001 in ?? ()
#4 0xb7d0fdc4 in poll () from /lib/tls/libc.so.6
#5 0xb6fef7b4 in SOCK_wait_for_ready (sock=0x87171d0, output=0, retry_count=1) at socket.c:529
#6 0xb6fefe9a in SOCK_get_next_byte (self=0x87171d0, peek=0) at socket.c:929
#7 0xb6ff005c in SOCK_get_id (self=0x87171d0) at socket.c:692
---Type <return> to continue, or q <return> to quit---
#8 0xb6fc851b in CC_send_query_append (self=0x8717d30, query=0x87222c0 "SELECT RUMaster(2) AS call_proc_result", qi=0x0,
flag=0, stmt=0x8720730, appendq=0x0) at connection.c:2524
#9 0xb6ff9bb4 in SC_execute (self=0x8720730) at statement.c:1838
#10 0xb6fda7b6 in Exec_with_parameters_resolved (stmt=0x8720730, exec_end=0xbfca2be8) at execute.c:386
#11 0xb6fdbe62 in PGAPI_Execute (hstmt=0x8720730, flag=1) at execute.c:1062
#12 0xb70038ea in SQLExecute (StatementHandle=0x8720730) at odbcapi.c:374
#13 0xb7e8713c in SQLExecute (statement_handle=0x8720158) at SQLExecute.c:283

Can anyone please let me know what can cause this.
Even if it didnt find the socket ready , why not it simply come out giving some error
instead of getting stuck for an indefinite period.

Thanks...
Tamanna

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Carlos Mennens 2010-12-30 13:43:04 Re: Postgres forums ... take 2
Previous Message Ben Carbery 2010-12-30 06:24:36 Re: Understanding PG9.0 streaming replication feature