[Interest] Using leveldb in a Qt app redirects unrelated system malloc calls to tcmalloc?

Thiago Macieira thiago.macieira at intel.com
Thu Apr 12 22:51:21 CEST 2018


On Thursday, 12 April 2018 12:08:09 PDT René J.V. Bertin wrote:
>     frame #7: 0x00007fff97676cd1 libsystem_malloc.dylib`_malloc_fork_prepare
> + 49 frame #8: 0x00007fff997fa161 libsystem_c.dylib`fork + 12

This is the "atfork" code, the one that causes all malloc locks to be dropped 
in the child process so that malloc() will work there regardless of the state 
of the parent. The fact that it's deadlocking in the code that is supposed to 
remove locks so that it won't deadlock is a good irony.

Absent further proof to the contrary, this looks like a system bug.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center






More information about the Interest mailing list