[ 
https://issues.apache.org/jira/browse/LOGCXX-416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13876194#comment-13876194
 ] 

Jin Qing commented on LOGCXX-416:
---------------------------------

It crashes on a normal log4j.xml.

Tested on:
x86_64-redhat-linux
gcc 4.4.5
Red Hat Enterprise Linux Server release 6.1 (santiago)

Got crash on VC2010Express also.
log4cxx Revision: 1559537
apr-1.5.0-win32-src.zip
apr-iconv-1.2.1-win32-src-r2.zip
Link log4cxx static.
No crash if using log4cxx.dll.

Call Stack:
>       TestLog.exe!allocator_alloc(apr_allocator_t * allocator, unsigned int 
> in_size)  Line 241 + 0x6 bytes    C
        TestLog.exe!apr_pool_create_ex(apr_pool_t * * newpool, apr_pool_t * 
parent, int (int)* abort_fn, apr_allocator_t * allocator)  Line 892 + 0xe bytes 
    C
        TestLog.exe!log4cxx::helpers::Pool::Pool()  Line 34 + 0x13 bytes        
C++
        TestLog.exe!log4cxx::helpers::FileWatchdog::checkAndConfigure()  Line 
47 + 0x8 bytes    C++
        TestLog.exe!log4cxx::helpers::FileWatchdog::run(apr_thread_t * 
__formal, void * data)  Line 80  C++
        TestLog.exe!launcher(apr_thread_t * thread, void * data)  Line 132 + 
0x19 bytes C++
        TestLog.exe!dummy_worker(void * opaque)  Line 80        C
        msvcr100d.dll!_callthreadstartex()  Line 314 + 0xf bytes        C
        msvcr100d.dll!_threadstartex(void * ptd)  Line 297      C
        kernel32.dll!7c80b729()         
        [Frames below may be incorrect and/or missing, no symbols loaded for 
kernel32.dll]      

Line241:     if (index <= allocator->max_index)
allocator = 0xfeeefeee

Because APRInitializer static variable is already decontructed.


> FileWatchdog thread crash on exit()
> -----------------------------------
>
>                 Key: LOGCXX-416
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-416
>             Project: Log4cxx
>          Issue Type: Bug
>          Components: Configurator
>    Affects Versions: 0.10.0
>            Reporter: Jin Qing
>            Assignee: Joseph Southwell
>            Priority: Critical
>
> On exit(), FileWatchdog::checkAndConfigure() calls apr_pool_creae() and crash.
> Test code:
> #include <log4cxx/xml/comconfigurator.h>
> class A
> {
> public:
>     A() {};
>     ~A() {
>         for (int i = 0; i < 1000000; i++)
>              for (int i = 0; i < 1000000; i++)
>                 ;
>     }
> } g_a;
> int main()
> {
>     log4cxx::xml::DOMConfigurator::configureAndWatch("log4j.xml", 1000);
>     return 0;
> }
> After main() returned, but main  thread is still running, watchdog thread 
> will crash when checkAdnConfigure().



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to