Log4cxx
  1. Log4cxx
  2. LOGCXX-129

Asyncappender is full of race conditions (improper use of condition variables)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.10.0
    • Component/s: Appender
    • Labels:
      None
    • Environment:
      all

      Description

      as title says.

      As a result, when used under any reasonable load, the dispatch() thread and all the append() threads will become blocked on their condition vars due to missed wakeup. Under lower load, sort of works, because the chances are the dispatcher will get woken up by a different append(). But as soon as the queue gets full, a missed wake up will occur, and all threads attempting to log will block.

      This is MAJOR problem, considering the website suggests current CVS head instead of 0.9.7. I was going to fix it myself and apply a patch, but needed to get my live systems working asap, so I've rolled back to 0.9.7. This works fine.

      I might come back at some point and submit a patch, but looking at the code, it seems that Curt Arnold was the one who ported over to APR threads, and he was the one who wrote the asyncappender, so I'm afraid I don't particularly trust the rest of the project now.

        Issue Links

          Activity

            People

            • Assignee:
              Curt Arnold
              Reporter:
              Robert Wyrobek
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development