为什么LogInput::HoldOn 不用trylock? #1912
Unanswered
nelsontang
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
在采集数据和checkpoint dump频繁的情况下,发现很大概率会出现LogInput::HoldOn()死锁,死锁部分在pthread_rwlock_wrlock,这里为什么不用 pthread_rwlock_trywrlock ?
死锁是打印的部分堆栈,日志会停留在 event handle daemon pause:starts
Thread 1 (Thread 0x7fc08f9f5700 (LWP 300868)):
#0 0x00007fc08f1c62ce in pthread_rwlock_wrlock () from /lib64/libpthread.so.0
#1 0x00000000007657b0 in logtail::ReadWriteLock::lock() ()
#2 0x0000000000822b43 in logtail::LogInput::HoldOn() ()
#3 0x00000000009ac6ab in logtail::FileServer::PauseInner() ()
#4 0x00000000009ac4fb in logtail::FileServer::Pause(bool) ()
#5 0x000000000091f59c in logtail::EventDispatcher::DumpCheckPointPeriod(int) ()
#6 0x000000000072d741 in logtail::Application::Start() ()
#7 0x00000000006d5be7 in do_worker_process() ()
#8 0x00000000006d5df1 in main ()
Beta Was this translation helpful? Give feedback.
All reactions