12-17-04 12:45 AM
Hi,
I have strange problem on UnixWare system:
Let's consider simple two threads program:
- two threads, each executes the function:
while(1)
{
string s="something";
s+=:"foo";
map<string, integer> mp;
//some operations on mp;
//calling poll function to sleep for 100ms
}
If I exectue one instance of this program everything works OK.
But when I execute two or more instances all of them coredumps.
The examination of the stacks indicates that in the funtion block() SIGSEGV
was received.
I used the truss command and just before the crush function prepblock()
failes (EINVAL).
The situation is strange, because if I remove the operations on string and
map it works.
Moreover it also works when I don't call poll fuction.
But when there are both it fails....
This problem only appears on HP platform (I check two machines).
Program was compiled by g++ ver 2.65 or something.
If those troubles are caused by string or map why it works well on single
process instance ??
Btw. Do you know what for are the funcitons (I suppose kernel function):
block(), prepblock(), unblock() ?
Regards
[ Post a follow-up to this message ]
|