- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- pthread_cancel not cancelling thread on HPUX 11.23...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2008 07:05 AM
05-22-2008 07:05 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2008 03:54 AM
05-23-2008 03:54 AM
Re: pthread_cancel not cancelling thread on HPUX 11.23 itanium server
You can only cancel a thread when it is at a cancellation point.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2008 06:53 AM
05-23-2008 06:53 AM
Re: pthread_cancel not cancelling thread on HPUX 11.23 itanium server
My application is crashing in the thread with illegal instruction error. I can see that my application has sent pthread_cancel to the child thread and started deleting the objects which it has passed as arguments to the child thread while creating it. Child thread was not killed and it crashed when trying to execute a virtual function on the deleted object.
My stack trace shows it has failed below.
#0 0x9fffffffef6b19a0 in virtual table of __cxxabiv1::__class_type_info
+0x10 ()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2008 06:22 PM
05-23-2008 06:22 PM
Re: pthread_cancel not cancelling thread on HPUX 11.23 itanium server
Do you get any errors from pthread_cancel?
pthread_cancel is not supported for aC++.
Using asynchronous is also very dangerous.
Before deleting objects, you should use pthread_kill(thread_id, 0) to see if the thread is still alive.
>My stack trace shows it has failed below.
#0 0x9fffffffef6b19a0 in virtual table of __cxxabiv1::__class_type_info +0x10
Does it have more entries?
This is a data address, not a function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2008 03:15 AM
05-27-2008 03:15 AM
Re: pthread_cancel not cancelling thread on HPUX 11.23 itanium server
We use aCC compiler to compile the code. I didn't know that pthread_cancel is not supported by aCC compiler. Thanks for making me aware of this. Is there any substitute for this?
gdb shows the below.
(gdb) where
#0 0x9fffffffef6b19a0 in virtual table of __cxxabiv1::__class_type_info
+0x10 ()
warning: Attempting to unwind past bad PC 0x9fffffffef6b19a0
#1 0xc000000006278760:0 in utlCThread::ThreadStart (this=0x60000000000188a0)
at ./utl/utlThread.cpp:655
#2 0xc0000000062784f0:0 in UTL_ThreadEntryFunction (pParam=0x60000000000188a0)
at ./utl/utlThread.cpp:914
#3 0xc0000000000cd3c0:0 in __pthread_bound_body+0x190 ()
from /usr/lib/hpux64/libpthread.so.1
(gdb) info threads
* 2 system thread 7138012 0x9fffffffef6b19a0 in virtual table of __cxxabiv1::__class_type_info+0x10 ()
1 system thread 7138009 0xc000000000039890:0 in LE_is_bind_non_fatal
+0x10 () from /usr/lib/hpux64/dld.so
Line 655 in ./utl/utlThread.cpp points to a virtual function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2008 10:58 AM
05-27-2008 10:58 AM
SolutionNot the aC++ compiler, the aC++ runtime.
You must not use the aC++ runtime. Or you must not use PTHREAD_CANCEL_ASYNCHRONOUS and then define cancellation points before you use the aC++ runtime. Or use a very limited subset of the aC++ runtime.
>Line 655 in ./utl/utlThread.cpp points to a virtual function.
I'm not sure why it points to __cxxabiv1::__class_type_info but you can't user virtual functions if the object has been destroyed.