Hi At the end the problem was a buggy implementation of posix threads in FreeBSD 5.4 on amd64. It was corrected in FreeBSD 6.0