Log4cxx
  1. Log4cxx
  2. LOGCXX-36

Migrate to Apache Portable Runtime threads

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.7
    • Fix Version/s: 0.10.0
    • Component/s: Appender
    • Labels:
      None

      Description

      log4cxx currently has its own generic threading framework which has several substantial drawbacks:

      The implementation forces the log4cxx build time config.h to appear in the <logger.h> and other header files.

      Contains Solaris assembler that none of the current developers can support.

      Windows threading implementation is neglected and gets stale readily.

      Using Apache Portable Runtime (http://apr.apache.org) for threading appears to be desirable to eliminate those issues from our development. APR threading does appear to be conceptually similar with the currently used pthread which should hopefully ease migration.

      An alternative would be to use Mozilla Portable Runtime, however unless there are unsurmountable technical issues with APR, keeping everything in the Apache family would appear to be desirable.

      Addressing the Unicode issue would likely involve adding an APR dependency to use APR-iconv, so adding APR for threading should not raise substantial additional deployment issues.

        Activity

        Show
        Curt Arnold added a comment - Thread related issues: Solaris: http://nagoya.apache.org/eyebrowse/ReadMsg?listName=log4cxx-user@logging.apache.org&msgId=1895759 Thread name: http://nagoya.apache.org/eyebrowse/ReadMsg?listName=log4cxx-user@logging.apache.org&msgId=1629914
        Hide
        Curt Arnold added a comment -

        CVS commit messages

        http://nagoya.apache.org/eyebrowse/ReadMsg?listName=log4cxx-dev@logging.apache.org&msgNo=361
        http://nagoya.apache.org/eyebrowse/ReadMsg?listName=log4cxx-dev@logging.apache.org&msgNo=362
        http://nagoya.apache.org/eyebrowse/ReadMsg?listName=log4cxx-dev@logging.apache.org&msgNo=364

        To avoid deadlocks, log4cxx::helpers::Mutex currently specifies nestable mutexes. It should not require much additional effort to eliminate nesting of mutex locks and allow use of platform optimial mutexes.

        Most of the network related appenders had substantial changes, but only the socket appender has sufficient unit tests to have confident that the changes weren't seriously damaging.

        AsynchAppender will lock up in Windows when the queue is full (occurs in test3), but not in Linux. Will need to research using newly released APR 1.01 and either correct or log APR bug.

        Have modified Makefile.am. Hard coded APR location as /usr/local/apr-1. APR apparently has a script that can be used to generate appropriate include and library paths, but I'm not very good with Autogen et al and would appreciate assistance.

        Show
        Curt Arnold added a comment - CVS commit messages http://nagoya.apache.org/eyebrowse/ReadMsg?listName=log4cxx-dev@logging.apache.org&msgNo=361 http://nagoya.apache.org/eyebrowse/ReadMsg?listName=log4cxx-dev@logging.apache.org&msgNo=362 http://nagoya.apache.org/eyebrowse/ReadMsg?listName=log4cxx-dev@logging.apache.org&msgNo=364 To avoid deadlocks, log4cxx::helpers::Mutex currently specifies nestable mutexes. It should not require much additional effort to eliminate nesting of mutex locks and allow use of platform optimial mutexes. Most of the network related appenders had substantial changes, but only the socket appender has sufficient unit tests to have confident that the changes weren't seriously damaging. AsynchAppender will lock up in Windows when the queue is full (occurs in test3), but not in Linux. Will need to research using newly released APR 1.01 and either correct or log APR bug. Have modified Makefile.am. Hard coded APR location as /usr/local/apr-1. APR apparently has a script that can be used to generate appropriate include and library paths, but I'm not very good with Autogen et al and would appreciate assistance.
        Hide
        Curt Arnold added a comment -

        Atomic operations on Linux using APR appeared to be using mutexes instead of in-line assembler. Will need to research with APR 1.01.

        Show
        Curt Arnold added a comment - Atomic operations on Linux using APR appeared to be using mutexes instead of in-line assembler. Will need to research with APR 1.01.
        Hide
        Curt Arnold added a comment -

        Thread-specific data migrated to APR on 3 Jan 2005. Need to add tests to both log4j and log4cxx to make sure they work.

        Show
        Curt Arnold added a comment - Thread-specific data migrated to APR on 3 Jan 2005. Need to add tests to both log4j and log4cxx to make sure they work.

          People

          • Assignee:
            Michaël CATANZARITI
            Reporter:
            Curt Arnold
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development