You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Hilton, Douglas" <Do...@pacourts.us> on 2005/06/07 17:33:42 UTC

EXCEPTION_ACCESS_VIOLATION using AsyncAppender

I have written my own custom appenders and am using the AsyncAppender to
wrap them. This is all running within the context of Sybase EAServer
4.2.2, with JDK 1.4.2_07 running on Win XP Pro (for development). If I
just use the custom appender, things work fine, but as soon as I wrap it
with the async appender, I get the stacktrace below and my EAServer
instance quits. Searches on Google and the net have not yeilded any
insight into this issue. Anyone have any ideas?

Below is the error I get when I attempt to log something using the async
appender.

Jun 07 11:08:57 2005: An unexpected exception has been detected in
native code outside the VM.
Jun 07 11:08:57 2005: Unexpected Signal : EXCEPTION_ACCESS_VIOLATION
(0xc0000005) occurred at PC=0x7C92AE22
Jun 07 11:08:57 2005: Function=
Jun 07 11:08:57 2005: RtlImpersonateSelf+0x3A5
Jun 07 11:08:57 2005: Library=C:\WINDOWS\system32\ntdll.dll
Jun 07 11:08:57 2005: 
Jun 07 11:08:57 2005: 
Jun 07 11:08:57 2005: Dynamic libraries:
Jun 07 11:08:57 2005: 0x00400000 - 0x0040C000 	C:\Program
Files\Sybase\EAServer\bin\jagsrv.exe
Jun 07 11:08:57 2005: 0x7C900000 - 0x7C9B0000
C:\WINDOWS\system32\ntdll.dll
Jun 07 11:08:57 2005: 0x7C800000 - 0x7C8F4000
C:\WINDOWS\system32\kernel32.dll
Jun 07 11:08:57 2005: 0x77DD0000 - 0x77E6B000
C:\WINDOWS\system32\ADVAPI32.dll
Jun 07 11:08:57 2005: 0x77E70000 - 0x77F01000
C:\WINDOWS\system32\RPCRT4.dll
Jun 07 11:08:57 2005: 0x77C10000 - 0x77C68000
C:\WINDOWS\system32\MSVCRT.dll
Jun 07 11:08:57 2005: 0x10000000 - 0x1001B000 	C:\Program
Files\Sybase\EAServer\dll\libjeas.dll
Jun 07 11:08:57 2005: 0x00280000 - 0x003CC000 	C:\Program
Files\Sybase\EAServer\dll\libjdispatch.dll
Jun 07 11:08:57 2005: 0x003D0000 - 0x003D9000 	C:\Program
Files\Sybase\EAServer\dll\libjaf.dll
Jun 07 11:08:57 2005: 0x003E0000 - 0x003ED000 	C:\Program
Files\Sybase\EAServer\dll\libjintl.dll
Jun 07 11:08:57 2005: 0x00410000 - 0x0046D000 	C:\Program
Files\Sybase\EAServer\dll\libjcomn.dll
Jun 07 11:08:57 2005: 0x003F0000 - 0x003F8000 	C:\Program
Files\Sybase\EAServer\dll\libjtml.dll
Jun 07 11:08:57 2005: 0x00470000 - 0x00480000 	C:\Program
Files\Sybase\EAServer\dll\libjcs.dll
Jun 07 11:08:57 2005: 0x00480000 - 0x004E4000 	C:\Program
Files\Sybase\EAServer\dll\libjsrv.dll
Jun 07 11:08:57 2005: 0x004F0000 - 0x0050E000 	C:\Program
Files\Sybase\EAServer\dll\libjtcl.dll
Jun 07 11:08:57 2005: 0x71AD0000 - 0x71AD9000
C:\WINDOWS\system32\WSOCK32.dll
Jun 07 11:08:57 2005: 0x71AB0000 - 0x71AC7000
C:\WINDOWS\system32\WS2_32.dll
Jun 07 11:08:57 2005: 0x71AA0000 - 0x71AA8000
C:\WINDOWS\system32\WS2HELP.dll
Jun 07 11:08:57 2005: 0x00510000 - 0x0053C000 	C:\Program
Files\Sybase\EAServer\dll\libjsybscl.dll
Jun 07 11:08:57 2005: 0x00540000 - 0x0059D000 	C:\Program
Files\Sybase\EAServer\dll\libjct.dll
Jun 07 11:08:57 2005: 0x005A0000 - 0x0061C000 	C:\Program
Files\Sybase\EAServer\dll\libjcc.dll
Jun 07 11:08:57 2005: 0x00620000 - 0x00993000 	C:\Program
Files\Sybase\EAServer\dll\libjctssecsrv.dll
Jun 07 11:08:57 2005: 0x009A0000 - 0x009CB000 	C:\Program
Files\Sybase\EAServer\dll\libjflexlm.dll
Jun 07 11:08:57 2005: 0x77D40000 - 0x77DD0000
C:\WINDOWS\system32\USER32.dll
Jun 07 11:08:57 2005: 0x77F10000 - 0x77F56000
C:\WINDOWS\system32\GDI32.dll
Jun 07 11:08:57 2005: 0x5B860000 - 0x5B8B4000
C:\WINDOWS\system32\NETAPI32.dll
Jun 07 11:08:57 2005: 0x763B0000 - 0x763F9000
C:\WINDOWS\system32\comdlg32.dll
Jun 07 11:08:57 2005: 0x77F60000 - 0x77FD6000
C:\WINDOWS\system32\SHLWAPI.dll
Jun 07 11:08:57 2005: 0x5D090000 - 0x5D127000
C:\WINDOWS\system32\COMCTL32.dll
Jun 07 11:08:57 2005: 0x7C9C0000 - 0x7D1D4000
C:\WINDOWS\system32\SHELL32.dll
Jun 07 11:08:57 2005: 0x76D60000 - 0x76D79000
C:\WINDOWS\system32\iphlpapi.dll
Jun 07 11:08:57 2005: 0x74320000 - 0x7435D000
C:\WINDOWS\system32\ODBC32.dll
Jun 07 11:08:57 2005: 0x77120000 - 0x771AC000
C:\WINDOWS\system32\OLEAUT32.dll
Jun 07 11:08:57 2005: 0x774E0000 - 0x7761D000
C:\WINDOWS\system32\ole32.dll
Jun 07 11:08:57 2005: 0x009D0000 - 0x009F5000 	C:\Program
Files\Sybase\EAServer\dll\libjhttp.dll
Jun 07 11:08:57 2005: 0x00A00000 - 0x00A18000 	C:\Program
Files\Sybase\EAServer\dll\libjblk.dll
Jun 07 11:08:57 2005: 0x00A20000 - 0x00A36000 	C:\Program
Files\Sybase\EAServer\dll\libjcm.dll
Jun 07 11:08:57 2005: 0x773D0000 - 0x774D2000
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df
_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
Jun 07 11:08:57 2005: 0x20000000 - 0x20017000
C:\WINDOWS\system32\odbcint.dll
Jun 07 11:08:57 2005: 0x01370000 - 0x01377000 	C:\Program
Files\Sybase\EAServer\dll\nlwnsck.dll
Jun 07 11:08:57 2005: 0x01380000 - 0x01385000
c:\sybase\OCS-12_5\dll\nlmsnmp.dll
Jun 07 11:08:57 2005: 0x71A50000 - 0x71A8F000
C:\WINDOWS\system32\mswsock.dll
Jun 07 11:08:57 2005: 0x662B0000 - 0x66308000
C:\WINDOWS\system32\hnetcfg.dll
Jun 07 11:08:57 2005: 0x71A90000 - 0x71A98000
C:\WINDOWS\System32\wshtcpip.dll
Jun 07 11:08:57 2005: 0x76F20000 - 0x76F47000
C:\WINDOWS\system32\DNSAPI.dll
Jun 07 11:08:57 2005: 0x76FB0000 - 0x76FB8000
C:\WINDOWS\System32\winrnr.dll
Jun 07 11:08:57 2005: 0x76F60000 - 0x76F8C000
C:\WINDOWS\system32\WLDAP32.dll
Jun 07 11:08:57 2005: 0x76FC0000 - 0x76FC6000
C:\WINDOWS\system32\rasadhlp.dll
Jun 07 11:08:57 2005: 0x01940000 - 0x0195D000 	C:\Program
Files\Sybase\EAServer\dll\libjjdk12.dll
Jun 07 11:08:57 2005: 0x08000000 - 0x08138000
c:\j2sdk1.4.2_07\jre\bin\client\jvm.dll
Jun 07 11:08:57 2005: 0x76B40000 - 0x76B6D000
C:\WINDOWS\system32\WINMM.dll
Jun 07 11:08:57 2005: 0x01BC0000 - 0x01BC7000
c:\j2sdk1.4.2_07\jre\bin\hpi.dll
Jun 07 11:08:57 2005: 0x01BE0000 - 0x01BEE000
c:\j2sdk1.4.2_07\jre\bin\verify.dll
Jun 07 11:08:57 2005: 0x01BF0000 - 0x01C09000
c:\j2sdk1.4.2_07\jre\bin\java.dll
Jun 07 11:08:57 2005: 0x01C10000 - 0x01C1D000
c:\j2sdk1.4.2_07\jre\bin\zip.dll
Jun 07 11:08:57 2005: 0x04680000 - 0x0468F000
C:\j2sdk1.4.2_07\jre\bin\net.dll
Jun 07 11:08:57 2005: 0x04850000 - 0x04857000 	C:\Program
Files\Sybase\EAServer\dll\libjcmping.dll
Jun 07 11:08:57 2005: 0x76C90000 - 0x76CB8000
C:\WINDOWS\system32\imagehlp.dll
Jun 07 11:08:57 2005: 0x59A60000 - 0x59B01000
C:\WINDOWS\system32\DBGHELP.dll
Jun 07 11:08:57 2005: 0x77C00000 - 0x77C08000
C:\WINDOWS\system32\VERSION.dll
Jun 07 11:08:57 2005: 0x76BF0000 - 0x76BFB000
C:\WINDOWS\system32\PSAPI.DLL
Jun 07 11:08:57 2005: 
Jun 07 11:08:57 2005: Heap at VM Abort:
Jun 07 11:08:57 2005: 
Jun 07 11:08:57 2005: Heap
Jun 07 11:08:57 2005:  PSYoungGen     
Jun 07 11:08:57 2005:  total 180224K, used 148904K
Jun 07 11:08:57 2005:  [0x20020000, 0x2c020000, 0x2c020000)
Jun 07 11:08:57 2005:   eden
Jun 07 11:08:57 2005:  space 163840K, 80% used
Jun 07 11:08:57 2005:  [0x20020000,0x2818a0e0,0x2a020000)
Jun 07 11:08:57 2005:   from
Jun 07 11:08:57 2005:  space 16384K, 100% used
Jun 07 11:08:57 2005:  [0x2b020000,0x2c020000,0x2c020000)
Jun 07 11:08:57 2005:   to  
Jun 07 11:08:57 2005:  space 16384K, 0% used
Jun 07 11:08:57 2005:  [0x2a020000,0x2a020000,0x2b020000)
Jun 07 11:08:57 2005:  PSOldGen       
Jun 07 11:08:57 2005:  total 196608K, used 558K
Jun 07 11:08:57 2005:  [0x2c020000, 0x38020000, 0x40020000)
Jun 07 11:08:57 2005:   object
Jun 07 11:08:57 2005:  space 196608K, 0% used
Jun 07 11:08:57 2005:  [0x2c020000,0x2c0abb30,0x38020000)
Jun 07 11:08:57 2005:  PSPermGen      
Jun 07 11:08:57 2005:  total 7424K, used 7326K
Jun 07 11:08:57 2005:  [0x40020000, 0x40760000, 0x44020000)
Jun 07 11:08:57 2005:   object
Jun 07 11:08:57 2005:  space 7424K, 98% used
Jun 07 11:08:57 2005:  [0x40020000,0x40747b00,0x40760000)
Jun 07 11:08:57 2005: 
Jun 07 11:08:57 2005: Local Time = Tue Jun 07 11:08:57 2005
Jun 07 11:08:57 2005: Elapsed Time = 120
Jun 07 11:08:57 2005: #
Jun 07 11:08:57 2005: # The exception above was detected in native code
outside the VM
Jun 07 11:08:57 2005: #
Jun 07 11:08:57 2005: # Java VM: Java HotSpot(TM) Client VM
(1.4.2_07-b05 mixed mode)
Jun 07 11:08:57 2005: #
Jun 07 11:08:57 2005: Java VM aborting...

My log4j.xml file is posted below:
	<appender name="A7"
class="aopc.cpp.log4j.appender.CPCMSPerfAppender">
			<param name="DatasourceName"
value="java:comp/env/jdbc/AOPC_CPP_PERF"/>
			<param name="LogEnabled" value="true"/>
	</appender>
	
	<appender name="A8"
class="aopc.cpp.log4j.appender.CPCMSXMLAppender">
			<param name="DatasourceName"
value="java:comp/env/jdbc/AOPC_CPP_PERF"/>
			<param name="Pattern"
value="\\(([A-Za-z0-9_]*)\\)\\((.*)\\)\\(([A-Za-z0-9_]*)\\)\\((true|fals
e)\\)\\(([A-Za-z0-9_]*)\\)\\((.*)\\)"/>
			<param name="LogEnabled" value="true"/>
	</appender>
	
	<appender name="ASYNC_A7"
class="org.apache.log4j.AsyncAppender">
		<param name="BufferSize" value="128"/>
		<appender-ref ref="A7"/>
	</appender>

	<appender name="ASYNC_A8"
class="org.apache.log4j.AsyncAppender">
		<param name="BufferSize" value="128"/>
		<appender-ref ref="A8"/>
	</appender>

	<logger name="xml" additivity="false">
			<level value="XML"
class="aopc.cpp.log4j.levels.XMLLevel"/>
			<appender-ref ref="ASYNC_A8"/>
	</logger>

	<logger name="perf" additivity="true">
			<level value="PERF"
class="aopc.cpp.log4j.levels.PERFLevel"/>
			<appender-ref ref="ASYNC_A7"/>
	</logger>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org