Issue Details (XML | Word | Printable)

Key: LOGCXX-36
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Michaël CATANZARITI
Reporter: Curt Arnold
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Log4cxx

Migrate to Apache Portable Runtime threads

Created: 26/Oct/04 10:36 PM   Updated: 03/May/06 03:01 AM
Return to search
Component/s: Appender
Affects Version/s: 0.9.7
Fix Version/s: 0.10.0

Time Tracking:
Not Specified

Resolution Date: 03/May/06 03:01 AM


 Description  « Hide
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.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order

Curt Arnold added a comment - 26/Nov/04 09:04 PM
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.

Curt Arnold added a comment - 26/Nov/04 09:05 PM
Atomic operations on Linux using APR appeared to be using mutexes instead of in-line assembler. Will need to research with APR 1.01.

Curt Arnold added a comment - 04/Jan/05 12:38 PM
Thread-specific data migrated to APR on 3 Jan 2005. Need to add tests to both log4j and log4cxx to make sure they work.