Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

写快照时出现死锁 #255

Open
cdlgz opened this issue Jul 7, 2020 · 2 comments
Open

写快照时出现死锁 #255

cdlgz opened this issue Jul 7, 2020 · 2 comments

Comments

@cdlgz
Copy link

cdlgz commented Jul 7, 2020

定时写快照时在写日志时出现死锁,原因是在dlog函数里加了锁, 快照时主进程log->lock正好是锁定状态,于是在子进程写日志时停在这里,怎么解决?
int dlog(dlog_t *log, const char *fmt, ...)
{
pthread_mutex_lock(&log->lock);
va_list ap;
va_start(ap, fmt);
int ret = inner_dlog(log, fmt, ap);
va_end(ap);
pthread_mutex_unlock(&log->lock);

return ret;

}

@haipome
Copy link
Member

haipome commented Aug 1, 2020

还没有遇到过这种情况

@ghost
Copy link

ghost commented Jan 25, 2021

交易所提供技术支持,出售币币,OTC,合约交易所全套代码,可以二次开发,有客户案例 wx: doposn

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

No branches or pull requests

2 participants