[unixODBC-support] Locking in thread_protect() in libodbc.so

Hu, Ming (Ivan) huming at alcatel-lucent.com
Tue Dec 11 01:03:50 GMT 2007


> Hi, guys,
> 
> I am trying multiple(the number is 4) DSNs connections in my
> mutlithread application. 
> So, there are multiple ODBC connections per DSN in one thread and for
> the same DSN, there is one ODBC connection per thread. 
> 
> While currently, after some DB operations, several threads are locked
> in thread_protect().
> 
> (dbx) where -l -v -h
>   [1] libc.so.1:__lwp_park(0x0, 0x0, 0x0, 0xa3, 0xffffffff78716020,
> 0xffffffff76500800), at 0xffffffff7c5c9134 
>   [2] libc.so.1:mutex_lock_queue(0xffffffff76500800, 0x0,
> 0xffffffff7d8ab6f0, 0x0, 0xffffffff7d8ab6f8, 0x1), at
> 0xffffffff7c5c0f4c 
>   [3] libodbc.so.1.0.0:mutex_entry(0xffffffff7d8ab6f0, 0x108a1cc48,
> 0x100fac300, 0x1, 0x10870ac60, 0x10870ab90), at 0xffffffff7d760a28 
>   [4] libodbc.so.1.0.0:thread_protect(0x3, 0x108a1cc48, 0x0, 0x0,
> 0x108a1d088, 0x0), at 0xffffffff7d761f24 
>   [5] libodbc.so.1.0.0:SQLNumResultCols(0x108a1cc48,
> 0xffffffff762fafce, 0x0, 0x100dbc9a1, 0x100dbc9b1, 0x1a7), at
> 0xffffffff7d73d128 
> 
> There are another thread seems locked with the folowing stack trace.
> 
> (dbx) where -l -v -h
>   [1] libc.so.1:_so_recv(0x17, 0x107598ba0, 0x1000, 0x0, 0x101dcc860,
> 0x0), at 0xffffffff7c5c96d4 
>   [2] psqlodbc.so:SOCK_get_next_byte(0x106b13580, 0x1115d8658, 0x6,
> 0xb5, 0x101dcc868, 0x101dcc868), at 0xffffffff76c4db0c 
>   [3] psqlodbc.so:CC_send_query(0x1075c1b68, 0x1115d8658, 0x0, 0x4,
> 0x1, 0x1), at 0xffffffff76c28c18 
>   [4] psqlodbc.so:SC_execute(0x104e0d2f8, 0x1115d8658, 0x0, 0x4,
> 0x1075c1b68, 0x80808080), at 0xffffffff76c53be0 
>   [5] psqlodbc.so:Exec_with_parameters_resolved(0x104e0d2f8,
> 0xffffffff764fabdc, 0x0, 0xffffffff76c52454, 0x1075c1b68, 0x0), at
> 0xffffffff76c387d4 
>   [6] psqlodbc.so:PGAPI_Execute(0x104e0d2f8, 0x104fd9150, 0x100fac300,
> 0x1, 0x104e0d3c8, 0x104e0d2f8), at 0xffffffff76c39110 
>   [7] psqlodbc.so:SQLExecute(0x104e0d2f8, 0x104fd9150, 0x100fac300,
> 0x0, 0x104e0d2f8, 0x0), at 0xffffffff76c59d90 
>   [8] libodbc.so.1.0.0:SQLExecute(0x104fd9150, 0x104fd9150, 0x0,
> 0x100dbd710, 0x100dc19a0, 0x0), at 0xffffffff7d72ff28 
> 
> Is there anybody can instruct me about this case?   thanks very much.
> 
> Best Regards
Ivan 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20071211/e7bd2761/attachment.html>


More information about the unixODBC-support mailing list