Calling sqleintr or exit causes program (linux) to hang (due to deadlock by pthread)
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Free Databases support forum > IBM DB2 > Calling sqleintr or exit causes program (linux) to hang (due to deadlock by pthread)




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Calling sqleintr or exit causes program (linux) to hang (due to deadlock by pthread)  
szehau@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-01-05 11:05 PM

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 the
cleanup function 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.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:57 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register