Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

0x000000000040c1eb in zlog_event_del (a_event=0x2d3630445233322d) #231

Open
Gitxiaozhu-oss opened this issue Jun 1, 2023 · 2 comments
Open

Comments

@Gitxiaozhu-oss
Copy link

#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);程序会发生奔溃,

@jhwsx
Copy link

jhwsx commented Jan 18, 2024

1705544675326
我这边也遇到了这个问题了。

@zhouyunbin
Copy link

zhouyunbin commented Jan 18, 2024 via email

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants