This was observed earlier today, most threads were deadlocked as follows:
This is the first time I have seen anything like this, and it's not clear why localtime_r
would lead to a deadlock on futex_wait
.
Because adding a BBS lock wrapper around this would entail a significant performance penalty, I am not taking any action at this time. If this happens again, some refactoring could be done to add a wrapper and, conditionally compiled, surround it with locks so we can get more information.
My theory is that a thread was cancelled while it was logging something, specifically while executing localtime_r
, but don't know for sure.
Thread 23 (Thread 0x7fde9affd6c0 (LWP 1401652) "lbbs"):
#0 futex_wait (private=0, expected=2, futex_word=0x7fdee8686700 <tzset_lock>) at ../sysdeps/nptl/futex-internal.h:146
__ret = -512
err = <optimized out>
#1 __GI___lll_lock_wait_private (futex=futex@entry=0x7fdee8686700 <tzset_lock>) at ./nptl/lowlevellock.c:34
#2 0x00007fdee85723bc in __tz_convert (timer=1732252302, use_localtime=use_localtime@entry=1, tp=tp@entry=0x7fde9aff7950) at ./time/tzset.c:572
__futex = 0x7fdee8686700 <tzset_lock>
leap_correction = 140594059901056
leap_extra_secs = 0
#3 0x00007fdee8570690 in __localtime_r (t=t@entry=0x7fde9aff7918, tp=tp@entry=0x7fde9aff7950) at ./time/localtime.c:30
#4 0x0000563f59a1f50c in __bbs_log (loglevel=LOG_DEBUG, level=3, file=0x563f59a527f2 "bbs.c", lineno=730, func=0x563f59a53800
You must be