segfault in msg_pool