Fixed. Turned out that weechat wasn't linking against pthreads, so gnutls was using the stubbed out version in glibc. Then later, a plugin would load the non-stubbed version, which would mean the mutexes initialized prior by gnutls were uninitialized, but then put to use by libpthread.