strange malloc behavior

Yury Efimochev efimyury at gmail.com
Fri Jan 29 18:40:10 UTC 2016


Hi,

Recently I faced the following problem.

After update from 9.2-RELEASE-p17 to 9.3-RELEASE-p24 on our production
server our service started crashing with SIGSEG/SIGBUS on regular
basis(roughly once a day).

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 was 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).

Did anyone face similar issues?

--
Best regards,
Yury Efimochev


More information about the freebsd-hackers mailing list