Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-344

Log4cxx crash when running multiple threads

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 0.10.0
    • None
    • Core
    • None
    • Windows Vista - JNI call to c++ program to Log4cxx

    Description

      When I run one thread in java that calls the C program it works fine, but two or more threads cause a crash in Log4cxx

      D:\Temp>java -cp D:\dev.env\eclipse.workspace\MyWorkspace\honda-mqwrapper-v2\tar
      get\honda-mqwrapper2-2.0.0.jar com.honda.eu.mqwrapper2.RunAsThreads
      [thread 3080 also had an error]
      #

      1. An unexpected error has been detected by Java Runtime Environment:
        #
      2. [thread 5256 also had an error]
        EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x10152785, pid=4640, tid=3376
        #
      3. Java VM: Java HotSpot(TM) Client VM (1.6.0_02-b06 mixed mode, sharing)
      4. Problematic frame:
      5. C [log4cxx.dll+0x152785]
        #
      6. An error report file with more information is saved as hs_err_pid4640.log
        #
      7. If you would like to submit a bug report, please visit:
      8. http://java.sun.com/webapps/bugreport/crash.jsp
        #

      [error occurred during error reporting, step 270, id 0xc0000005]

      #

      1. An unexpected error has been detected by Java Runtime Environment:
        #
      2. EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x10152785, pid=4640, tid=3376
        #
      3. Java VM: Java HotSpot(TM) Client VM (1.6.0_02-b06 mixed mode, sharing)
      4. Problematic frame:
      5. C [log4cxx.dll+0x152785]
        #
      6. If you would like to submit a bug report, please visit:
      7. http://java.sun.com/webapps/bugreport/crash.jsp
        #

      --------------- T H R E A D ---------------

      Current thread (0x03fae000): JavaThread "Thread-0" [_thread_in_native, id=3376]

      siginfo: ExceptionCode=0xc0000005, reading address 0x0000002c

      Registers:
      EAX=0x00000028, EBX=0x6f312c21, ECX=0x00000000, EDX=0x657bd238
      ESP=0x041cf464, EBP=0x041cf474, ESI=0x041cf5a8, EDI=0x041cf534
      EIP=0x10152785, EFLAGS=0x00010206

      Top of Stack: (sp=0x041cf464)
      0x041cf464: 6f312c21 00000001 041cf4a0 10007465
      0x041cf474: 041cf484 1016009e 00000000 00000028
      0x041cf484: 041cf534 10100430 102c9818 00000001
      0x041cf494: 00000000 041cf6fc cccccccc cccccccc
      0x041cf4a4: cccccccc cccccccc cccccccc cccccccc
      0x041cf4b4: cccccccc cccccccc cccccccc cccccccc
      0x041cf4c4: cccccccc cccccccc cccccccc cccccccc
      0x041cf4d4: cccccccc cccccccc cccccccc cccccccc

      Instructions: (pc=0x10152785)
      0x10152775: 10 8b 45 0c 83 c0 07 83 e0 f8 89 45 0c 8b 4d 08
      0x10152785: 8b 51 2c 89 55 fc 8b 45 fc 8b 4d fc 8b 50 14 2b

      Stack: [0x04180000,0x041d0000), sp=0x041cf464, free space=317k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C [log4cxx.dll+0x152785]
      C [log4cxx.dll+0x16009e]
      C [log4cxx.dll+0x100430]
      C [log4cxx.dll+0xf7b2a]
      C [log4cxx.dll+0xf7bfc]
      C [log4cxx.dll+0xf7c6f]
      C [log4cxx.dll+0x11e7c7]
      C [log4cxx.dll+0x11e2a8]
      C [log4cxx.dll+0x1217f9]
      C [log4cxx.dll+0xc4b54]
      C [log4cxx.dll+0xc4c66]
      C [log4cxx.dll+0x11e69f]

      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j com.honda.eu.mqwrapper2.adapter.MQQueueManager.Constructor(Ljava/lang/String;Ljava/lang/String;)J+0
      j com.honda.eu.mqwrapper2.adapter.MQQueueManager.<init>(Ljava/lang/String;Ljava/lang/String;)V+131
      j com.honda.eu.mqwrapper2.adapter.QueueManagerFactory.createQueueManager(Ljava/lang/String;Ljava/lang/String;)Lcom/honda/eu/mqwrapper2/QueueManager;+6
      j com.honda.eu.mqwrapper2.RunAsThreads.run()V+41
      v ~StubRoutines::call_stub

      --------------- P R O C E S S ---------------

      Java Threads: ( => current thread )
      0x00e11c00 JavaThread "DestroyJavaVM" [_thread_blocked, id=2448]
      0x03fbd400 JavaThread "Thread-2" [_thread_in_native, id=5256]
      0x03fbd000 JavaThread "Thread-1" [_thread_in_native, id=3080]
      =>0x03fae000 JavaThread "Thread-0" [_thread_in_native, id=3376]
      0x00e4a800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=204]
      0x00e44400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=5684]
      0x00e43c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=3516]
      0x00e43800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5404]
      0x00e3b800 JavaThread "Finalizer" daemon [_thread_blocked, id=5660]
      0x00e32c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=3728]

      Other Threads:
      0x00e29c00 VMThread [id=5892]
      0x00e4bc00 WatcherThread [id=5864]

      VM state:not at safepoint (normal execution)

      VM Mutex/Monitor currently owned by a thread: None

      Heap
      def new generation total 960K, used 255K [0x23e00000, 0x23f00000, 0x242e0000)
      eden space 896K, 21% used [0x23e00000, 0x23e2fdd0, 0x23ee0000)
      from space 64K, 99% used [0x23ee0000, 0x23eefff8, 0x23ef0000)
      to space 64K, 0% used [0x23ef0000, 0x23ef0000, 0x23f00000)
      tenured generation total 4096K, used 201K [0x242e0000, 0x246e0000, 0x27e00000)
      the space 4096K, 4% used [0x242e0000, 0x243127a0, 0x24312800, 0x246e0000)
      compacting perm gen total 12288K, used 474K [0x27e00000, 0x28a00000, 0x2be00000)
      the space 12288K, 3% used [0x27e00000, 0x27e76870, 0x27e76a00, 0x28a00000)
      ro space 8192K, 62% used [0x2be00000, 0x2c2ff728, 0x2c2ff800, 0x2c600000)
      rw space 12288K, 52% used [0x2c600000, 0x2cc41eb8, 0x2cc42000, 0x2d200000)

      Dynamic libraries:
      0x00400000 - 0x00423000 C:\Windows\system32\java.exe
      0x77200000 - 0x77327000 C:\Windows\system32\ntdll.dll
      0x76a40000 - 0x76b1c000 C:\Windows\system32\kernel32.dll
      0x76b20000 - 0x76be6000 C:\Windows\system32\ADVAPI32.dll
      0x76da0000 - 0x76e63000 C:\Windows\system32\RPCRT4.dll
      0x7c340000 - 0x7c396000 C:\Program Files\Java\jre1.6.0_02\bin\msvcr71.dll
      0x6d7c0000 - 0x6da09000 C:\Program Files\Java\jre1.6.0_02\bin\client\jvm.dll
      0x75ce0000 - 0x75d7d000 C:\Windows\system32\USER32.dll
      0x75c90000 - 0x75cdb000 C:\Windows\system32\GDI32.dll
      0x749c0000 - 0x749f2000 C:\Windows\system32\WINMM.dll
      0x76cc0000 - 0x76d6a000 C:\Windows\system32\msvcrt.dll
      0x75af0000 - 0x75c35000 C:\Windows\system32\ole32.dll
      0x75ea0000 - 0x75f2d000 C:\Windows\system32\OLEAUT32.dll
      0x74980000 - 0x749b9000 C:\Windows\system32\OLEACC.dll
      0x77440000 - 0x7745e000 C:\Windows\system32\IMM32.DLL
      0x76e70000 - 0x76f38000 C:\Windows\system32\MSCTF.dll
      0x758b0000 - 0x758dc000 C:\Windows\system32\apphelp.dll
      0x77350000 - 0x77359000 C:\Windows\system32\LPK.DLL
      0x773b0000 - 0x7742d000 C:\Windows\system32\USP10.dll
      0x6d310000 - 0x6d318000 C:\Program Files\Java\jre1.6.0_02\bin\hpi.dll
      0x77330000 - 0x77337000 C:\Windows\system32\PSAPI.DLL
      0x6d770000 - 0x6d77c000 C:\Program Files\Java\jre1.6.0_02\bin\verify.dll
      0x6d3b0000 - 0x6d3cf000 C:\Program Files\Java\jre1.6.0_02\bin\java.dll
      0x6d7b0000 - 0x6d7bf000 C:\Program Files\Java\jre1.6.0_02\bin\zip.dll
      0x658b0000 - 0x658d1000 D:\eb09768\My Documents\Util\MQWrapper.dll
      0x76d70000 - 0x76d9d000 C:\Windows\system32\WS2_32.dll
      0x77340000 - 0x77346000 C:\Windows\system32\NSI.dll
      0x10000000 - 0x102e6000 D:\eb09768\My Documents\Util\log4cxx.dll
      0x72410000 - 0x72475000 C:\Windows\system32\ODBC32.dll
      0x73150000 - 0x731d5000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.6001.18000_none_886786f450a74a05\COMCTL32.dll
      0x75f30000 - 0x76a40000 C:\Windows\system32\SHELL32.dll
      0x75db0000 - 0x75e09000 C:\Windows\system32\SHLWAPI.dll
      0x75a70000 - 0x75ae3000 C:\Windows\system32\COMDLG32.dll
      0x656f0000 - 0x657c6000 C:\Windows\WinSxS\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\MSVCP90D.dll
      0x655c0000 - 0x656e3000 C:\Windows\WinSxS\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\MSVCR90D.dll
      0x74f40000 - 0x74f7b000 C:\Windows\system32\MSWSOCK.dll
      0x04270000 - 0x0427c000 C:\Program Files\IBM\WebSphere MQ\bin\MQ.dll
      0x6f250000 - 0x6f2de000 C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_e163563597edeada\MSVCP90.dll
      0x6f2e0000 - 0x6f383000 C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_e163563597edeada\MSVCR90.dll
      0x747e0000 - 0x7497e000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6002.18005_none_5cb72f96088b0de0\comctl32.dll
      0x72610000 - 0x72648000 C:\Windows\system32\odbcint.dll

      VM Arguments:
      java_command: com.honda.eu.mqwrapper2.RunAsThreads
      Launcher Type: SUN_STANDARD

      Environment Variables:
      JAVA_HOME=D:\dev.env\apps\jdk1.5.0_11\jdk1.5.0_11
      CLASSPATH=.;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc.jar;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\PROGRA~1\IBM\SQLLIB\bin;C:\PROGRA~1\IBM\SQLLIB\tools\db2XTrigger.jar;C:\PROGRA~1\IBM\SQLLIB\java\common.jar;C:\Program Files\Java\jre1.6.0_02\lib\ext\QTJava.zip
      PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program Files\RUMBA\System;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\tools\c\samples\bin;D:\eb09768\My Documents\Util;C:\NotesSQL;C:\Program Files\IBM\Lotus\Notes;D:\Program Files\TortoiseSVN\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\ThinkPad\ConnectUtilities\;MAVEN_HOME\bin;D:\dev.env\apps\apache-ant-1.7.1\bin
      USERNAME=eb09768
      OS=Windows_NT
      PROCESSOR_IDENTIFIER=x86 Family 6 Model 14 Stepping 12, GenuineIntel

      --------------- S Y S T E M ---------------

      OS: Windows Vista Build 6002 Service Pack 2

      CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 14 stepping 12, cmov, cx8, fxsr, mmx, sse, sse2, sse3

      Memory: 4k page, physical 2094760k(853760k free), swap 4194303k(2568396k free)

      vm_info: Java HotSpot(TM) Client VM (1.6.0_02-b06) for windows-x86, built on Jul 12 2007 01:16:14 by "java_re" with unknown MS VC++:1310

      Attachments

        Issue Links

          Activity

            People

              carnold@apache.org Curt Arnold
              lucpannekoeke Luc Pannekoeke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: