Pthread and glibc library

I’m trying to run a code that uses pthread (#include <pthread.h>) and I’m finding weird errors that seem to come from some memory leak. These errors arise only when I implement pthreads, while running the code sequentially does not give issues. Also, on a different machine the code used to run properly, without any problems.
After checking, I realized that pthread is implemented in the glibc library and comparing the versions on the cluster and on the machine where the code runs well I find that they have different versions (v2.17 VS v.2.28), can my issue be related to such a difference? In case, can the glibc version be updated?
In case you need more information about the code, let me know!


Hi there,

It is a bit difficult to say anything without knowing the error(s) you get, so please show us your code/error or tell us where to find it to test.

GIven that the libc is a core system library, upgrading it most of the time means a whole system upgrade. Anyway, CentOS 7 does not provide a more recent version.

FYI, when the problem is the libc version, usually either the binary does not start at all or it throws out explanatory messages.

Thx, bye,