DB2 Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDB2 Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old April 27th, 2005, 09:52 PM
szehau szehau is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 1 szehau User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 15 sec
Reputation Power: 0
Calling sqleintr or exit causes program (linux) to hang (due to deadlock by pthread)?

Hi all,
I have a program written in C with embeded SQL. Following are the configuration:

DB2/LINUX 8.1.5
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

My problems are as following

CASE 1:

In DB2's documentation, it is stated that sqleintr is safe to call in a signal handler. When my program is executing a SQL, it receives an interrupt. In the signal handler for the interrupt, it calls sqleintr() to stop the SQL and call exit() to exit the program. Sometime the program will hang when calling sqleintr because of pthread in DB2 cannot accquire a lock and the program goes into a deadlock (from the gdb dump ). I guest the lock is accquire somewhere during the excution of the SQL before the signal and it is not yet released.

CASE 2:
Same as above but the program sometime hang when calling exit(). From the gdb dump, exit() will call some clean up functions in DB2 and clean up functions itself goes into a dead lock as well.

For your information, I need to exit the program after the signal handler is called.

Does anyone encounter this problem before? I have search around at the DB2 documnetation but still can't find related information. Please help.

Thanks.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDB2 Development > Calling sqleintr or exit causes program (linux) to hang (due to deadlock by pthread)?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway