Archived
This forum has been archived. Please start a new discussion on GitHub.
Problem with IceUtil::Mutex
I have a problem with IceUtil::Mutex. The method lock() thows ThreadSyscallException(). Going inside the method, I found that pthread_mutex_lock(&_mutex) returns error code 22.
It happens when my program have been executed for a while. My use of mutex is so simple that I can't figure out what is wrong. Please help me!
Regards,
Anhpnt
It happens when my program have been executed for a while. My use of mutex is so simple that I can't figure out what is wrong. Please help me!
Regards,
Anhpnt
0
Comments
-
Hi,
Which platform/Ice version do you use?
On supported platforms, this error typically indicates a memory management problem: you're trying to lock a mutex which has been destroyed.
Cheers,
Benoit.0 -
I'm sorry, I don't know how to get os and Ice current version?
My mutex variable is global. How can it be destroyed?0 -
Hi,
You can find the Ice version you're using by checking the ICE_STRING_VERSION macro in the "IceUtil/Config.h" header file. On Unix platforms, "uname -a" should tell you which operating system you're using.
Without more information on your application, it's difficult to say what could be the cause of this exception... a memory management problem is often the cause of this error but it could also be something else. Can you perhaps reproduce it with a small test case that you post here?
Cheers,
Benoit.0