7max/log4cl

Recursive lock attempt with `log4cl`

otwieracz opened this issue · 0 comments

CL-USER> (defun x () (log:info "foo"))
X
CL-USER> (defun y () (log:info "bar ~A" (x)))
Y
CL-USER> (log:config :info)
; No value
CL-USER> (y)
Recursive lock attempt #<SB-THREAD:MUTEX "Anonymous lock" owner: #<SB-THREAD:THREAD "repl-thread" RUNNING {100AC7FFA3}>>.
   [Condition of type SIMPLE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {100AC7FFA3}>)

Backtrace:
  0: (SB-THREAD::%TRY-MUTEX #<unavailable argument> #<unavailable argument>)
  1: (SB-THREAD:GRAB-MUTEX #<SB-THREAD:MUTEX "Anonymous lock" owner: #<SB-THREAD:THREAD "repl-thread" RUNNING {100AC7FFA3}>> :WAITP T :TIMEOUT NIL)
  2: ((FLET "WITHOUT-INTERRUPTS-BODY-1" :IN SB-THREAD::CALL-WITH-MUTEX))
  3: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN LOG4CL-IMPL:APPENDER-DO-APPEND) {7FFF87B5CE8B}> #<SB-THREAD:MUTEX "Anonymous lock" owner: #<SB-THREAD:THREAD "repl-thread" R..
  4: ((:METHOD LOG4CL-IMPL:APPENDER-DO-APPEND :AROUND (LOG4CL-IMPL:SERIALIZED-APPENDER T T T)) #<LOG4CL-IMPL:CONSOLE-APPENDER {100C522BC3}> #<LOG4CL-IMPL::FILE-LOGGER CL-USER.X NIL {100F60B983}> 4 #<FUNCTI..
  5: ((LABELS LOG4CL-IMPL::LOG-TO-LOGGER-APPENDERS :IN LOG4CL-IMPL::LOG-WITH-LOGGER) #<LOGGER +ROOT+ {100BAA2E83}> #<LOG4CL-IMPL::FILE-LOGGER CL-USER.X NIL {100F60B983}> 4 #<FUNCTION (FLET "log-stmt16" :IN..
  6: ((LABELS LOG4CL-IMPL::LOG-TO-LOGGER-APPENDERS :IN LOG4CL-IMPL::LOG-WITH-LOGGER) #<LOG4CL-IMPL::FILE-LOGGER CL-USER NIL {100F60B083}> #<LOG4CL-IMPL::FILE-LOGGER CL-USER.X NIL {100F60B983}> 4 #<FUNCTION..
  7: ((LABELS LOG4CL-IMPL::LOG-TO-LOGGER-APPENDERS :IN LOG4CL-IMPL::LOG-WITH-LOGGER) #<LOG4CL-IMPL::FILE-LOGGER CL-USER.X NIL {100F60B983}> #<LOG4CL-IMPL::FILE-LOGGER CL-USER.X NIL {100F60B983}> 4 #<FUNCTI..
  8: (LOG4CL-IMPL::LOG-WITH-LOGGER #<LOG4CL-IMPL::FILE-LOGGER CL-USER.X NIL {100F60B983}> 4 #<FUNCTION (FLET "log-stmt16" :IN X) {100EF48F7B}> #<PACKAGE "COMMON-LISP-USER">)
  9: (X)```

As logging is used in more and more complex systems, this sometimes led to terrible (and unexpected) crashes.