I've got a multi-threaded program, with threads communicating via channels. Unfortunately, over time, the thread count decreases. I know the threads die because with sometimes another thread will raise an exception with a "thread died" message when they try to send a message over a channel. I also monitor the process's thread count and can see it gradually decreasing. The threads that do die seem to have random problems under ARC/ORC, but don't show any errors at all under refc.
When I run the program with Valgrind there are no problems reported, and threads don't seem to die, but it's very slow and doesn't use all cores. I read that Valgrind is a VM where there are fewer potential problems such as alignment issues. Has anyone seen this before?
