On heavy subscribe socket opening/closing I experience an assert hit when pthread_mutex_destroy is called in mutex.hpp.
Attached is a piece of code which demonstrates this.
gcc -O zmqpub.c -o zmqpub -lzmq -lpthread
gcc -O zmqsub.c -o zmqsub -lzmq -lpthread
zmqsub process will be crashed but the timing is very rare.
It was taken few days to reproduce this issue on my environment.
This test needs many open files so you should change the limits.
ulimit -n 8192
ulimit -c unlimited
I got a core file and printed all stack trace of threads on this process.
Please see bt.txt. But I couldn't find another thread to lock the mutex.
I thought this issue looks same as
Crash on heavy socket creation: Device or resource busy (mutex.hpp:91)
But the version is different so I create new issue for this problem.