clr.dll exception causes the iis crashed, PDB symbol for clr.dll not loaded, The version of SOS does not match the version of CLR you are debugging - clr

Recently, my asp.net application crashed.
I got the event logs on windows, two type exception message:
Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an internal error in the .NET Runtime at IP 000007FEF9CFDDE3 (000007FEF9B00000) with exit code 80131506.
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
Faulting module name: clr.dll, version: 4.0.30319.1008, time stamp: 0x517a18ff
Exception code: 0xc0000005 Fault offset: 0x00000000001fdde3
Faulting process id: 0x4adc
Faulting application start time: 0x01cf69e5bbbae403
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Report Id: e0c90a5f-0455-11e3-8f0e-005056891553
I also got a mini dump. and I load it into windbg.
My clr version on my workstation is 4.0.30319.1022, the clr version of the dump is 4.0.30319.1008. I learn from the link , I download the correct clr/sos/mscordacwks.dll verson and put them into clr1008 folder, then copy the clr1008 folder to the windbg exe folder.
After that, I start to input some commands in windbg:
firstly, I load the sos of version 1008: .load clr1008\sos.dll
I tried to load the correct clr of version 1008
0:020> .cordll -u -ve -lp clr1008
CLRDLL: Loaded DLL clr1008\mscordacwks.dll
CLR DLL status: Loaded DLL clr1008\mscordacwks.dll
0:020> .cordll -u -ve -l
CLRDLL: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscordacwks.dll:4.0.30319.1022 f:8
doesn't match desired version 4.0.30319.1008 f:8
CLRDLL: Loaded DLL c:\symbols\mscordacwks_AMD64_AMD64_4.0.30319.1008.dll\517A18FF965000\mscordacwks_AMD64_AMD64_4.0.30319.1008.dll
CLR DLL status: Loaded DLL c:\symbols\mscordacwks_AMD64_AMD64_4.0.30319.1008.dll\517A18FF965000\mscordacwks_AMD64_AMD64_4.0.30319.1008.dll
0:020> !analyze -v
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************
Debugger CompCtrlDb Connection::Open failed 80004005
Unable to open image file: D:\Users\ABC\Downloads\windbg\sym\clr.dll\517A18FF965000\clr.dll
ϵͳÕÒ²»µ½Ö¸¶¨µÄÎļþ¡£
TRIAGER: Could not open triage file : D:\Users\ABC\Downloads\windbg\triage\guids.ini, error 2
Unable to load image C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll, Win32 error 0n2
Debugger CompCtrlDb Connection::Open failed 80004005
Unable to open image file: D:\Users\ABC\Downloads\windbg\sym\clr.dll\517A18FF965000\clr.dll
ϵͳÕÒ²»µ½Ö¸¶¨µÄÎļþ¡£
TRIAGER: Could not open triage file : D:\Users\ABC\Downloads\windbg\triage\modclass.ini, error 2
Debugger Dbgportaldb Connection::Open failed 80004005
Database Dbgportaldb not connected
FAULTING_IP:
clr+1fde45
000007fe`f9cfde45 41f70000000080 test dword ptr [r8],80000000h
EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 000007fef9cfde45 (clr+0x00000000001fde45)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000001
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: ffffffffffffffff
Attempt to read from address ffffffffffffffff
DEFAULT_BUCKET_ID: INVALID_POINTER_READ
PROCESS_NAME: w3wp.exe
ERROR_CODE: (NTSTATUS) 0xc0000005 - 0x%08lx
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - 0x%08lx
EXCEPTION_PARAMETER1: 0000000000000000
EXCEPTION_PARAMETER2: ffffffffffffffff
READ_ADDRESS: ffffffffffffffff
FOLLOWUP_IP:
clr+1fde45
000007fe`f9cfde45 41f70000000080 test dword ptr [r8],80000000h
NTGLOBALFLAG: 0
APPLICATION_VERIFIER_FLAGS: 0
MANAGED_STACK: !dumpstack -EE
OS Thread Id: 0x471c (20)
Current frame:
Child-SP RetAddr Caller, Callee
FAULTING_THREAD: 000000000000471c
PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ
BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_READ
IP_ON_HEAP: fffffffffffffffe
The fault address in not in any loaded module, please check your build's rebase
log at <releasedir>\bin\build_logs\timebuild\ntrebase.log for module which may
contain the address if it were loaded.
FRAME_ONE_INVALID: 1
LAST_CONTROL_TRANSFER: from fffffffffffffffe to 000007fef9cfde45
STACK_TEXT:
00000000`047df1c0 ffffffff`fffffffe : 000007fe`f9c192d4 000007fe`f9b922c0 00000000`022b2ea0 00000000`00000002 : clr+0x1fde45
00000000`047df1c8 000007fe`f9c192d4 : 000007fe`f9b922c0 00000000`022b2ea0 00000000`00000002 00000000`0222b680 : 0xffffffff`fffffffe
00000000`047df1d0 000007fe`f9b922c0 : 00000000`022b2ea0 00000000`00000002 00000000`0222b680 00000001`41e2c328 : clr+0x1192d4
00000000`047df1d8 00000000`022b2ea0 : 00000000`00000002 00000000`0222b680 00000001`41e2c328 00000001`41e2c390 : clr+0x922c0
00000000`047df1e0 00000000`00000002 : 00000000`0222b680 00000001`41e2c328 00000001`41e2c390 00000000`0222b7e0 : 0x22b2ea0
00000000`047df1e8 00000000`0222b680 : 00000001`41e2c328 00000001`41e2c390 00000000`0222b7e0 00000000`0222bcc0 : 0x2
00000000`047df1f0 00000001`41e2c328 : 00000001`41e2c390 00000000`0222b7e0 00000000`0222bcc0 00000000`0222b7e8 : 0x222b680
00000000`047df1f8 00000001`41e2c390 : 00000000`0222b7e0 00000000`0222bcc0 00000000`0222b7e8 00000000`047df2f8 : 0x1`41e2c328
00000000`047df200 00000000`0222b7e0 : 00000000`0222bcc0 00000000`0222b7e8 00000000`047df2f8 00000000`00000010 : 0x1`41e2c390
00000000`047df208 00000000`0222bcc0 : 00000000`0222b7e8 00000000`047df2f8 00000000`00000010 00000000`02224fd0 : 0x222b7e0
00000000`047df210 00000000`0222b7e8 : 00000000`047df2f8 00000000`00000010 00000000`02224fd0 00000000`0222a8c0 : 0x222bcc0
00000000`047df218 00000000`047df2f8 : 00000000`00000010 00000000`02224fd0 00000000`0222a8c0 00000000`00000002 : 0x222b7e8
00000000`047df220 00000000`00000010 : 00000000`02224fd0 00000000`0222a8c0 00000000`00000002 00000000`00000002 : 0x47df2f8
00000000`047df228 00000000`02224fd0 : 00000000`0222a8c0 00000000`00000002 00000000`00000002 00000001`7f8a0e88 : 0x10
00000000`047df230 00000000`0222a8c0 : 00000000`00000002 00000000`00000002 00000001`7f8a0e88 00000001`7f8a0eb0 : 0x2224fd0
00000000`047df238 00000000`00000002 : 00000000`00000002 00000001`7f8a0e88 00000001`7f8a0eb0 000007fe`f9cfba57 : 0x222a8c0
00000000`047df240 00000000`00000002 : 00000001`7f8a0e88 00000001`7f8a0eb0 000007fe`f9cfba57 00000000`0222a8c0 : 0x2
00000000`047df248 00000001`7f8a0e88 : 00000001`7f8a0eb0 000007fe`f9cfba57 00000000`0222a8c0 00000001`00000020 : 0x2
00000000`047df250 00000001`7f8a0eb0 : 000007fe`f9cfba57 00000000`0222a8c0 00000001`00000020 00000001`7f8a0e80 : 0x1`7f8a0e88
00000000`047df258 000007fe`f9cfba57 : 00000000`0222a8c0 00000001`00000020 00000001`7f8a0e80 00000000`0222b7f0 : 0x1`7f8a0eb0
00000000`047df260 00000000`0222a8c0 : 00000001`00000020 00000001`7f8a0e80 00000000`0222b7f0 00000000`00000002 : clr+0x1fba57
00000000`047df268 00000001`00000020 : 00000001`7f8a0e80 00000000`0222b7f0 00000000`00000002 00000001`7f8a0e80 : 0x222a8c0
00000000`047df270 00000001`7f8a0e80 : 00000000`0222b7f0 00000000`00000002 00000001`7f8a0e80 00000000`00000048 : 0x1`00000020
00000000`047df278 00000000`0222b7f0 : 00000000`00000002 00000001`7f8a0e80 00000000`00000048 00000000`00000001 : 0x1`7f8a0e80
00000000`047df280 00000000`00000002 : 00000001`7f8a0e80 00000000`00000048 00000000`00000001 00000000`018215f8 : 0x222b7f0
00000000`047df288 00000001`7f8a0e80 : 00000000`00000048 00000000`00000001 00000000`018215f8 00000000`00000100 : 0x2
00000000`047df290 00000000`00000048 : 00000000`00000001 00000000`018215f8 00000000`00000100 00000000`0222f500 : 0x1`7f8a0e80
00000000`047df298 00000000`00000001 : 00000000`018215f8 00000000`00000100 00000000`0222f500 00000000`00000000 : 0x48
00000000`047df2a0 00000000`018215f8 : 00000000`00000100 00000000`0222f500 00000000`00000000 00000000`047df660 : 0x1
00000000`047df2a8 00000000`00000100 : 00000000`0222f500 00000000`00000000 00000000`047df660 00000001`7f8a0e80 : 0x18215f8
00000000`047df2b0 00000000`0222f500 : 00000000`00000000 00000000`047df660 00000001`7f8a0e80 00000000`00000002 : 0x100
00000000`047df2b8 00000000`00000000 : 00000000`047df660 00000001`7f8a0e80 00000000`00000002 00000000`01a61bf8 : 0x222f500
SYMBOL_STACK_INDEX: 0
SYMBOL_NAME: clr+1fde45
FOLLOWUP_NAME: wintriag
MODULE_NAME: clr //here is a hyperlink, so I click then got an output.
IMAGE_NAME: clr.dll
DEBUG_FLR_IMAGE_TIMESTAMP: 517a18ff
STACK_COMMAND: ~20s; .ecxr ; kb
FAILURE_BUCKET_ID: INVALID_POINTER_READ_c0000005_clr.dll!Unknown
BUCKET_ID: X64_APPLICATION_FAULT_INVALID_POINTER_READ_clr+1fde45
WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/w3wp_exe/7_5_7601_17514/4ce7afa2/clr_dll/4_0_30319_1008/517a18ff/c0000005/001fde45.htm?Retriage=1
Followup: wintriag
---------
0:020> lmvm clr
start end module name
000007fe`f9b00000 000007fe`fa465000 clr T (no symbols)
Loaded symbol image file: clr.dll
Image path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Image name: clr.dll
Timestamp: Fri Apr 26 14:04:47 2013 (517A18FF)
CheckSum: 0095CE19
ImageSize: 00965000
File version: 4.0.30319.1008
Product version: 4.0.30319.1008
File flags: 8 (Mask 3F) Private
File OS: 4 Unknown Win32
File type: 2.0 Dll
File date: 00000000.00000000
Translations: 0409.04b0
CompanyName: Microsoft Corporation
ProductName: Microsoft® .NET Framework
InternalName: clr.dll
OriginalFilename: clr.dll
ProductVersion: 4.0.30319.1008
FileVersion: 4.0.30319.1008 (RTMGDR.030319-1000)
PrivateBuild: DDBLD208
FileDescription: Microsoft .NET Runtime Common Language Runtime - WorkStation
LegalCopyright: © Microsoft Corporation. All rights reserved.
Comments: Flavor=Retail
Questions:
1) It seems that I didn't load the sos or clr.dll correctly, What should I do next? Should I copy the clr.dll of version 1008 to the symbol path? It seems that I already have the correct version of mscordacwks.dll.
2) the exception seems caused by unmanaged code, How to find the root cause?
3) I also run '.ecxr', but it's hard for me to understand the output.
Update: Yesterday I post the output of ' !analyze -v '. Today, I retried to analyze the dump file, 1) load clr1008\sos.dll, 2) load the clr.dll by exe '.cordll -u -ve -lp clr1008' 3) run the !analyze, the output is list above. The error of mismatch sos is gone.
The version of SOS does not match the version of CLR you are debugging. Please
load the matching version of SOS for the version of CLR you are debugging.
CLR Version: 4.0.30319.1008
SOS Version: 4.0.30319.1022
The above message is gone. The below is still there.
doesn't match desired version 4.0.30319.1008
The output of the '.chain' is below:
0:020> .chain
Extension DLL search Path:
D:\Users\ABC\Downloads\windbg\WINXP;.....
Extension DLL chain:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos: image 4.0.30319.1022, API 1.0.0, built Wed Jan 08 14:45:19 2014
[path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos.dll]
clr1008\sos.dll: image 4.0.30319.1008, API 1.0.0, built Fri Apr 26 14:21:22 2013
[path: D:\Users\ABC\Downloads\windbg\clr1008\sos.dll]
dbghelp: image 6.13.0001.776, API 6.1.6, built Sat May 15 04:57:22 2010
[path: D:\Users\ABC\Downloads\windbg\dbghelp.dll]
ext: image 6.13.0001.776, API 1.0.0, built Sat May 15 04:57:40 2010
[path: D:\Users\ABC\Downloads\windbg\winext\ext.dll]
exts: image 6.13.0001.776, API 1.0.0, built Sat May 15 04:57:13 2010
[path: D:\Users\ABC\Downloads\windbg\WINXP\exts.dll]
uext: image 6.13.0001.776, API 1.0.0, built Sat May 15 04:57:09 2010
[path: D:\Users\ABC\Downloads\windbg\winext\uext.dll]
ntsdexts: image 6.1.7752.0, API 1.0.0, built Sat May 15 04:52:37 2010
[path: D:\Users\ABC\Downloads\windbg\WINXP\ntsdexts.dll]
Is the mismatch of CLR 1008 not important or important, will it impacts the analysing? Because of the mismatch, I can't see the exception details? Or It's a native code exception, I can't see it very literally?
Update 2: I use DebugDiag 1.2 to analyze the dump file, I got the report, the first row of the report says:
WARNING - DebugDiag was not able to locate debug symbols for clr.dll, so the information below may be incomplete.
In w3wp.exe.2336.dmp the assembly instruction at clr+1fdde3 in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll has caused an access violation exception (0xC0000005) when trying to read from memory location 0x7e710001 on thread 16
Update 3:
print the output of '.ecxr' here, thread 16:
0:016> .ecxr
rax=00000000023d7a40 rbx=00000000028df550 rcx=000000015f850000
rdx=0000000000000000 rsi=0000000000000000 rdi=00000000028df060
rip=000007fef9cfdde3 rsp=00000000028df620 rbp=516db4ea5f156833
r8=0000000000000011 r9=000000000000000e r10=000000017e710001
r11=0000000000000020 r12=0000000140950378 r13=00001a7d1e7feffe
r14=0000000000000000 r15=0000000140950300
iopl=0 nv up ei ng nz na pe cy
cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010281
clr+0x1fdde3:
000007fe`f9cfdde3 498b0a mov rcx,qword ptr [r10] ds:00000001`7e710001=????????????????
Update 4: the stack output get from the DebugDiag report:
Thread 16 - System ID 2308
This thread is not fully resolved and may or may not be a problem. Further analysis of these threads may be required.
Function Source
clr+1fdde3
0x4eaa1180
0x00000100
clr+8cc74
clr+8f0e0
0x00000002
0x067e8420
0x00000001`40950300
0x00000001`40950368
0x067e8520
0x067e9d20
0x067e8528
clr+8cc74
0x00000010
0x023cd2f0
0x023d5000
0x00000002
0x00000002
0x00000001`4093e0f0
0x00000001`4093e100
clr+1fba57
0x023d5000
0x00000001`00000020
0x028049e0
0x067e8530
0x00000002
0x00000001`4093e0e0
0x00000030
0x00000001
0x028df7e8
0x0000018a
System_Data_ni!IID_IRowsetBookmark+43598
Update 5:
0:016> ~#s;
clr+0x1fdde3:
000007fe`f9cfdde3 498b0a mov rcx,qword ptr [r10] ds:00000001`7e710001=????????????????
0:016> .exr -1;
ExceptionAddress: 000007fef9cfdde3 (clr+0x00000000001fdde3)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000001
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: 000000017e710001
Attempt to read from address 000000017e710001
0:016> kb;
RetAddr : Args to Child : Call Site
00000000`4eaa1180 : 00000000`00000100 000007fe`f9b8cc74 000007fe`f9b8f0e0 00000000`00000002 : clr+0x1fdde3
00000000`00000100 : 000007fe`f9b8cc74 000007fe`f9b8f0e0 00000000`00000002 00000000`067e8420 : 0x4eaa1180
000007fe`f9b8cc74 : 000007fe`f9b8f0e0 00000000`00000002 00000000`067e8420 00000001`40950300 : 0x100
000007fe`f9b8f0e0 : 00000000`00000002 00000000`067e8420 00000001`40950300 00000001`40950368 : clr+0x8cc74
00000000`00000002 : 00000000`067e8420 00000001`40950300 00000001`40950368 00000000`067e8520 : clr+0x8f0e0
00000000`067e8420 : 00000001`40950300 00000001`40950368 00000000`067e8520 00000000`067e9d20 : 0x2
00000001`40950300 : 00000001`40950368 00000000`067e8520 00000000`067e9d20 00000000`067e8528 : 0x67e8420
00000001`40950368 : 00000000`067e8520 00000000`067e9d20 00000000`067e8528 000007fe`f9b8cc74 : 0x1`40950300
00000000`067e8520 : 00000000`067e9d20 00000000`067e8528 000007fe`f9b8cc74 00000000`00000010 : 0x1`40950368
00000000`067e9d20 : 00000000`067e8528 000007fe`f9b8cc74 00000000`00000010 00000000`023cd2f0 : 0x67e8520
00000000`067e8528 : 000007fe`f9b8cc74 00000000`00000010 00000000`023cd2f0 00000000`023d5000 : 0x67e9d20
000007fe`f9b8cc74 : 00000000`00000010 00000000`023cd2f0 00000000`023d5000 00000000`00000002 : 0x67e8528
00000000`00000010 : 00000000`023cd2f0 00000000`023d5000 00000000`00000002 00000000`00000002 : clr+0x8cc74
00000000`023cd2f0 : 00000000`023d5000 00000000`00000002 00000000`00000002 00000001`4093e0f0 : 0x10
00000000`023d5000 : 00000000`00000002 00000000`00000002 00000001`4093e0f0 00000001`4093e100 : 0x23cd2f0
00000000`00000002 : 00000000`00000002 00000001`4093e0f0 00000001`4093e100 000007fe`f9cfba57 : 0x23d5000
00000000`00000002 : 00000001`4093e0f0 00000001`4093e100 000007fe`f9cfba57 00000000`023d5000 : 0x2
00000001`4093e0f0 : 00000001`4093e100 000007fe`f9cfba57 00000000`023d5000 00000001`00000020 : 0x2
00000001`4093e100 : 000007fe`f9cfba57 00000000`023d5000 00000001`00000020 00000000`028049e0 : 0x1`4093e0f0
000007fe`f9cfba57 : 00000000`023d5000 00000001`00000020 00000000`028049e0 00000000`067e8530 : 0x1`4093e100
00000000`023d5000 : 00000001`00000020 00000000`028049e0 00000000`067e8530 00000000`00000002 : clr+0x1fba57
00000001`00000020 : 00000000`028049e0 00000000`067e8530 00000000`00000002 00000001`4093e0e0 : 0x23d5000
00000000`028049e0 : 00000000`067e8530 00000000`00000002 00000001`4093e0e0 00000000`00000030 : 0x1`00000020
00000000`067e8530 : 00000000`00000002 00000001`4093e0e0 00000000`00000030 00000000`00000001 : 0x28049e0
00000000`00000002 : 00000001`4093e0e0 00000000`00000030 00000000`00000001 00000000`028df7e8 : 0x67e8530
00000001`4093e0e0 : 00000000`00000030 00000000`00000001 00000000`028df7e8 00000000`0000018a : 0x2
00000000`00000030 : 00000000`00000001 00000000`028df7e8 00000000`0000018a 000007fe`e97e0d10 : 0x1`4093e0e0
00000000`00000001 : 00000000`028df7e8 00000000`0000018a 000007fe`e97e0d10 00000000`00000002 : 0x30
00000000`028df7e8 : 00000000`0000018a 000007fe`e97e0d10 00000000`00000002 00000001`4024f070 : 0x1
00000000`0000018a : 000007fe`e97e0d10 00000000`00000002 00000001`4024f070 00000000`028049e0 : 0x28df7e8
000007fe`e97e0d10 : 00000000`00000002 00000001`4024f070 00000000`028049e0 00000001`4024f098 : 0x18a
00000000`00000002 : 00000001`4024f070 00000000`028049e0 00000001`4024f098 00000000`00000002 : System_Data_ni+0x190d10
Update last time:
Before, I didn't get the correct stack displayed.
I search on the Internet. then I got it from here
0:020> !clrstack
PDB symbol for clr.dll not loaded
0:020> .exepath+ clr1008
Executable image search path is: clr1008
Expanded Executable image search path is: clr1008
0:020> .reload //necessary
.............
0:020> kb
RetAddr : Args to Child : Call Site
000007fe`f9cfba57 : 00000000`0222a8c0 00000001`00000020 00000001`7f8a0e80 00000000`0222b7f0 : clr!SVR::gc_heap::mark_object_simple1+0xbd6
000007fe`f9cf9aa9 : 00000000`0222a8c0 000007fe`ecee2018 00000000`00000002 000007fe`ecee2018 : clr!SVR::gc_heap::mark_object_simple+0x4d7
000007fe`f9c190df : 00000001`7f8a0e80 00000000`0222a8c0 00000000`01a61bf8 00006246`ffffffff : clr!SVR::GCHeap::Promote+0x161
000007fe`f9c193c3 : 00000000`01a61bf8 000007fe`f9c19098 ffffffff`fffffe00 00000000`01a61c00 : clr!CalculateSizedRefSize+0x47
000007fe`f9c1932d : 00000000`00000140 00000000`00000001 00000000`00000005 00000000`047df428 : clr!ScanConsecutiveHandlesWithUserData+0x67
000007fe`f9b8d43e : 00000000`01a60000 000007fe`f9c192d4 00000000`00000005 00000000`022b7880 : clr!BlockScanBlocksWithUserData+0x59
000007fe`f9b8ca05 : 00000000`047df5a0 00000000`047df610 000007fe`f9c192d4 00000000`047df610 : clr!TableScanHandles+0x219
000007fe`f9c19211 : 00000000`00000002 00000000`00000004 00000000`00000008 00000005`ff5cd000 : clr!HndScanHandlesForGC+0x1ad
000007fe`f9bfff7a : 00000000`0222a8c0 000007fe`f9cf9890 00000000`00000002 00000000`00000008 : clr!ScanSizedRefByAD+0xf8
000007fe`f9cf7da3 : 00000000`0222a8c0 00000000`00000002 00000000`0222a8c0 000007fe`00000001 : clr!SVR::gc_heap::mark_phase+0x19c
000007fe`f9cf8992 : 00000ba3`e8dc002d 00000000`00000000 00000000`0222b098 00000000`0222a8c0 : clr!SVR::gc_heap::gc1+0x54
000007fe`f9cf7ac8 : 00000000`00000000 00000000`0222a8c0 00000000`047dfa40 00000000`00002000 : clr!SVR::gc_heap::garbage_collect+0x372
000007fe`f9c1eaeb : 00000000`047df900 00000000`0222a8c0 00000000`047dfa40 00000000`00000000 : clr!SVR::gc_heap::gc_thread_function+0x78
00000000`7722652d : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : clr!SVR::gc_heap::gc_thread_stub+0x82
00000000`7735c541 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0xd
00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x1d
0:020> lmv m clr
start end module name
000007fe`f9b00000 000007fe`fa465000 clr (pdb symbols) c:\symbols\clr.pdb\118B3CCCBA4A4A709B496CFB294BF5162\clr.pdb
Loaded symbol image file: clr.dll
Mapped memory image file: clr1008\clr.dll ***here is different, please compare it with previous output.
Image path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Image name: clr.dll
Dammit, I finally done with it. ^_^
If you are debugging a minidump, you need to make sure that your executable
path is pointing to clr.dll as well.

There are mutiple questions in one.
Answer to question 1)
You have loaded two versions of SOS:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos: image 4.0.30319.1022, API 1.0.0, built Wed Jan 08 14:45:19 2014
[path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos.dll]
clr1008\sos.dll: image 4.0.30319.1008, API 1.0.0, built Fri Apr 26 14:21:22 2013
[path: D:\Users\lint\Downloads\20131201\windbg\clr1008\sos.dll]
You have now the following choices:
unload the incorrect one
make the correct one the default
specify the extension to use explicitly
The commands are
.unload C:\Windows\Microsoft.NET\Framework64\v4.0.30319\sos
.setdll clr1008\sos.dll
clr1008\sos!<command>
respectively
Answer to question 2)
Just forget about the managed part and debug the native way. For live debugging you would do
sxe 0xc0000005; *** Break on the exception code causing the trouble
g; *** Go and wait for the exception to happen
and at the time the exception happens
.exr -1; *** Just to see whether it's not something else
kb; *** Get the callstack
For the dump
~#s; *** Select the thread with the exception
.exr -1; *** See if we really have the C0000005 exception
kb; *** Get the callstack
should also work.
That usually helps for 3rd party native code. I'm not sure if that helps much in your case. Your problem sounds much like the StackOverflow question What are the causes and solutions of exception code c0000005 in mscorwks.dll?
If I'm not sure whether the symbols are correct, I always use
.symfix d:\symbols; *** Be sure to download symbols
.reload /f; *** Force reloading symbols
ld*; *** Just another type of reload since I don't know which one's better
If the heap was destroyed, the information in the dump may be misleading. In that case I'd try to reproduce the issue with GFlags settings for w3wp.exe: Enable heap tail checking, Enable heap free checking, Enable heap parameter checking, Enable heap validation on call
Answer to question 3)
I seldom use .ecxr, sorry I can't help on that.
Analysis of the dump you provided
The dump is only 24 MB, so it's unlikely a dump with full heap information. SOS would need a full dump (/ma) to fully work correctly. But since we expect a native issue, that doesn't really matter. And SOS might still output other useful information, e.g. about managed threads.
Doing a complete symbol load (ld*), it cannot find all symbols, but that's normal as well. At least I get much better results on the CLR stuff (in WinDbg 6.2.9200.16384 AMD64):
0:020> k
Child-SP RetAddr Call Site
00000000`047df1c0 000007fe`f9cfba57 clr!SVR::gc_heap::mark_object_simple1+0xbd6
00000000`047df260 000007fe`f9cf9aa9 clr!SVR::gc_heap::mark_object_simple+0x4d7
00000000`047df2f0 000007fe`f9c190df clr!SVR::GCHeap::Promote+0x161
00000000`047df370 000007fe`f9c193c3 clr!CalculateSizedRefSize+0x47
00000000`047df3a0 000007fe`f9c1932d clr!ScanConsecutiveHandlesWithUserData+0x67
00000000`047df3e0 000007fe`f9b8d43e clr!BlockScanBlocksWithUserData+0x59
00000000`047df420 000007fe`f9b8ca05 clr!TableScanHandles+0x219
00000000`047df4e0 000007fe`f9c19211 clr!HndScanHandlesForGC+0x1ad
00000000`047df590 000007fe`f9bfff7a clr!ScanSizedRefByAD+0xf8
00000000`047df630 000007fe`f9cf7da3 clr!SVR::gc_heap::mark_phase+0x19c
00000000`047df6c0 000007fe`f9cf8992 clr!SVR::gc_heap::gc1+0x54
00000000`047df730 000007fe`f9cf7ac8 clr!SVR::gc_heap::garbage_collect+0x372
00000000`047df7c0 000007fe`f9c1eaeb clr!SVR::gc_heap::gc_thread_function+0x78
00000000`047df810 00000000`7722652d clr!SVR::gc_heap::gc_thread_stub+0x82
00000000`047dfa60 00000000`7735c541 kernel32!BaseThreadInitThunk+0xd
00000000`047dfa90 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
So that looks much like a garbage collector thing.

Related

Make a monocolor jpeg file encoded one bit per pixel?

For example, I see the following output. I don't quite understand its complete meaning. But when I look at the figure, it is just black and white, without gray or other color.
$ file 0447.jpg
0447.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 1725x2751, components 1
The file size is 652708. To encode, 1725x2751 bits, the file size should be no more than 1725 * 2751/8 = 593184.4. But the file size is bigger than this.
So it seems that a pixel is not encoded as one bit. Is there a way to shrink the size of the file (without loss of info) so that one pixel is one bit (maybe using other formats)?
Don't use IM identify to find the actual bits-per pixel. Use EXIFTOOL.
Input JPG:
Exiftool shows BitsPerSample of 8
exiftool -s -ee -g1 -u -n -D cow.jpg
---- ExifTool ----
- ExifToolVersion : 12.44
---- System ----
- FileName : cow.jpg
- Directory : .
- FileSize : 16214
- FileModifyDate : 2022:10:14 11:31:44-07:00
- FileAccessDate : 2022:10:14 11:31:44-07:00
- FileInodeChangeDate : 2022:10:14 11:31:44-07:00
- FilePermissions : 100644
---- File ----
- FileType : JPEG
- FileTypeExtension : JPG
- MIMEType : image/jpeg
- ImageWidth : 300
- ImageHeight : 300
- EncodingProcess : 0
- BitsPerSample : 8 <-------
- ColorComponents : 1
---- JFIF ----
0 JFIFVersion : 1 1
2 ResolutionUnit : 2
3 XResolution : 28
5 YResolution : 28
---- Composite ----
- ImageSize : 300 300
- Megapixels : 0.09
Threshold to GIF:
convert cow.jpg -threshold 50% cow_bw1.gif
Exiftool shows BitsPerPixel = 1
exiftool -s -ee -g1 -u -n -D cow_bw1.gif
---- ExifTool ----
- ExifToolVersion : 12.44
---- System ----
- FileName : cow_bw1.gif
- Directory : .
- FileSize : 2698
- FileModifyDate : 2022:10:14 11:44:17-07:00
- FileAccessDate : 2022:10:14 11:44:19-07:00
- FileInodeChangeDate : 2022:10:14 11:44:17-07:00
- FilePermissions : 100644
---- File ----
- FileType : GIF
- FileTypeExtension : GIF
- MIMEType : image/gif
---- GIF ----
- GIFVersion : 89a
0 ImageWidth : 300
2 ImageHeight : 300
4.1 HasColorMap : 1
4.2 ColorResolutionDepth : 8
4.3 BitsPerPixel : 1 <-------
5 BackgroundColor : 1
---- Composite ----
- ImageSize : 300 300
- Megapixels : 0.09
Threshold to PNG:
convert cow.jpg -threshold 50% cow_bw1.png
Exiftool shows BitDepth of 1
exiftool -s -ee -g1 -u -n -D cow_bw1.png
---- ExifTool ----
- ExifToolVersion : 12.44
- Warning : [minor] Text/EXIF chunk(s) found after PNG IDAT (may be ignored by some readers)
---- System ----
- FileName : cow_bw1.png
- Directory : .
- FileSize : 2251
- FileModifyDate : 2022:10:14 11:49:20-07:00
- FileAccessDate : 2022:10:14 11:49:21-07:00
- FileInodeChangeDate : 2022:10:14 11:49:20-07:00
- FilePermissions : 100644
---- File ----
- FileType : PNG
- FileTypeExtension : PNG
- MIMEType : image/png
---- PNG ----
0 ImageWidth : 300
4 ImageHeight : 300
8 BitDepth : 1 <-------
9 ColorType : 0
10 Compression : 0
11 Filter : 0
12 Interlace : 0
- Gamma : 2.2
- BackgroundColor : 1
- ModifyDate : 2022:10:14 18:49:20
- Datecreate : 2022-10-14T18:31:44+00:00
- Datemodify : 2022-10-14T18:31:44+00:00
- Datetimestamp : 2022-10-14T18:49:19+00:00
---- PNG-pHYs ----
0 PixelsPerUnitX : 2800
4 PixelsPerUnitY : 2800
8 PixelUnits : 1
---- Composite ----
- ImageSize : 300 300
- Megapixels : 0.09
ADDITION
Here is how to make a 2-bit TIFF file.
convert lena.jpg -colorspace gray -depth 2 -type palette lena_d2.tif
exiftool -s -ee -g1 -u -n -D lena_d2.tif
---- ExifTool ----
- ExifToolVersion : 12.44
---- System ----
- FileName : lena_d2.tif
- Directory : .
- FileSize : 16642
- FileModifyDate : 2022:10:14 16:42:42-07:00
- FileAccessDate : 2022:10:14 16:42:43-07:00
- FileInodeChangeDate : 2022:10:14 16:42:42-07:00
- FilePermissions : 100644
---- File ----
- FileType : TIFF
- FileTypeExtension : TIF
- MIMEType : image/tiff
- ExifByteOrder : II
---- IFD0 ----
256 ImageWidth : 256
257 ImageHeight : 256
258 BitsPerSample : 2 <------
259 Compression : 1
262 PhotometricInterpretation : 3
266 FillOrder : 1
273 StripOffsets : 8
274 Orientation : 1
277 SamplesPerPixel : 1
278 RowsPerStrip : 256
279 StripByteCounts : 16384
282 XResolution : 72
283 YResolution : 72
284 PlanarConfiguration : 1
296 ResolutionUnit : 2
297 PageNumber : 0 1
320 ColorMap : (Binary data 24 bytes, use -b option to extract)
---- Composite ----
- ImageSize : 256 256
- Megapixels : 0.065536

Why does escpos hang when trying to connect to printer?

I have a SureMark 4610 printer that I'm trying to connect to, but for some reason it hangs when I connect. I've installed the necessary drivers for the printer. What could be the problem?
I'm using Windows 10 if that is of any use to you all.
Here's the printer device info
DEVICE ID 04b3:4535 on Bus 000 Address 019 =================
bLength : 0x12 (18 bytes)
bDescriptorType : 0x1 Device
bcdUSB : 0x110 USB 1.1
bDeviceClass : 0x0 Specified at interface
bDeviceSubClass : 0x0
bDeviceProtocol : 0x0
bMaxPacketSize0 : 0x40 (64 bytes)
idVendor : 0x04b3
idProduct : 0x4535
bcdDevice : 0x216 Device 2.16
iManufacturer : 0x1 (c) Copyright IBM Corp. 2000
iProduct : 0x5 Printer Interface (Usage = 3500h, Usage Page = FF45h)
iSerialNumber : 0x3 060725163603C100193
bNumConfigurations : 0x1
CONFIGURATION 1: 0 mA ====================================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x2 Configuration
wTotalLength : 0x22 (34 bytes)
bNumInterfaces : 0x1
bConfigurationValue : 0x1
iConfiguration : 0x0
bmAttributes : 0x40 Self Powered
bMaxPower : 0x0 (0 mA)
INTERFACE 1: Human Interface Device ====================
bLength : 0x9 (9 bytes)
bDescriptorType : 0x4 Interface
bInterfaceNumber : 0x1
bAlternateSetting : 0x0
bNumEndpoints : 0x1
bInterfaceClass : 0x3 Human Interface Device
bInterfaceSubClass : 0x0
bInterfaceProtocol : 0x0
iInterface : 0x5 Printer Interface (Usage = 3500h, Usage Page = FF45h)
ENDPOINT 0x82: Interrupt IN ==========================
bLength : 0x7 (7 bytes)
bDescriptorType : 0x5 Endpoint
bEndpointAddress : 0x82 IN
bmAttributes : 0x3 Interrupt
wMaxPacketSize : 0x10 (16 bytes)
bInterval : 0x4
Here is the simple code
from escpos import printer
p = printer.Usb(idVendor=0x04B3, idProduct=0x4535, timeout=10, in_ep=0x82)
print(p.idProduct)
I cannot get to the print because it just hangs indefinitely at line 2.

docker: Error response from daemon: SIGILL: illegal instruction

Problem
I'm trying to create a docker container from a common image bitnami/airflow. I successfully downloaded the image, but when I run docker run -d -p 8080:8080 bitnami/airflow webserver I get the following error:
docker: Error response from daemon: SIGILL: illegal instruction
Docker version 20.10.8, build 3967b7d
Problem occurs with several images I've tested
Question
Is there a simple explanation why that would be the case? Any way to fix it?
Full Stack Trace
Here is the full stack trace:
docker: Error response from daemon: SIGILL: illegal instruction
PC=0x809b5f m=6 sigcode=2
instruction bytes: 0x48 0xfe 0xfe 0xfe 0xff 0x0 0x74 0x1b 0xf 0x57 0xc0 0xf 0x11 0x84 0x24 0xc0
goroutine 1 [running]:
regexp.(*Regexp).doMatch(...)
/usr/local/go/src/regexp/exec.go:514
regexp.(*Regexp).MatchString(...)
/usr/local/go/src/regexp/regexp.go:525
github.com/containerd/containerd/identifiers.Validate(0x7ffd389a4e0c, 0x4, 0x7ffd389a4e0c, 0x4)
/go/src/github.com/containerd/containerd/identifiers/validate.go:61 +0x9f fp=0xc0001575b0 sp=0xc000157500 pc=0x809b5f
github.com/containerd/containerd/namespaces.NamespaceRequired(0x9f5b60, 0xc000098000, 0x0, 0x8, 0x0, 0x7ff016885b10)
/go/src/github.com/containerd/containerd/namespaces/context.go:74 +0xd5 fp=0xc000157618 sp=0xc0001575b0 pc=0x814dd5
github.com/containerd/containerd/runtime/v2/runc/v2.newCommand(0x9f5b60, 0xc000098000, 0x7ffd389a4e6e, 0x40, 0x7ffd389a4e56, 0x13, 0x7ffd389a4e1a, 0x2b, 0xc00002a00e, 0x31, ...)
/go/src/github.com/containerd/containerd/runtime/v2/runc/v2/service.go:135 +0x4d fp=0xc000157708 sp=0xc000157618 pc=0x892ead
github.com/containerd/containerd/runtime/v2/runc/v2.(*service).StartShim(0xc000090080, 0x9f5b60, 0xc000098000, 0x7ffd389a4e6e, 0x40, 0x7ffd389a4e56, 0x13, 0x7ffd389a4e1a, 0x2b, 0xc00002a00e, ...)
/go/src/github.com/containerd/containerd/runtime/v2/runc/v2/service.go:175 +0xcb fp=0xc000157970 sp=0xc000157708 pc=0x8934eb
github.com/containerd/containerd/runtime/v2/shim.run(0x976d27, 0x15, 0x98d508, 0x0, 0x0, 0x0)
/go/src/github.com/containerd/containerd/runtime/v2/shim/shim.go:222 +0xbb5 fp=0xc000157ea8 sp=0xc000157970 pc=0x867e75
github.com/containerd/containerd/runtime/v2/shim.Run(0x976d27, 0x15, 0x98d508, 0x0, 0x0, 0x0)
/go/src/github.com/containerd/containerd/runtime/v2/shim/shim.go:153 +0xc7 fp=0xc000157f48 sp=0xc000157ea8 pc=0x8671a7
main.main()
/go/src/github.com/containerd/containerd/cmd/containerd-shim-runc-v2/main.go:27 +0x53 fp=0xc000157f88 sp=0xc000157f48 pc=0x898f73
runtime.main()
/usr/local/go/src/runtime/proc.go:204 +0x209 fp=0xc000157fe0 sp=0xc000157f88 pc=0x438549
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000157fe8 sp=0xc000157fe0 pc=0x46b0a1
goroutine 18 [chan receive]:
github.com/containerd/containerd/runtime/v2/shim.setRuntime.func1()
/go/src/github.com/containerd/containerd/runtime/v2/shim/shim.go:120 +0x85
created by github.com/containerd/containerd/runtime/v2/shim.setRuntime
/go/src/github.com/containerd/containerd/runtime/v2/shim/shim.go:119 +0x45
goroutine 5 [syscall]:
os/signal.signal_recv(0xc00003c7ae)
/usr/local/go/src/runtime/sigqueue.go:147 +0x9d
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:23 +0x25
created by os/signal.Notify.func1.1
/usr/local/go/src/os/signal/signal.go:150 +0x45
goroutine 6 [chan receive]:
github.com/containerd/containerd/runtime/v2/shim.(*RemoteEventsPublisher).processQueue(0xc000068180)
/go/src/github.com/containerd/containerd/runtime/v2/shim/publisher.go:80 +0x55
created by github.com/containerd/containerd/runtime/v2/shim.NewPublisher
/go/src/github.com/containerd/containerd/runtime/v2/shim/publisher.go:56 +0x10f
goroutine 7 [syscall]:
syscall.Syscall6(0xe8, 0xa, 0xc0001559a8, 0x80, 0xffffffffffffffff, 0x0, 0x0, 0x406d7a, 0xc00015e2a0, 0x0)
/usr/local/go/src/syscall/asm_linux_amd64.s:41 +0x5
github.com/containerd/containerd/vendor/golang.org/x/sys/unix.EpollWait(0xa, 0xc0001559a8, 0x80, 0x80, 0xffffffffffffffff, 0x0, 0x0, 0x0)
/go/src/github.com/containerd/containerd/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go:77 +0x72
github.com/containerd/containerd/pkg/oom/v1.(*epoller).Run(0xc000068360, 0x9f5b60, 0xc000098000)
/go/src/github.com/containerd/containerd/pkg/oom/v1/v1.go:77 +0xad
created by github.com/containerd/containerd/runtime/v2/runc/v2.New
/go/src/github.com/containerd/containerd/runtime/v2/runc/v2/service.go:90 +0x109
goroutine 8 [runnable]:
github.com/containerd/containerd/runtime/v2/runc/v2.(*service).processExits(0xc000090080)
/go/src/github.com/containerd/containerd/runtime/v2/runc/v2/service.go:726
created by github.com/containerd/containerd/runtime/v2/runc/v2.New
/go/src/github.com/containerd/containerd/runtime/v2/runc/v2/service.go:100 +0x21f
goroutine 9 [runnable]:
github.com/containerd/containerd/vendor/github.com/containerd/console.(*Epoller).Wait(0xc0000683f0, 0xc0001578b0, 0x40df98)
/go/src/github.com/containerd/containerd/vendor/github.com/containerd/console/console_linux.go:108
created by github.com/containerd/containerd/runtime/v2/runc.NewPlatform
/go/src/github.com/containerd/containerd/runtime/v2/runc/platform.go:48 +0x5b
goroutine 10 [runnable]:
github.com/containerd/containerd/runtime/v2/runc/v2.(*service).forward(0xc000090080, 0x9f5b60, 0xc000098000, 0x9ef7e0, 0xc000068180)
/go/src/github.com/containerd/containerd/runtime/v2/runc/v2/service.go:800
created by github.com/containerd/containerd/runtime/v2/runc/v2.New
/go/src/github.com/containerd/containerd/runtime/v2/runc/v2/service.go:106 +0x2c5
rax 0xce0a20
rbx 0xc0000a8000
rcx 0x0
rdx 0x0
rdi 0xc00005c1e0
rsi 0x0
rbp 0xc0001575a0
rsp 0xc000157500
r8 0xce0a20
r9 0x0
r10 0xc00005c1e0
r11 0x4
r12 0xc000143b80
r13 0x0
r14 0x9dc890
r15 0x0
rip 0x809b5f
rflags 0x10202
cs 0x33
fs 0x0
gs 0x0
: exit status 2: unknown.

Flutter App Crashes on Startup

My flutter application is crashing on startup on android. I have taken away the google_sign_in and location packages. Now it seems to work. From what I'm reading I believe is has to do with these packages depending on different versions of google play services; however, I'm a little new to flutter, and I don't know how to resolve that issue.
I get a stack trace with an error message similar to this:
08-17 09:56:13.668 1740-1745/? E/MP-Decision: num online cores: 2 reqd : 4 available : 4 rq_depth:7.700000 hotplug_avg_load_dw: 184
UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:91.000000
UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:91.000000
08-17 09:56:13.838 6267-6273/? E/jdwp: Failed sending reply to debugger: Bad file number
08-17 09:56:14.069 1740-1745/? E/MP-Decision: num online cores: 4 reqd : 1 available : 4 rq_depth:0.600000 hotplug_avg_load_dw: 21
DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:245.000000
DOWN cpu:2 core_idx:2 Ns:2.100000 Ts:240 total_time_down:245.000000
DOWN cpu:1 core_idx:1 Ns:1.100000 Ts:190 total_time_down:196.000000
08-17 09:56:14.319 1740-1745/? E/MP-Decision: num online cores: 1 reqd : 2 available : 4 rq_depth:1.700000 hotplug_avg_load_dw: 67
UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
08-17 09:56:14.439 5011-5025/? E/QcrilMsgTunnelSocket: IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
08-17 09:56:14.819 1740-1745/? E/MP-Decision: num online cores: 2 reqd : 1 available : 4 rq_depth:1.000000 hotplug_avg_load_dw: 15
DOWN cpu:1 core_idx:1 Ns:1.100000 Ts:190 total_time_down:245.000000
08-17 09:56:15.120 1740-1745/? E/MP-Decision: num online cores: 1 reqd : 2 available : 4 rq_depth:1.300000 hotplug_avg_load_dw: 67
UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
08-17 09:56:15.520 1740-1745/? E/MP-Decision: num online cores: 2 reqd : 3 available : 4 rq_depth:4.800000 hotplug_avg_load_dw: 94
UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:98.000000
08-17 09:56:15.550 6332-6332/com.jeepapp.jeepapp E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.google.android.gms.common.internal.zzbq
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:4995)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4608)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4548)
at android.app.ActivityThread.access$1400(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1341)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5293)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
08-17 09:56:15.570 1740-1745/? E/MP-Decision: num online cores: 3 reqd : 4 available : 4 rq_depth:4.300000 hotplug_avg_load_dw: 186
UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:95.000000
08-17 09:56:15.820 1740-1745/? E/MP-Decision: num online cores: 4 reqd : 2 available : 4 rq_depth:1.000000 hotplug_avg_load_dw: 77
DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:242.000000
DOWN cpu:2 core_idx:2 Ns:2.100000 Ts:240 total_time_down:242.000000
08-17 09:56:15.900 726-812/? E/android.os.Debug: !#Dumpstate > sdumpstate -k -t -z -d -o /data/log/dumpstate_app_error
08-17 09:56:15.920 1740-1745/? E/MP-Decision: num online cores: 2 reqd : 3 available : 4 rq_depth:3.300000 hotplug_avg_load_dw: 89
UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:92.000000
08-17 09:56:16.371 1740-1745/? E/MP-Decision: num online cores: 3 reqd : 2 available : 4 rq_depth:2.000000 hotplug_avg_load_dw: 30
DOWN cpu:2 core_idx:2 Ns:2.100000 Ts:240 total_time_down:245.000000
08-17 09:56:16.471 1740-1745/? E/MP-Decision: num online cores: 2 reqd : 1 available : 4 rq_depth:0.300000 hotplug_avg_load_dw: 17
DOWN cpu:1 core_idx:1 Ns:1.100000 Ts:190 total_time_down:96.000000
08-17 09:56:17.182 1740-1745/? E/MP-Decision: num online cores: 1 reqd : 2 available : 4 rq_depth:0.000000 hotplug_avg_load_dw: 52
UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
08-17 09:56:18.112 6384-6384/? E/QSEECOMAPI:: Error::Failed to open /dev/qseecom device
08-17 09:56:18.112 6384-6384/? E/QSEECOMAPI:: Error::Failed to open /dev/qseecom device
08-17 09:56:18.112 6384-6384/? E/QSEECOMAPI:: Error::Failed to open /dev/qseecom device
08-17 09:56:18.112 6384-6384/? E/QSEECOMAPI:: Error::Failed to open /dev/qseecom device
08-17 09:56:18.112 6384-6384/? E/QSEECOMAPI:: Error::Failed to open /dev/qseecom device
08-17 09:56:18.213 1740-1745/? E/MP-Decision: num online cores: 2 reqd : 1 available : 4 rq_depth:1.000000 hotplug_avg_load_dw: 26
DOWN cpu:1 core_idx:1 Ns:1.100000 Ts:190 total_time_down:245.000000
08-17 09:56:18.453 5011-5025/? E/QcrilMsgTunnelSocket: IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
08-17 09:56:18.663 1740-1745/? E/MP-Decision: num online cores: 1 reqd : 3 available : 4 rq_depth:5.800000 hotplug_avg_load_dw: 69
UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:147.000000
UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:147.000000
08-17 09:56:19.013 1740-1745/? E/MP-Decision: num online cores: 3 reqd : 4 available : 4 rq_depth:3.500000 hotplug_avg_load_dw: 107
UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:98.000000
08-17 09:56:19.264 1740-1745/? E/MP-Decision: num online cores: 4 reqd : 2 available : 4 rq_depth:1.300000 hotplug_avg_load_dw: 91
DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 total_time_down:242.000000
DOWN cpu:2 core_idx:2 Ns:2.100000 Ts:240 total_time_down:242.000000
08-17 09:56:19.364 1740-1745/? E/MP-Decision: num online cores: 2 reqd : 3 available : 4 rq_depth:4.800000 hotplug_avg_load_dw: 90
UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:92.000000
08-17 09:56:19.774 1740-1745/? E/MP-Decision: num online cores: 3 reqd : 2 available : 4 rq_depth:0.000000 hotplug_avg_load_dw: 133
DOWN cpu:2 core_idx:2 Ns:2.100000 Ts:240 total_time_down:396.000000
08-17 09:56:20.265 1740-1745/? E/MP-Decision: num online cores: 2 reqd : 1 available : 4 rq_depth:0.500000 hotplug_avg_load_dw: 24
DOWN cpu:1 core_idx:1 Ns:1.100000 Ts:190 total_time_down:196.000000
08-17 09:56:22.487 5011-5025/? E/QcrilMsgTunnelSocket: IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
08-17 09:56:22.737 1740-1745/? E/MP-Decision: num online cores: 1 reqd : 3 available : 4 rq_depth:15.300000 hotplug_avg_load_dw: 56
UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:142.000000
UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:142.000000
08-17 09:56:22.787 1740-1745/? E/MP-Decision: num online cores: 3 reqd : 4 available : 4 rq_depth:8.900000 hotplug_avg_load_dw: 217
UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:0.000000
UP cpu:3 core_idx:3 Nw:3.500000 Tw:90 total_time_up:186.000000
Also, to give you an idea of my pubspec.yaml:
dependencies:
flutter:
sdk: flutter
flutter_map:
location:
google_sign_in:
firebase_auth: 0.5.4
Once I give rid of the google_sign_in and location dependencies it no longer crashes on start up. I'm guessing I need to set the versions of location and google_sign_in or find a way to set their google play dependency, but I'm not sure how to do either.
Also, I have the following in my build.gradle in the android folder:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.2.1'
}
}
Add these lines at the end of your app/build.gradle file
apply plugin: 'com.google.gms.google-services'
configurations.all {
resolutionStrategy {
force 'com.google.android.gms:play-services-location:15.0.0'
}
}
Update your firebase_auth dependency:
firebase_auth: 0.5.18
try adding
<meta-data
android:name="flutterEmbedding"
android:value="2" />
to your xml file.
This will make it look like this
`
<application
android:name="io.flutter.app.FlutterApplication"
android:label="gscwa"
android:icon="#mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
`

Getting the stack pointer content using Intel's PinTool

Using objdump utility, we are able to retrieved the relative address of a variable for example consider a simple C program:
Source-code:
#include<stdio.h>
void do_stuff(int my_arg){
int my_local=my_arg+2;
int i;
for(i=0;i<my_local;i++)
printf("i=%d\n",i);
}
int main(){
do_stuff(2);
return 0;
}
Compile with gcc :
$ gcc -g example.c -o example
Run objdump utility with dwarf flag for ELF information.
$objdump --dwarf=info example
Output:
Contents of the .debug_info section:
Compilation Unit # offset 0x0:
Length: 0xd3 (32-bit)
Version: 4
Abbrev Offset: 0x0
Pointer Size: 8
<0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
<c> DW_AT_producer : (indirect string, offset: 0x0): GNU C 4.8.4 -mtune=generic -march=x86-64 -g -fstack-protector
<10> DW_AT_language : 1 (ANSI C)
<11> DW_AT_name : (indirect string, offset: 0xcd): sample1.c
<15> DW_AT_comp_dir : (indirect string, offset: 0x7e): /home/bernard/PhD/TEJAS/tejas_installation_kit/Tejas-Simulator/Tejas/benchmark
<19> DW_AT_low_pc : 0x40052d
<21> DW_AT_high_pc : 0x54
<29> DW_AT_stmt_list : 0x0
<1><2d>: Abbrev Number: 2 (DW_TAG_base_type)
<2e> DW_AT_byte_size : 8
<2f> DW_AT_encoding : 7 (unsigned)
<30> DW_AT_name : (indirect string, offset: 0x47): long unsigned int
<1><34>: Abbrev Number: 2 (DW_TAG_base_type)
<35> DW_AT_byte_size : 1
<36> DW_AT_encoding : 8 (unsigned char)
<37> DW_AT_name : (indirect string, offset: 0x62): unsigned char
<1><3b>: Abbrev Number: 2 (DW_TAG_base_type)
<3c> DW_AT_byte_size : 2
<3d> DW_AT_encoding : 7 (unsigned)
<3e> DW_AT_name : (indirect string, offset: 0xde): short unsigned int
<1><42>: Abbrev Number: 2 (DW_TAG_base_type)
<43> DW_AT_byte_size : 4
<44> DW_AT_encoding : 7 (unsigned)
<45> DW_AT_name : (indirect string, offset: 0x4c): unsigned int
<1><49>: Abbrev Number: 2 (DW_TAG_base_type)
<4a> DW_AT_byte_size : 1
<4b> DW_AT_encoding : 6 (signed char)
<4c> DW_AT_name : (indirect string, offset: 0x64): signed char
<1><50>: Abbrev Number: 2 (DW_TAG_base_type)
<51> DW_AT_byte_size : 2
<52> DW_AT_encoding : 5 (signed)
<53> DW_AT_name : (indirect string, offset: 0xf1): short int
<1><57>: Abbrev Number: 3 (DW_TAG_base_type)
<58> DW_AT_byte_size : 4
<59> DW_AT_encoding : 5 (signed)
<5a> DW_AT_name : int
<1><5e>: Abbrev Number: 2 (DW_TAG_base_type)
<5f> DW_AT_byte_size : 8
<60> DW_AT_encoding : 5 (signed)
<61> DW_AT_name : (indirect string, offset: 0x75): long int
<1><65>: Abbrev Number: 2 (DW_TAG_base_type)
<66> DW_AT_byte_size : 8
<67> DW_AT_encoding : 7 (unsigned)
<68> DW_AT_name : (indirect string, offset: 0xfb): sizetype
<1><6c>: Abbrev Number: 2 (DW_TAG_base_type)
<6d> DW_AT_byte_size : 1
<6e> DW_AT_encoding : 6 (signed char)
<6f> DW_AT_name : (indirect string, offset: 0x6b): char
<1><73>: Abbrev Number: 4 (DW_TAG_subprogram)
<74> DW_AT_external : 1
<74> DW_AT_name : (indirect string, offset: 0x59): do_stuff
<78> DW_AT_decl_file : 1
<79> DW_AT_decl_line : 2
<7a> DW_AT_prototyped : 1
<7a> DW_AT_low_pc : 0x40052d
<82> DW_AT_high_pc : 0x3f
<8a> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_cfa)
<8c> DW_AT_GNU_all_tail_call_sites: 1
<8c> DW_AT_sibling : <0xb9>
<2><90>: Abbrev Number: 5 (DW_TAG_formal_parameter)
<91> DW_AT_name : (indirect string, offset: 0xd7): my_arg
<95> DW_AT_decl_file : 1
<96> DW_AT_decl_line : 2
<97> DW_AT_type : <0x57>
<9b> DW_AT_location : 2 byte block: 91 5c (DW_OP_fbreg: -36)
<2><9e>: Abbrev Number: 6 (DW_TAG_variable)
<9f> DW_AT_name : (indirect string, offset: 0x3e): my_local
<a3> DW_AT_decl_file : 1
<a4> DW_AT_decl_line : 3
<a5> DW_AT_type : <0x57>
<a9> DW_AT_location : 2 byte block: 91 6c (DW_OP_fbreg: -20)
<2><ac>: Abbrev Number: 7 (DW_TAG_variable)
<ad> DW_AT_name : i
<af> DW_AT_decl_file : 1
<b0> DW_AT_decl_line : 4
<b1> DW_AT_type : <0x57>
<b5> DW_AT_location : 2 byte block: 91 68 (DW_OP_fbreg: -24)
<2><b8>: Abbrev Number: 0
<1><b9>: Abbrev Number: 8 (DW_TAG_subprogram)
<ba> DW_AT_external : 1
<ba> DW_AT_name : (indirect string, offset: 0x70): main
<be> DW_AT_decl_file : 1
<bf> DW_AT_decl_line : 9
<c0> DW_AT_type : <0x57>
<c4> DW_AT_low_pc : 0x40056c
<cc> DW_AT_high_pc : 0x15
<d4> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_cfa)
<d6> DW_AT_GNU_all_tail_call_sites: 1
<1><d6>: Abbrev Number: 0
I want to do as follows:-
I want to retrieved the address of a variable , say my_local. First I will look into DW_TAG_Variable, then DW_AT_name, DW_AT_location which was given by base register at function -20 from the top.
Question:
How to know the content of base register at run time.
Can we implement it using PinTool.
Question in broader sense:
I want variable my_local map to which address in memory given information from dwarf and Pintool.
Thanks in Advance.
You should be able to use Pin's SafeCopy function to access app memory and copy it into pintool memory.
But as noted in the comments, it's not always possible to know where variable values are stored reliably so keep this in mind.

Resources