malloc problems

Yury Efimochev efimyury at
Thu Jan 28 14:11:02 UTC 2016


After update from 9.2-RELEASE-p17 to 9.3-RELEASE-p24 on our production
server our service started crashing with 'segmentation fault/bus error'
on regular basis(roughly once a days).
Investigation revealed that crashes were caused by the fact that under
certain circumstances malloc may return pointer on same memory for
multiple clients from different threads.
We suggested that our problem caused by thread-specific cache, so we
disabled it(by adding 'MALLOC_OPTIONS=7h' to our service environment).
That fixed crashes, but caused 10-100 'std::bad_alloc' exceptions every
day(no 'std::bad_alloc' exceptions before that for months).

Does anyone faced similar issues?

Best regards,
Yury Efimochev

More information about the freebsd-questions mailing list