0x000000000040c1eb in zlog_event_del (a_event=0x2d3630445233322d)
Gitxiaozhu-oss opened this issue · 2 comments
#define zlog_fetch_thread(a_thread, fail_goto) do {
int rd = 0;
a_thread = pthread_getspecific(zlog_thread_key);
if (!a_thread) {
a_thread = zlog_thread_new(zlog_env_init_version,
zlog_env_conf->buf_size_min, zlog_env_conf->buf_size_max,
zlog_env_conf->time_cache_count);
if (!a_thread) {
zc_error("zlog_thread_new fail");
goto fail_goto;
}
rd = pthread_setspecific(zlog_thread_key, a_thread);
if (rd) {
zlog_thread_del(a_thread);
zc_error("pthread_setspecific fail, rd[%d]", rd);
goto fail_goto;
}
}
if (a_thread->init_version != zlog_env_init_version) {
/* as mdc is still here, so can not easily del and new */
rd = zlog_thread_rebuild_msg_buf(a_thread,
zlog_env_conf->buf_size_min,
zlog_env_conf->buf_size_max);
if (rd) {
zc_error("zlog_thread_resize_msg_buf fail, rd[%d]", rd);
goto fail_goto;
}
rd = zlog_thread_rebuild_event(a_thread, zlog_env_conf->time_cache_count);
if (rd) {
zc_error("zlog_thread_resize_msg_buf fail, rd[%d]", rd);
goto fail_goto;
}
a_thread->init_version = zlog_env_init_version;
}
} while (0)
当进程环境发送变化是调用int zlog_thread_rebuild_event(zlog_thread_t * a_thread, int time_cache_count)函数,当执行zlog_event_del(a_thread->event);程序会发生奔溃,