I use the C ++ library, which is designed for multi-threaded processing, and the number of worker threads can be set using a variable. The library uses pthreads. The problem occurs when I run the application, which is provided as a test library, on a quad-core computer using 3 threads or more. The application terminates with a segmentation failure time error. When I try to insert some "cout" traces in some parts of the library, the problem is resolved and the application ends normally. When working on a single-core computer, no matter how many threads are used, the application ends normally.
How can I find out where the seam problem is?
Is this some kind of sync error? how can i find it? is there any tool i can use also check the code?
source
share