I am trying to Install Oracle 11G on Windows Xp 64 bit. The installer shows the progress bar for checking prerequisites and then crashes.
The log file is as below.
What can I do to solve the issue?
#
An unexpected error has been detected by HotSpot Virtual Machine:
#
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000077d64e95,
pid=3580, tid=2860
#
Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_17-b04 mixed mode)
Problematic frame:
C [kernel32.dll+0x24e95]
#
--------------- T H R E A D ---------------
Current thread (0x0000000001ba0740):
JavaThread "AWT-EventQueue-0"
[_thread_in_native, id=2860]
siginfo: ExceptionCode=0xc0000005,
reading address 0x000000007f366f48
Registers: EAX=0x0000000000000000,
EBX=0x000000007f366f48,
ECX=0xffffffffffffffff,
EDX=0x0000000000000104
ESP=0x000000000776de70,
EBP=0x0000000000000000,
ESI=0x00000000000004e4,
EDI=0x000000007f366f48
EIP=0x0000000077d64e95,
EFLAGS=0x0000000000010246
Top of Stack: (sp=0x000000000776de70)
0x000000000776de70: 0000000000000006
0000000000000000 0x000000000776de80:
0000000000000000 0000000000000020
0x000000000776de90: 0000000000000005
00000000001956b0 0x000000000776dea0:
0000000010020200 00000000080b95e6
0x000000000776deb0: 0000000020a9c058
0000000077efb1e9 0x000000000776dec0:
0000000000000000 0000000077c4ef3d
0x000000000776ded0: 0000ebe94f6aad20
0000000001ba0740 0x000000000776dee0:
000000000776e388 000000001257ad50
0x000000000776def0: 0000000001e9cba1
0000000020a9c340 0x000000000776df00:
000000000000006d 000000000776e348
0x000000000776df10: 000000001257ad50
0000000006cbd5f9 0x000000000776df20:
000000000776dfe8 000000000776e0a8
0x000000000776df30: 0000000000000000
000007ff7f1e4273 0x000000000776df40:
000000000776e080 0000000000000104
0x000000000776df50: 0000ebe94f6aad20
00000000001956b0 0x000000000776df60:
000000000016a090 000000000776dfe8
Instructions: (pc=0x0000000077d64e95)
0x0000000077d64e85: ff 33 c0 48 b9
ff ff ff ff ff ff ff ff 48 8b fb
0x0000000077d64e95: f2 ae 48 f7 d1
44 8b e9 e9 1e 86 00 00 90 90 90
Stack:
[0x0000000007670000,0x0000000007770000),
sp=0x000000000776de70, free
space=1015k Native frames: (J=compiled
Java code, j=interpreted, Vv=VM code,
C=native code) C
[kernel32.dll+0x24e95]
[error occurred during error
reporting, step 120, id 0xc0000005]
Java frames: (J=compiled Java code,
j=interpreted, Vv=VM code) j
sun.awt.shell.Win32ShellFolder2.getLinkLocation(JJZ)J+0
j
sun.awt.shell.Win32ShellFolder2.getLinkLocation(Z)Lsun/awt/shell/ShellFolder;+20
j
sun.awt.shell.Win32ShellFolder2.isDirectory()Z+69
j
sun.awt.shell.Win32ShellFolder2.isDirectory()Z+79
j
sun.awt.shell.Win32ShellFolderManager2.get(Ljava/lang/String;)Ljava/lang/Object;+156
j
sun.awt.shell.ShellFolder.get(Ljava/lang/String;)Ljava/lang/Object;+4
j
oracle.bali.ewt.olaf2.OracleFileChooserUI.installComponents(Ljavax/swing/JFileChooser;)V+794
j
javax.swing.plaf.basic.BasicFileChooserUI.installUI(Ljavax/swing/JComponent;)V+47
j
oracle.bali.ewt.olaf2.OracleFileChooserUI.installUI(Ljavax/swing/JComponent;)V+2
j
javax.swing.JComponent.setUI(Ljavax/swing/plaf/ComponentUI;)V+42
j
javax.swing.JFileChooser.updateUI()V+40
j
javax.swing.JFileChooser.setup(Ljavax/swing/filechooser/FileSystemView;)V+73
j
javax.swing.JFileChooser.(Ljava/io/File;Ljavax/swing/filechooser/FileSystemView;)V+133
j
javax.swing.JFileChooser.()V+9 j
oracle.install.commons.swing.XmlBeanStoreFileChooser.()V+1
j
oracle.install.commons.base.summary.SummaryPane.buildUI()V+25
j
oracle.install.commons.base.summary.SummaryPane.()V+35
j
oracle.install.commons.base.interview.common.view.SummaryGUI.()V+9
v ~StubRoutines::call_stub j
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Ljava/lang/reflect/Constructor;[Ljava/lang/Object;)Ljava/lang/Object;+0
j
sun.reflect.NativeConstructorAccessorImpl.newInstance([Ljava/lang/Object;)Ljava/lang/Object;+72
j
sun.reflect.DelegatingConstructorAccessorImpl.newInstance([Ljava/lang/Object;)Ljava/lang/Object;+5
j
java.lang.reflect.Constructor.newInstance([Ljava/lang/Object;)Ljava/lang/Object;+92
j
java.lang.Class.newInstance0()Ljava/lang/Object;+118
j
java.lang.Class.newInstance()Ljava/lang/Object;+15
j
oracle.install.commons.flow.ViewManager.getView(Ljava/lang/String;)Loracle/install/commons/flow/View;+72
j
oracle.install.commons.flow.State.getView()Loracle/install/commons/flow/View;+19
j
oracle.install.commons.flow.AbstractFlowExecutor.loadView(Loracle/install/commons/util/Graph;)V+20
j
oracle.install.commons.flow.AbstractGraphicalFlowExecutor.access$001(Loracle/install/commons/flow/AbstractGraphicalFlowExecutor;Loracle/install/commons/util/Graph;)V+2
j
oracle.install.commons.flow.AbstractGraphicalFlowExecutor$1.call()Ljava/lang/Void;+8
j
oracle.install.commons.flow.AbstractGraphicalFlowExecutor$1.call()Ljava/lang/Object;+1
j
java.util.concurrent.FutureTask$Sync.innerRun()V+22
j
java.util.concurrent.FutureTask.run()V+4
j
java.awt.event.InvocationEvent.dispatch()V+47
j
java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+26
j
java.awt.EventDispatchThread.pumpOneEventForHierarchy(ILjava/awt/Component;)Z+233
j
java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+26
j
java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
j
java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
j
java.awt.EventDispatchThread.run()V+9
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x0000000001ba0490 JavaThread "Image
Fetcher 0" daemon [_thread_blocked,
id=3088] 0x0000000001ba1cc0
JavaThread "TimerQueue" daemon
[_thread_blocked, id=3252]
0x0000000001ba1a10 JavaThread
"pool-1-thread-1" [_thread_blocked,
id=4912] 0x0000000001b9e700
JavaThread "DestroyJavaVM"
[_thread_blocked, id=3504]
0x0000000001ba1760 JavaThread "Worker
3" daemon [_thread_blocked, id=3660]
0x0000000001ba14b0 JavaThread "Worker
2" daemon [_thread_blocked, id=3720]
0x0000000001ba1200 JavaThread "Worker
1" daemon [_thread_blocked, id=1936]
0x0000000001ba0f50 JavaThread "Worker
0" daemon [_thread_blocked, id=4016]
=>0x0000000001ba0740 JavaThread "AWT-EventQueue-0" [_thread_in_native,
id=2860] 0x0000000001b9f720
JavaThread "AWT-Shutdown"
[_thread_blocked, id=2276]
0x0000000001b9ff30 JavaThread "Java2D
Disposer" daemon [_thread_blocked,
id=4064] 0x0000000001b9f9d0
JavaThread "AWT-Windows" daemon
[_thread_in_native, id=2376]
0x0000000001b9f1c0 JavaThread "Low
Memory Detector" daemon
[_thread_blocked, id=1764]
0x000000000557f720 JavaThread
"CompilerThread1" daemon
[_thread_blocked, id=4204]
0x000000000557f450 JavaThread
"CompilerThread0" daemon
[_thread_blocked, id=3604]
0x000000000557f180 JavaThread
"AdapterThread" daemon
[_thread_blocked, id=1976]
0x0000000001b9ef10 JavaThread "Signal
Dispatcher" daemon [_thread_blocked,
id=2296] 0x0000000001b9ec60
JavaThread "Finalizer" daemon
[_thread_blocked, id=3608]
0x0000000001b9e9b0 JavaThread
"Reference Handler" daemon
[_thread_blocked, id=2012]
Other Threads: 0x0000000001b8d980
VMThread [id=4856]
0x0000000001b8daa0 WatcherThread
[id=1224]
VM state:not at safepoint (normal
execution)
VM Mutex/Monitor currently owned by a
thread: None
Heap PSYoungGen total 62592K,
used 56702K [0x000000001d410000,
0x0000000021410000,
0x0000000021410000) eden space
59648K, 93% used
[0x000000001d410000,0x0000000020aab7d8,0x0000000020e50000)
from space 2944K, 26% used
[0x0000000020e50000,0x0000000020f140c0,0x0000000021130000)
to space 2880K, 0% used
[0x0000000021140000,0x0000000021140000,0x0000000021410000)
PSOldGen total 12800K, used
9744K [0x0000000015410000,
0x0000000016090000,
0x000000001d410000) object space
12800K, 76% used
[0x0000000015410000,0x0000000015d94300,0x0000000016090000)
PSPermGen total 54016K, used
38334K [0x0000000010010000,
0x00000000134d0000,
0x0000000015410000) object space
54016K, 70% used
[0x0000000010010000,0x000000001257f820,0x00000000134d0000)
Dynamic libraries: 0x0000000000400000
- 0x0000000000412000 C:\DOCUME~1\rrscw\LOCALS~1\Temp\OraInstall2011-03-30_10-02-25AM\jdk\jre\bin\javaw.exe
0x0000000077ec0000 -
0x0000000077ff9000
C:\WINDOWS\system32\ntdll.dll
0x0000000077d40000 -
0x0000000077eb3000
C:\WINDOWS\system32\kernel32.dll
0x000007ff7fee0000 -
0x000007ff7ffe5000
C:\WINDOWS\system32\ADVAPI32.dll
0x000007ff7fd30000 -
0x000007ff7fec9000
C:\WINDOWS\system32\RPCRT4.dll
0x000007ff7e9c0000 -
0x000007ff7e9e2000
C:\WINDOWS\system32\Secur32.dll
0x0000000077c20000 -
0x0000000077d2c000
C:\WINDOWS\system32\USER32.dll
0x000007ff7fc90000 -
0x000007ff7fd2b000
C:\WINDOWS\system32\GDI32.dll
0x000007ff7fc00000 -
0x000007ff7fc86000
C:\WINDOWS\system32\msvcrt.dll
0x0000000180000000 -
0x00000001800f3000
c:\progra~1\quickh~1\quickh~2\wl_hoo~1.dll
0x000007ff7f190000 -
0x000007ff7fb9a000
C:\WINDOWS\system32\SHELL32.dll
0x000007ff7ef60000 -
0x000007ff7effb000
C:\WINDOWS\system32\SHLWAPI.dll
0x000007ff7f000000 -
0x000007ff7f187000
C:\WINDOWS\WinSxS\amd64_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.3959_x-ww_0A7B2435\comctl32.dll 0x0000000008000000 -
0x0000000008561000
C:\DOCUME~1\rrscw\LOCALS~1\Temp\OraInstall2011-03-30_10-02-25AM\jdk\jre\bin\server\jvm.dll 0x000007ff7e240000 -
0x000007ff7e290000
C:\WINDOWS\system32\WINMM.dll
0x0000000010000000 -
0x000000001000b000
C:\DOCUME~1\rrscw\LOCALS~1\Temp\OraInstall2011-03-30_10-02-25AM\jdk\jre\bin\hpi.dll
0x000007ff7e380000 -
0x000007ff7e390000
C:\WINDOWS\system32\PSAPI.DLL
0x00000000003d0000 -
0x00000000003e1000
C:\DOCUME~1\rrscw\LOCALS~1\Temp\OraInstall2011-03-30_10-02-25AM\jdk\jre\bin\verify.dll
0x0000000001e40000 -
0x0000000001e6c000
C:\DOCUME~1\rrscw\LOCALS~1\Temp\OraInstall2011-03-30_10-02-25AM\jdk\jre\bin\java.dll 0x0000000001e70000 -
0x0000000001e86000
C:\DOCUME~1\rrscw\LOCALS~1\Temp\OraInstall2011-03-30_10-02-25AM\jdk\jre\bin\zip.dll
0x0000000006b50000 -
0x0000000006d6b000 C:\Documents and
Settings\rrscw\Local
Settings\Temp\OraInstall2011-03-30_10-02-25AM\jdk\jre\bin\awt.dll
0x000007ff78f10000 -
0x000007ff78f51000
C:\WINDOWS\system32\WINSPOOL.DRV
0x000007ff7d500000 -
0x000007ff7d539000
C:\WINDOWS\system32\IMM32.dll
0x000007ff57140000 -
0x000007ff573c5000
C:\WINDOWS\system32\ole32.dll
0x000007ff77230000 -
0x000007ff772af000
C:\WINDOWS\system32\uxtheme.dll
0x000007ff79190000 -
0x000007ff79202000
C:\WINDOWS\system32\ddraw.dll
0x000007ff793e0000 -
0x000007ff793e8000
C:\WINDOWS\system32\DCIMAN32.dll
0x000007ff7a410000 -
0x000007ff7a4af000
C:\WINDOWS\system32\MSCTF.dll
0x0000000007430000 -
0x00000000074aa000 C:\Documents and
Settings\rrscw\Local
Settings\Temp\OraInstall2011-03-30_10-02-25AM\jdk\jre\bin\fontmanager.dll
0x00000000075b0000 -
0x00000000075cb000 C:\Documents and
Settings\rrscw\Local
Settings\Temp\OraInstall2011-03-30_10-02-25AM\jdk\jre\bin\net.dll
0x000007ff77310000 -
0x000007ff77340000
C:\WINDOWS\system32\WS2_32.dll
0x000007ff77140000 -
0x000007ff7714c000
C:\WINDOWS\system32\WS2HELP.dll
0x0000000007650000 -
0x000000000765c000 C:\Documents and
Settings\rrscw\Local
Settings\Temp\OraInstall2011-03-30_10-02-25AM\jdk\jre\bin\nio.dll
0x0000000007770000 -
0x00000000077ad000 C:\Documents and
Settings\rrscw\Local
Settings\Temp\OraInstall2011-03-30_10-02-25AM\oui\lib\win64\oraInstaller.dll
0x000007ff7fbf0000 -
0x000007ff7fbfb000
C:\WINDOWS\system32\VERSION.dll
0x0000000078000000 -
0x0000000078060000 C:\Documents and
Settings\rrscw\Local
Settings\Temp\OraInstall2011-03-30_10-02-25AM\oui\lib\win64\msvcrt.dll
0x000007ff771b0000 -
0x000007ff7722d000
C:\WINDOWS\System32\mswsock.dll
0x000007ff7e8f0000 -
0x000007ff7e93e000
C:\WINDOWS\system32\DNSAPI.dll
0x000007ff7e9f0000 -
0x000007ff7e9fb000
C:\WINDOWS\System32\winrnr.dll
0x000007ff7e950000 -
0x000007ff7e9b6000
C:\WINDOWS\system32\WLDAP32.dll
0x000007ff7ea00000 -
0x000007ff7ea07000
C:\WINDOWS\system32\rasadhlp.dll
0x000007ff57040000 -
0x000007ff57071000
C:\WINDOWS\system32\iphlpapi.dll
0x000007ff7e560000 -
0x000007ff7e58b000
C:\WINDOWS\system32\MPRAPI.dll
0x000007ff7e780000 -
0x000007ff7e7db000
C:\WINDOWS\system32\ACTIVEDS.dll
0x000007ff7e730000 -
0x000007ff7e770000
C:\WINDOWS\system32\adsldpc.dll
0x000007ff77370000 -
0x000007ff77409000
C:\WINDOWS\system32\NETAPI32.dll
0x000007ff7e3a0000 -
0x000007ff7e3d9000
C:\WINDOWS\system32\credui.dll
0x000007ff7e040000 -
0x000007ff7e05c000
C:\WINDOWS\system32\ATL.DLL
0x000007ff7ebc0000 -
0x000007ff7ecd6000
C:\WINDOWS\system32\OLEAUT32.dll
0x000007ff7e610000 -
0x000007ff7e625000
C:\WINDOWS\system32\rtutils.dll
0x000007ff77150000 -
0x000007ff77166000
C:\WINDOWS\system32\SAMLIB.dll
0x000007ff7dac0000 -
0x000007ff7dc38000
C:\WINDOWS\system32\SETUPAPI.dll
0x000007ff6d200000 -
0x000007ff6d293000
C:\WINDOWS\system32\hnetcfg.dll
0x000007ff77170000 -
0x000007ff7717b000
C:\WINDOWS\System32\wshtcpip.dll
0x0000000007970000 -
0x0000000007977000 C:\Documents and
Settings\rrscw\Local
Settings\Temp\OraInstall2011-03-30_10-02-25AM\oui\lib\win64\orauts.dll
0x0000000007b20000 -
0x0000000007b2d000 C:\Documents and
Settings\rrscw\Local
Settings\Temp\OraInstall2011-03-30_10-02-25AM\oui\lib\win64\orawsec11.dll
0x0000000078130000 -
0x00000000781f9000
C:\WINDOWS\WinSxS\amd64_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4027_x-ww_189D5EB0\MSVCR80.dll 0x0000000007c50000 -
0x0000000007cf4000 C:\Documents and
Settings\rrscw\Local
Settings\Temp\OraInstall2011-03-30_10-02-25AM\oui\lib\win64\orasrvm11.dll
0x0000000007a90000 -
0x0000000007abd000 C:\Documents and
Settings\rrscw\Local
Settings\Temp\OraInstall2011-03-30_10-02-25AM\jdk\jre\bin\dcpr.dll 0x000007ff76200000 -
0x000007ff762ef000
C:\WINDOWS\WinSxS\amd64_Microsoft.Windows.Common-Controls_6595b64144ccf1df_5.82.3790.3959_x-ww_AB06DEB0\comctl32.dll 0x000007ff772d0000 -
0x000007ff772f1000
C:\WINDOWS\system32\MPR.dll
0x000007ff7ccc0000 -
0x000007ff7ccca000
C:\WINDOWS\System32\drprov.dll
0x000007ff649f0000 -
0x000007ff64a06000
C:\WINDOWS\System32\ntlanman.dll
0x000007ff65140000 -
0x000007ff65164000
C:\WINDOWS\System32\NETUI0.dll
0x000007ff650e0000 -
0x000007ff65138000
C:\WINDOWS\System32\NETUI1.dll
0x000007ff7ceb0000 -
0x000007ff7cebd000
C:\WINDOWS\System32\davclnt.dll
0x000007ff7ce50000 -
0x000007ff7ce91000
C:\WINDOWS\system32\apphelp.dll
0x000007ff7ea10000 -
0x000007ff7eaee000
C:\WINDOWS\system32\CLBCatQ.DLL
0x000007ff7eaf0000 -
0x000007ff7ebb6000
C:\WINDOWS\system32\COMRes.dll
0x000007ff7df70000 -
0x000007ff7df7c000
C:\WINDOWS\system32\LINKINFO.dll
0x000007ff7df80000 -
0x000007ff7dfb1000
C:\WINDOWS\system32\ntshrui.dll
VM Arguments: jvm_args:
-Doracle.installer.library_loc=C:\DOCUME~1\rrscw\LOCALS~1\Temp\OraInstall2011-03-30_10-02-25AM\oui\lib\win64
-Doracle.installer.oui_loc=C:\DOCUME~1\rrscw\LOCALS~1\Temp\OraInstall2011-03-30_10-02-25AM\oui
-Doracle.installer.bootstrap=TRUE -Doracle.installer.startup_location=I:\Setups\Oracle\database\install
-Doracle.installer.jre_loc=C:\DOCUME~1\rrscw\LOCALS~1\Temp\OraInstall2011-03-30_10-02-25AM\jdk/jre
-Doracle.installer.exec_location=I:\Setups\Oracle\database\install\oui.exe
-Doracle.installer.nlsEnabled=TRUE -Doracle.installer.prereqConfigLoc= -Xmx192m java_command: oracle.install.ivw.db.driver.DBInstaller
-scratchPath C:\DOCUME~1\rrscw\LOCALS~1\Temp\OraInstall2011-03-30_10-02-25AM
-sourceLoc I:\Setups\Oracle\database\install../stage/products.xml
-sourceType network -timestamp 2011-03-30_10-02-25AM Launcher Type:
SUN_STANDARD
Environment Variables:
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files (x86)\Common Files\Roxio
Shared\DLLShared\;C:\Program Files
(x86)\Common Files\Roxio
Shared\10.0\DLLShared\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program
Files (x86)\Microsoft SQL
Server\100\Tools\Binn\;C:\Program
Files (x86)\Microsoft SQL
Server\100\DTS\Binn\;C:\Program
Files\R\R-2.12.2\library\rscproxy\libs\i386;C:\Program
Files\R\R-2.12.2\bin\i386;C:\Program
Files (x86)\Microsoft SQL
Server\100\Tools\Binn\VSShell\Common7\IDE\
USERNAME=rrscw OS=Windows_NT
PROCESSOR_IDENTIFIER=EM64T Family 6
Model 26 Stepping 5, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP 64bit Build 3790
Service Pack 2
CPU:total 4 em64t ht
Memory: 4k page, physical
6273948k(4849464k free), swap
7972228k(7161264k free)
vm_info: Java HotSpot(TM) 64-Bit
Server VM (1.5.0_17-b04) for
windows-amd64, built on Nov 10 2008
01:04:27 by "java_re" with unknown MS
VC++:1400
I had the same issue and after some searching found this solution which has you remove all shortcuts from your Windows Desktop. Apparently the installer chokes on these for some reason. Worked like a charm.
Oracle sometimes has problems installing from a directory with a space in it.
Related
An Mbed code is throwing the crash dump below and I wish to find the line corresponding to the given PC. I'm on Windows though, so the simple "addr2line" is not available. I tried addr2line with Ubuntu shell on Windows, but it gives ??:?
What is the best tool on Windows 10 to perform address-to-line resolution from ARM ELF?
++ MbedOS Fault Handler ++
FaultType: HardFault
Context:
R0: 0
R1: 2000A0C8
R2: 1
R3: 14
R4: 20007854
R5: 2000A0
R6: 68
R7: 0
R8: 0
R9: 0
R10: 0
R11: 0
R12: 29FC1
SP : 2000A8B8
LR : 2C007
PC : 2000A0C8
xPSR : 0
PSP : 2000A898
MSP : 2003FFC0
CPUID: 410FC241
HFSR : 40000000
MMFSR: 0
BFSR : 0
UFSR : 2
DFSR : 0
AFSR : 0
Mode : Thread
Priv : Privileged
Stack: PSP
-- MbedOS Fault Handler --
I use uio generic driver with HW composed of PCIe device (FPGA) connected to Intel ATOM cpu.
But, on testing, although interrupt is seen in the driver, it is not delivered to userspace.
These are the steps I'm doing:
echo "10ee 0007" > /sys/bus/pci/drivers/uio_pci_generic/new_id
I use userspace application which wait for interrupt, just as described in code example here.
I than trigger an interrupt from FPGA, but no print from the userspace application is given and there is an exception:
irq 23: nobody cared (try booting with the "irqpoll" option)
[ 91.030760] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.18.16 #6
[ 91.037037] Hardware name: /conga-MA5, BIOS MA50R000 10/30/2019
[ 91.043302] Call Trace:
[ 91.045881] <IRQ>
[ 91.048002] dump_stack+0x5c/0x80
[ 91.051464] __report_bad_irq+0x35/0xaf
[ 91.055465] note_interrupt.cold.9+0xa/0x63
[ 91.059823] handle_irq_event_percpu+0x68/0x70
[ 91.064470] handle_irq_event+0x37/0x57
[ 91.068481] handle_fasteoi_irq+0x97/0x150
...
[ 91.176043] handlers:
[ 91.178419] [<00000000ec05b056>] uio_interrupt
[ 91.183054] Disabling IRQ #23
I started debugging the uio driver, and I see that interrupt handler is called, but not handled:
static irqreturn_t irqhandler(int irq, struct uio_info *info)
{
struct uio_pci_generic_dev *gdev = to_uio_pci_generic_dev(info);
printk("here 1\n"); <<--- we get here interrupt is catched here
if (!pci_check_and_mask_intx(gdev->pdev))
return IRQ_NONE;
printk("here 2\n"); <<--- But we never get here
/* UIO core will signal the user process. */
return IRQ_HANDLED;
}
It seems that pci_check_and_mask_intx() does not detect it as an interrupt from our device!
The device appear as following:
02:00.0 RAM memory: Xilinx Corporation Default PCIe endpoint ID
Subsystem: Xilinx Corporation Default PCIe endpoint ID
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 23
Region 0: Memory at 91200000 (32-bit, non-prefetchable) [size=1M]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [58] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 1, Latency L0s <64ns, L1 <1us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 10.000W
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
MaxPayload 256 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s, Exit Latency L0s unlimited
ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Capabilities: [100 v1] Device Serial Number 00-00-00-00-00-00-00-00
Kernel driver in use: uio_pci_generic
Is it an issue of FPGA device ? or does UIO generic PCI does not support interrupts ?
Eventually after commenting the following lines for irqhandler,
I am able to receive interrupts from FPGA
static irqreturn_t irqhandler(int irq, struct uio_info *info)
{
struct uio_pci_generic_dev *gdev = to_uio_pci_generic_dev(info);
- if (!pci_check_and_mask_intx(gdev->pdev))
- return IRQ_NONE;
/* UIO core will signal the user process. */
return IRQ_HANDLED;
}
Yet, obviously it is still a workaround, and we need later to investigate why FPGA does not deliver bit status change in status register in configuration space of PCIe together with the irq.
I recently found myself trying to diagnose why a particular Ruby program was running slow. In the end it turned out be caused by a scaling issue causing a lot of contention on a particular mutex.
I was wondering if there are any tools that I could have used to make this issue easier to diagnose? I know I could have used ruby-prof to get detailed output of what all 100+ threads of this program were spending their time on, but I'm curious whether there is any tool that is specifically focused on just measuring mutex contention in Ruby?
So If figured out how to do this with DTrace.
Given a Ruby program like this:
# mutex.rb
mutex = Mutex.new
threads = []
threads << Thread.new do
loop do
mutex.synchronize do
sleep 2
end
end
end
threads << Thread.new do
loop do
mutex.synchronize do
sleep 4
end
end
end
threads.each(&:join)
We can use a DTrace script like this:
/* mutex.d */
ruby$target:::cmethod-entry
/copyinstr(arg0) == "Mutex" && copyinstr(arg1) == "synchronize"/
{
self->file = copyinstr(arg2);
self->line = arg3;
}
pid$target:ruby:rb_mutex_lock:entry
/self->file != NULL && self->line != NULL/
{
self->mutex_wait_start = timestamp;
}
pid$target:ruby:rb_mutex_lock:return
/self->file != NULL && self->line != NULL/
{
mutex_wait_ms = (timestamp - self->mutex_wait_start) / 1000;
printf("Thread %d acquires mutex %d after %d ms - %s:%d\n", tid, arg1, mutex_wait_ms, self->file, self->line);
self->file = NULL;
self->line = NULL;
}
When we run this script against the Ruby program, we then get information like this:
$ sudo dtrace -q -s mutex.d -c 'ruby mutex.rb'
Thread 286592 acquires mutex 4313316240 after 2 ms - mutex.rb:14
Thread 286591 acquires mutex 4313316240 after 4004183 ms - mutex.rb:6
Thread 286592 acquires mutex 4313316240 after 2004170 ms - mutex.rb:14
Thread 286592 acquires mutex 4313316240 after 6 ms - mutex.rb:14
Thread 286592 acquires mutex 4313316240 after 4 ms - mutex.rb:14
Thread 286592 acquires mutex 4313316240 after 4 ms - mutex.rb:14
Thread 286591 acquires mutex 4313316240 after 16012158 ms - mutex.rb:6
Thread 286592 acquires mutex 4313316240 after 2002593 ms - mutex.rb:14
Thread 286591 acquires mutex 4313316240 after 4001983 ms - mutex.rb:6
Thread 286592 acquires mutex 4313316240 after 2004418 ms - mutex.rb:14
Thread 286591 acquires mutex 4313316240 after 4000407 ms - mutex.rb:6
Thread 286592 acquires mutex 4313316240 after 2004163 ms - mutex.rb:14
Thread 286591 acquires mutex 4313316240 after 4003191 ms - mutex.rb:6
Thread 286591 acquires mutex 4313316240 after 2 ms - mutex.rb:6
Thread 286592 acquires mutex 4313316240 after 4005587 ms - mutex.rb:14
...
We can collect this output and use it to derive information about which mutexes are causing the most contention.
We are using FPGA cards with PCI express drivers to move data around with DMA engines. This all works fine for a single card in a machine, however with two cards it fails. As an initial investigation, I have narrowed an error down to the add_timer function that is used to set up the polling mechanism. When insmod adds the driver modules, a stack trace is produced as the poll_timer routine is the same for both instances. The code has been reduced to
static int dat_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct timer_list * timer = &poll_timer;
int i;
/* Start polling routine */
log_normal(KERN_INFO "DEBUG ADD TIMER: Starting poll routine with %x\n", pdev);
init_timer(timer);
// random number added so that expires value is different for both instances of timer
get_random_bytes(&i, 1);
timer->expires=jiffies+HZ+i;
timer->data=(unsigned long) pdev;
timer->function = poll_routine;
log_verbose("DEBUG ADD TIMER: Timer expires %x\n", timer->expires);
log_verbose("DEBUG ADD TIMER: Timer data %x\n", timer->data);
log_verbose("DEBUG ADD TIMER: Timer function %x\n", timer->function);
// ***** THIS IS WHERE STACK TRACE OCCURS (WHEN CALLED FOR SECOND TIME)
add_timer(timer);
log_verbose("DEBUG ADD TIMER: Value of HZ is %d\n", HZ);
log_verbose("DEBUG ADD TIMER: End of probe\n");
return 0;
}
the stack trace produces
list_add corruption. prev->next should be next (ffffffff81f76228), but was (null). (prev=ffffffffa050a3c0).
and
list_add double add: new=ffffffffa050a3c0, prev=ffffffffa050a3c0, next=ffffffff81f76228.
Looking at the printk statements, it is clear that the add_timer is trying to add the same routine to the linked list. Is this correct?
DEBUG ADD TIMER: Timer expires fffd9cd3
DEBUG ADD TIMER: Timer data 6c0ac000
DEBUG ADD TIMER: Timer function **a0508150**
DEBUG ADD TIMER: Value of HZ is 1000
DEBUG ADD TIMER: End of probe
DEBUG ADD TIMER: Starting poll routine with 6c0ad000
DEBUG ADD TIMER: Timer expires fffd9c7d
DEBUG ADD TIMER: Timer data 6c0ad000
DEBUG ADD TIMER: Timer function **a0508150**
So my question(s) is(are), how should I configure the timer for multiple instantations of the same driver? (Assuming that is what is happening when multiple boards are inserted into the machine).
full stack trace
DEBUG ADD TIMER: Inserting driver into kernel.
DEBUG ADD TIMER: Starting poll routine with 6c0ac000
DEBUG ADD TIMER: Timer expires fffd9cd3
DEBUG ADD TIMER: Timer data 6c0ac000
DEBUG ADD TIMER: Timer function a0508150
DEBUG ADD TIMER: Value of HZ is 1000
DEBUG ADD TIMER: End of probe
DEBUG ADD TIMER: Starting poll routine with 6c0ad000
DEBUG ADD TIMER: Timer expires fffd9c7d
DEBUG ADD TIMER: Timer data 6c0ad000
DEBUG ADD TIMER: Timer function a0508150
------------[ cut here ]------------
WARNING: CPU: 0 PID: 2201 at lib/list_debug.c:33 __list_add+0xa0/0xd0()
list_add corruption. prev->next should be next (ffffffff81f76228), but was (null). (prev=ffffffffa050a3c0).
Modules linked in: xdma_v7(POE+) xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw intel_rapl iosf_mbi x86_pkg_temp_thermal coretemp kvm_intel kvm crct10dif_pclmul crc32_pclmul snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_controller crc32c_intel eeepc_wmi ghash_clmulni_intel asus_wmi ftdi_sio iTCO_wdt snd_hda_codec sparse_keymap raid0 iTCO_vendor_support
snd_hda_core rfkill sb_edac ipmi_ssif video mxm_wmi edac_core snd_hwdep mei_me snd_seq snd_seq_device ipmi_msghandler snd_pcm mei acpi_pad tpm_infineon lpc_ich mfd_core snd_timer tpm_tis shpchp tpm snd soundcore i2c_i801 wmi nfsd auth_rpcgss nfs_acl lockd grace sunrpc ast drm_kms_helper ttm drm igb serio_raw ptp pps_core dca i2c_algo_bit
CPU: 0 PID: 2201 Comm: insmod Tainted: P OE 4.1.8-100.fc21.x86_64 #1
Hardware name: ASUSTeK COMPUTER INC. Z10PE-D8 WS/Z10PE-D8 WS, BIOS 1001 03/17/2015
0000000000000000 00000000ec73155d ffff880457123928 ffffffff81792065
0000000000000000 ffff880457123980 ffff880457123968 ffffffff810a163a
0000000000000246 ffffffffa050a3c0 ffffffff81f76228 ffffffffa050a3c0
Call Trace:
[<ffffffff81792065>] dump_stack+0x45/0x57
[<ffffffff810a163a>] warn_slowpath_common+0x8a/0xc0
[<ffffffff810a16c5>] warn_slowpath_fmt+0x55/0x70
[<ffffffff810f8250>] ? vprintk_emit+0x3b0/0x560
[<ffffffff813c7c30>] __list_add+0xa0/0xd0
[<ffffffff81108412>] __internal_add_timer+0xb2/0x130
[<ffffffff811084bf>] internal_add_timer+0x2f/0xb0
[<ffffffff8110a1ca>] mod_timer+0x12a/0x210
[<ffffffff8110a2c8>] add_timer+0x18/0x30
[<ffffffffa050810f>] dat_probe+0xbf/0x100 [xdma_v7]
[<ffffffff813f6da5>] local_pci_probe+0x45/0xa0
[<ffffffff812a8da2>] ? sysfs_do_create_link_sd.isra.2+0x72/0xc0
[<ffffffff813f8109>] pci_device_probe+0xf9/0x150
[<ffffffff814e7e59>] driver_probe_device+0x209/0x4b0
[<ffffffff814e81db>] __driver_attach+0x9b/0xa0
[<ffffffff814e8140>] ? __device_attach+0x40/0x40
[<ffffffff814e5973>] bus_for_each_dev+0x73/0xc0
[<ffffffff814e772e>] driver_attach+0x1e/0x20
[<ffffffff814e72e0>] bus_add_driver+0x180/0x250
[<ffffffffa000a000>] ? 0xffffffffa000a000
[<ffffffff814e89d4>] driver_register+0x64/0xf0
[<ffffffff813f662c>] __pci_register_driver+0x4c/0x50
[<ffffffffa000a02c>] dat_init+0x2c/0x1000 [xdma_v7]
[<ffffffff81002148>] do_one_initcall+0xd8/0x210
[<ffffffff812094f9>] ? kmem_cache_alloc_trace+0x1a9/0x230
[<ffffffff817911bc>] ? do_init_module+0x28/0x1cc
[<ffffffff817911f5>] do_init_module+0x61/0x1cc
[<ffffffff811270bb>] load_module+0x20db/0x2550
[<ffffffff81122990>] ? store_uevent+0x70/0x70
[<ffffffff8122e860>] ? kernel_read+0x50/0x80
[<ffffffff81127766>] SyS_finit_module+0xa6/0xe0
[<ffffffff8179892e>] system_call_fastpath+0x12/0x71
---[ end trace 340e5d7ba2d89081 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 2201 at lib/list_debug.c:36 __list_add+0xcb/0xd0()
list_add double add: new=ffffffffa050a3c0, prev=ffffffffa050a3c0, next=ffffffff81f76228.
Modules linked in: xdma_v7(POE+) xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw intel_rapl iosf_mbi x86_pkg_temp_thermal coretemp kvm_intel kvm crct10dif_pclmul crc32_pclmul snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_controller crc32c_intel eeepc_wmi ghash_clmulni_intel asus_wmi ftdi_sio iTCO_wdt snd_hda_codec sparse_keymap raid0 iTCO_vendor_support
snd_hda_core rfkill sb_edac ipmi_ssif video mxm_wmi edac_core snd_hwdep mei_me snd_seq snd_seq_device ipmi_msghandler snd_pcm mei acpi_pad tpm_infineon lpc_ich mfd_core snd_timer tpm_tis shpchp tpm snd soundcore i2c_i801 wmi nfsd auth_rpcgss nfs_acl lockd grace sunrpc ast drm_kms_helper ttm drm igb serio_raw ptp pps_core dca i2c_algo_bit
CPU: 0 PID: 2201 Comm: insmod Tainted: P W OE 4.1.8-100.fc21.x86_64 #1
Hardware name: ASUSTeK COMPUTER INC. Z10PE-D8 WS/Z10PE-D8 WS, BIOS 1001 03/17/2015
0000000000000000 00000000ec73155d ffff880457123928 ffffffff81792065
0000000000000000 ffff880457123980 ffff880457123968 ffffffff810a163a
0000000000000246 ffffffffa050a3c0 ffffffff81f76228 ffffffffa050a3c0
Call Trace:
[<ffffffff81792065>] dump_stack+0x45/0x57
[<ffffffff810a163a>] warn_slowpath_common+0x8a/0xc0
[<ffffffff810a16c5>] warn_slowpath_fmt+0x55/0x70
[<ffffffff810f8250>] ? vprintk_emit+0x3b0/0x560
[<ffffffff813c7c5b>] __list_add+0xcb/0xd0
[<ffffffff81108412>] __internal_add_timer+0xb2/0x130
[<ffffffff811084bf>] internal_add_timer+0x2f/0xb0
[<ffffffff8110a1ca>] mod_timer+0x12a/0x210
[<ffffffff8110a2c8>] add_timer+0x18/0x30
[<ffffffffa050810f>] dat_probe+0xbf/0x100 [xdma_v7]
[<ffffffff813f6da5>] local_pci_probe+0x45/0xa0
[<ffffffff812a8da2>] ? sysfs_do_create_link_sd.isra.2+0x72/0xc0
[<ffffffff813f8109>] pci_device_probe+0xf9/0x150
[<ffffffff814e7e59>] driver_probe_device+0x209/0x4b0
[<ffffffff814e81db>] __driver_attach+0x9b/0xa0
[<ffffffff814e8140>] ? __device_attach+0x40/0x40
[<ffffffff814e5973>] bus_for_each_dev+0x73/0xc0
[<ffffffff814e772e>] driver_attach+0x1e/0x20
[<ffffffff814e72e0>] bus_add_driver+0x180/0x250
[<ffffffffa000a000>] ? 0xffffffffa000a000
[<ffffffff814e89d4>] driver_register+0x64/0xf0
[<ffffffff813f662c>] __pci_register_driver+0x4c/0x50
[<ffffffffa000a02c>] dat_init+0x2c/0x1000 [xdma_v7]
[<ffffffff81002148>] do_one_initcall+0xd8/0x210
[<ffffffff812094f9>] ? kmem_cache_alloc_trace+0x1a9/0x230
[<ffffffff817911bc>] ? do_init_module+0x28/0x1cc
[<ffffffff817911f5>] do_init_module+0x61/0x1cc
[<ffffffff811270bb>] load_module+0x20db/0x2550
[<ffffffff81122990>] ? store_uevent+0x70/0x70
[<ffffffff8122e860>] ? kernel_read+0x50/0x80
[<ffffffff81127766>] SyS_finit_module+0xa6/0xe0
[<ffffffff8179892e>] system_call_fastpath+0x12/0x71
---[ end trace 340e5d7ba2d89082 ]---
DEBUG ADD TIMER: Value of HZ is 1000
DEBUG ADD TIMER: End of probe
The problem is that the second call to dat_probe is clobbering the poll_timer variable that was initialized and queued by the first call to dat_probe. You are clobbering the pointers in the kernel's timer list.
You need to get rid of the poll_timer variable and give each device its own dynamically allocated private data structure containing its own struct timer_list member. Call pci_set_drvdata to set the private data pointer for the PCI device. The other PCI driver functions can call pci_get_drvdata to retrieve that pointer.
Currently I am analyzing a dump with WinDbg.
I ran following commands (following Tess' incredible walkthrough):
~* e !clrstack
Which listed me all stacks of all threads. There are 300 running threads with more or less the same stack, so I am just printing the stack of one here ...
OS Thread Id: 0x107c (166)
Child SP IP Call Site
2bc1e654 77c1015d [HelperMethodFrame_1OBJ: 2bc1e654] System.Threading.WaitHandle.WaitOneNative(System.Runtime.InteropServices.SafeHandle, UInt32, Boolean, Boolean)
2bc1e720 6b2e6dd2 System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle, Int64, Boolean, Boolean)
2bc1e73c 6b2e6d9c System.Threading.WaitHandle.WaitOne(Int32, Boolean)
2bc1e750 727f4baa System.Threading.ReaderWriterLockSlim.WaitOnEvent(System.Threading.EventWaitHandle, UInt32 ByRef, TimeoutTracker)
2bc1e78c 729bc154 System.Threading.ReaderWriterLockSlim.TryEnterUpgradeableReadLockCore(TimeoutTracker)
2bc1e7b8 725d250c System.Threading.ReaderWriterLockSlim.TryEnterUpgradeableReadLock(TimeoutTracker)
** MORE LINES **
Then I did the following:
> ~166s
eax=00000000 ebx=2bc1e444 ecx=00000000 edx=00000000 esi=00000001 edi=00000000
eip=77c1015d esp=2bc1e3f4 ebp=2bc1e490 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246
ntdll!NtWaitForMultipleObjects+0x15:
77c1015d 83c404 add esp,4
Then I was looking for all the instances in this thread:
> !dso
OS Thread Id: 0x107c (166)
ESP/REG Object Name
** MORE LINES **
2BC1E7D0 039ec48c System.Threading.ReaderWriterLockSlim
** MORE LINES **
Then I tried to get more information on the ReaderWriterLockSlim-instance:
> !do 039ec48c
Name: System.Threading.ReaderWriterLockSlim
MethodTable: 725ebda4
EEClass: 724543bc
Size: 68(0x44) bytes
File: C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll
Fields:
MT Field Offset Type VT Attr Value Name
6b3b8138 4000755 3c System.Boolean 1 instance 0 fIsReentrant
6b3c3aa4 4000756 1c System.Int32 1 instance 0 myLock
6b3c7ae4 4000757 20 System.UInt32 1 instance 0 numWriteWaiters
6b3c7ae4 4000758 24 System.UInt32 1 instance 0 numReadWaiters
6b3c7ae4 4000759 28 System.UInt32 1 instance 0 numWriteUpgradeWaiters
6b3c7ae4 400075a 2c System.UInt32 1 instance 348 numUpgradeWaiters
6b3b8138 400075b 3d System.Boolean 1 instance 0 fNoWaiters
6b3c3aa4 400075c 30 System.Int32 1 instance 366 upgradeLockOwnerId
6b3c3aa4 400075d 34 System.Int32 1 instance 366 writeLockOwnerId
6b3c0ac0 400075e c ...g.EventWaitHandle 0 instance 00000000 writeEvent
6b3c0ac0 400075f 10 ...g.EventWaitHandle 0 instance 00000000 readEvent
6b3c0ac0 4000760 14 ...g.EventWaitHandle 0 instance 08188858 upgradeEvent
6b3c0ac0 4000761 18 ...g.EventWaitHandle 0 instance 00000000 waitUpgradeEvent
6b3b821c 4000763 4 System.Int64 1 instance 231 lockID
6b3b8138 4000765 3e System.Boolean 1 instance 0 fUpgradeThreadHoldingRead
6b3c7ae4 4000766 38 System.UInt32 1 instance 2147483649 owners
6b3b8138 4000767 3f System.Boolean 1 instance 0 fDisposed
6b3b821c 4000762 3e0 System.Int64 1 shared static s_nextLockID
>> Domain:Value 01742528:NotInit 01783fb8:NotInit 1268c9d8:NotInit <<
725fd46c 4000764 4 ...ReaderWriterCount 0 shared TLstatic t_rwc
>> Thread:Value <<
I've matched the value of owners (2147483649) against the the information on this page = 0x80000001
private const uint WRITER_HELD = 0x80000000;
private const uint WAITING_WRITERS = 0x40000000;
private const uint WAITING_UPGRADER = 0x20000000;
But how can I identify the thread which holds the lock?
If you have a deadlock, you can use SOSEx's !dlk command which does all the work for you.
*DEADLOCK DETECTED*
CLR thread 0x4 holds the Writer lock on ReaderWriterLockSlim 02712580
...and is waiting for a Reader lock on ReaderWriterLockSlim 0271253c
CLR thread 0x3 holds the Writer lock on ReaderWriterLockSlim 0271253c
...and is waiting for a Reader lock on ReaderWriterLockSlim 02712580
CLR Thread 0x4 is waiting at System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle, Int64, Boolean, Boolean)(+0x1f IL,+0x22 Native)
CLR Thread 0x3 is waiting at System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle, Int64, Boolean, Boolean)(+0x1f IL,+0x22 Native)
If you don't have a deadlock, you can still use SOSEx, but type !mlocks. The output looks like this, so you get all the different thread numbers and the type of the lock.
0:012> !mlocks
Examining SyncBlocks...
Scanning for ReaderWriterLock instances...
Scanning for holders of ReaderWriterLock locks...
Scanning for ReaderWriterLockSlim instances...
Scanning for holders of ReaderWriterLockSlim locks...
Examining CriticalSections...
ClrThread DbgThread OsThread LockType Lock LockLevel
----------------------------------------------------------------------
0x1 0 0x1460 thinlock 02718bcc (recursion:0)
0x5 6 0x1e80 RWLock 027125f0 Writer
0x8 9 0x22ac CritSect 027124c0
0x9 10 0x27b8 SyncBlock 0045f4e8
0xa 11 0x33f8 SyncBlock 0045f4b4
0x7 8 0x388c CritSect 027124a0
0x4 5 0x3d20 RWLockSlim 02712580 Writer
0x3 4 0x3e44 RWLockSlim 0271253c Writer
0x6 7 0x4704 RWLock 027125c4 Writer
If you have DML enabled, you can even click the links in the Lock column which gives more information. You can also type !rwlock <lock> if you don't like DML.
I did some more research, and decompiled ReaderWriterLockSlim and determined the meaning of writeLockOwnerId and upgradeLockOwnerId: They are actually the managed thread ids of the threads within the corresponding method.
Unfortunately you have to determine the ordinal of this managed thread id, by doing:
> !threads
ThreadCount: 371
UnstartedThread: 0
BackgroundThread: 371
PendingThread: 0
DeadThread: 0
Hosted Runtime: no
Lock
ID OSID ThreadOBJ State GC Mode GC Alloc Context Domain Count Apt Exception
** MORE LINES **
381 366 1c0c 1e1fca78 1029220 Preemptive 3E46102C:00000000 01783fb8 2 MTA (Threadpool Worker)
** MORE LINES **
After this, you can simply do:
> ~381s
eax=00000000 ebx=00000000 ecx=00000000 edx=00000000 esi=0000432d edi=4519d490
eip=77c0f8d1 esp=4519d448 ebp=4519d4b4 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246
ntdll!ZwWaitForSingleObject+0x15:
77c0f8d1 83c404 add esp,4
> !clrstack
OS Thread Id: 0x1c0c (381)
Child SP IP Call Site
** MORE LINES **
4519da08 69f35592 System.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior, System.String)
** MORE LINES **
Et voilĂ : the thread, which holds the upgradable lock, is currently executing some sql.