Another thing to note, which might be root cause of the bug, is that join_func() appears to be called multiple times according to the program output:
Joining thread 0 thread 0 joined! Joining thread 1 thread 0 joined! Joining thread 1 There is no way the program would want to join a thread multiple times. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1427981 Title: pthread_join failure To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1427981/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs