The error I am getting is SIGBUS, but it doesn't make sense. I can ftruncate the file to something larger than the mutex + cond (i.e., getpagesize()) and I can even do msync(...MS_SYNC) and it still fails at the same spot!

I have NO IDEA why this is doing this.