Skip to content

C#: Crash in grpc_csharp_ext.x86.dll (out of memory) #16464

@mfrischknecht

Description

@mfrischknecht

Hi,

I am experiencing a crash in the C code (grpc_csharp_ext.x86.dll) in one of my test projects after running the application for a while. I saw that someone already posted a similar issue (#13585), but since I am not sure if this is actually the same error, I thought I'd better open a separate one. The error is reproducible on two different machines using the code I pushed at https://github.com/mfrischknecht/grpc-csharp-crash

My Windows Event Log contained some meager information on the crash, but unfortunately I can't find the referenced .dmp file anywhere (the folder referenced in the second message is empty):

Event log entry
Faulting application name: Proxy.exe, version: 1.0.0.0, time stamp: 0x5b842b8e
Faulting module name: grpc_csharp_ext.x86.dll, version: 0.0.0.0, time stamp: 0x5b6a694a
Exception code: 0xc0000409
Fault offset: 0x0016f3cd
Faulting process id: 0x31a4
Faulting application start time: 0x01d43e25fa1c7f41
Faulting application path: C:\Users\mfrischknecht\Documents\Test\grpc-test-public\Proxy\bin\Debug\Proxy.exe
Faulting module path: C:\Users\mfrischknecht\Documents\Test\grpc-test-public\Proxy\bin\Debug\grpc_csharp_ext.x86.dll
Report Id: bf0c1ee1-133e-44e2-ba4d-109694f9c157
Faulting package full name: 
Faulting package-relative application ID: 

Second event log entry
Fault bucket 1166220646665915848, type 5
Event Name: BEX
Response: Not available
Cab Id: 0

Problem signature:
P1: Proxy.exe
P2: 1.0.0.0
P3: 5b842b8e
P4: grpc_csharp_ext.x86.dll
P5: 0.0.0.0
P6: 5b6a694a
P7: 0016f3cd
P8: c0000409
P9: 00000007
P10: 

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER2ECF.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER3028.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER3048.tmp.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER3046.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER3067.tmp.txt

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_Proxy.exe_35fb5669be47cd32799477d747631843ffa2c8_6e680e12_12c6371c

Analysis symbol: 
Rechecking for solution: 0
Report Id: bf0c1ee1-133e-44e2-ba4d-109694f9c157
Report Status: 268435456
Hashed bucket: ce661036123cdd78e02f3f7fce3f8dc8
Cab Guid: 0

Generated `Report.wer`
Version=1
EventType=BEX
EventTime=131798623685907858
ReportType=2
Consent=1
UploadTime=131798623690126450
ReportStatus=268435456
ReportIdentifier=9da77006-e592-481f-b7b1-d34a6bd32436
IntegratorReportIdentifier=bf0c1ee1-133e-44e2-ba4d-109694f9c157
Wow64Host=34404
Wow64Guest=332
NsAppName=Proxy.exe
OriginalFilename=Proxy.exe
AppSessionGuid=000031a4-0001-0019-417f-1cfa253ed401
TargetAppId=W:0006f612030ceeb4cb0a7df026c7d2d166ed00000000!0000af4880c51c09c13f7388cc794c444c9900da7a6b!Proxy.exe
TargetAppVer=2018//08//27:16:49:18!0!Proxy.exe
BootId=4294967295
TargetAsId=3062
IsFatal=1
Response.BucketId=ce661036123cdd78e02f3f7fce3f8dc8
Response.BucketTable=5
Response.LegacyBucketId=1166220646665915848
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=Proxy.exe
Sig[1].Name=Application Version
Sig[1].Value=1.0.0.0
Sig[2].Name=Application Timestamp
Sig[2].Value=5b842b8e
Sig[3].Name=Fault Module Name
Sig[3].Value=grpc_csharp_ext.x86.dll
Sig[4].Name=Fault Module Version
Sig[4].Value=0.0.0.0
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=5b6a694a
Sig[6].Name=Exception Offset
Sig[6].Value=0016f3cd
Sig[7].Name=Exception Code
Sig[7].Value=c0000409
Sig[8].Name=Exception Data
Sig[8].Value=00000007
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.17134.2.0.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=506c
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=506c35ece64f3d89440fa2256eb38fe8
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=0701
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=07013126ee586ad4b8f74c7290a8184d
UI[2]=C:\Users\mfrischknecht\Documents\Test\grpc-test-public\Proxy\bin\Debug\Proxy.exe
LoadedModule[0]=C:\Users\mfrischknecht\Documents\Test\grpc-test-public\Proxy\bin\Debug\Proxy.exe
LoadedModule[1]=C:\WINDOWS\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\WINDOWS\SYSTEM32\MSCOREE.DLL
LoadedModule[3]=C:\WINDOWS\System32\KERNEL32.dll
LoadedModule[4]=C:\WINDOWS\System32\KERNELBASE.dll
LoadedModule[5]=C:\WINDOWS\System32\ADVAPI32.dll
LoadedModule[6]=C:\WINDOWS\System32\msvcrt.dll
LoadedModule[7]=C:\WINDOWS\System32\sechost.dll
LoadedModule[8]=C:\WINDOWS\System32\RPCRT4.dll
LoadedModule[9]=C:\WINDOWS\System32\SspiCli.dll
LoadedModule[10]=C:\WINDOWS\System32\CRYPTBASE.dll
LoadedModule[11]=C:\WINDOWS\System32\bcryptPrimitives.dll
LoadedModule[12]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll
LoadedModule[13]=C:\WINDOWS\System32\SHLWAPI.dll
LoadedModule[14]=C:\WINDOWS\System32\combase.dll
LoadedModule[15]=C:\WINDOWS\System32\ucrtbase.dll
LoadedModule[16]=C:\WINDOWS\System32\GDI32.dll
LoadedModule[17]=C:\WINDOWS\System32\gdi32full.dll
LoadedModule[18]=C:\WINDOWS\System32\msvcp_win.dll
LoadedModule[19]=C:\WINDOWS\System32\USER32.dll
LoadedModule[20]=C:\WINDOWS\System32\win32u.dll
LoadedModule[21]=C:\WINDOWS\System32\IMM32.DLL
LoadedModule[22]=C:\WINDOWS\System32\kernel.appcore.dll
LoadedModule[23]=C:\WINDOWS\SYSTEM32\VERSION.dll
LoadedModule[24]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
LoadedModule[25]=C:\WINDOWS\SYSTEM32\MSVCR120_CLR0400.dll
LoadedModule[26]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\mscorlib\a973fcfc0c7b60badfdb6142dfc74fa8\mscorlib.ni.dll
LoadedModule[27]=C:\WINDOWS\System32\ole32.dll
LoadedModule[28]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll
LoadedModule[29]=C:\WINDOWS\System32\OLEAUT32.dll
LoadedModule[30]=C:\WINDOWS\SYSTEM32\CRYPTSP.dll
LoadedModule[31]=C:\WINDOWS\system32\rsaenh.dll
LoadedModule[32]=C:\WINDOWS\SYSTEM32\bcrypt.dll
LoadedModule[33]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System\f4d090fc4e195abf9ee82df5fdaf5dfa\System.ni.dll
LoadedModule[34]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Core\6ebc1f8ebf968f3631650d4c73990aa2\System.Core.ni.dll
LoadedModule[35]=C:\Users\mfrischknecht\Documents\Test\grpc-test-public\Proxy\bin\Debug\grpc_csharp_ext.x86.dll
LoadedModule[36]=C:\WINDOWS\System32\WS2_32.dll
LoadedModule[37]=C:\WINDOWS\SYSTEM32\WSOCK32.dll
LoadedModule[38]=C:\WINDOWS\system32\mswsock.dll
LoadedModule[39]=C:\WINDOWS\SYSTEM32\DNSAPI.dll
LoadedModule[40]=C:\WINDOWS\System32\NSI.dll
LoadedModule[41]=C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL
LoadedModule[42]=C:\Windows\System32\rasadhlp.dll
LoadedModule[43]=C:\WINDOWS\System32\fwpuclnt.dll
LoadedModule[44]=C:\WINDOWS\System32\clbcatq.dll
LoadedModule[45]=C:\WINDOWS\System32\shell32.dll
LoadedModule[46]=C:\WINDOWS\System32\cfgmgr32.dll
LoadedModule[47]=C:\WINDOWS\System32\shcore.dll
LoadedModule[48]=C:\WINDOWS\System32\windows.storage.dll
LoadedModule[49]=C:\WINDOWS\System32\profapi.dll
LoadedModule[50]=C:\WINDOWS\System32\powrprof.dll
LoadedModule[51]=C:\WINDOWS\System32\FLTLIB.DLL
LoadedModule[52]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Runtime\e66b8bbe2d20855c5229e654b92ff334\System.Runtime.ni.dll
LoadedModule[53]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Thre7bb2aad0#\271fa8c8e94ebbfcbcf097ef3d65c5f9\System.Threading.Tasks.ni.dll
LoadedModule[54]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Diagd2d95910#\e26700bfa930108227039b41564e2e4c\System.Diagnostics.Tracing.ni.dll
LoadedModule[55]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Collections\e7c021e75afdd7dca7e5e1653ecc06cc\System.Collections.ni.dll
LoadedModule[56]=C:\WINDOWS\assembly\NativeImages_v4.0.30319_32\System.Threading\532e6f9f32602e58eac7f8f263c5cf3f\System.Threading.ni.dll
State[0].Key=Transport.DoneStage1
State[0].Value=1
OsInfo[0].Key=vermaj
OsInfo[0].Value=10
OsInfo[1].Key=vermin
OsInfo[1].Value=0
OsInfo[2].Key=verbld
OsInfo[2].Value=17134
OsInfo[3].Key=ubr
OsInfo[3].Value=48
OsInfo[4].Key=versp
OsInfo[4].Value=0
OsInfo[5].Key=arch
OsInfo[5].Value=9
OsInfo[6].Key=lcid
OsInfo[6].Value=1033
OsInfo[7].Key=geoid
OsInfo[7].Value=223
OsInfo[8].Key=sku
OsInfo[8].Value=48
OsInfo[9].Key=domain
OsInfo[9].Value=1
OsInfo[10].Key=prodsuite
OsInfo[10].Value=256
OsInfo[11].Key=ntprodtype
OsInfo[11].Value=1
OsInfo[12].Key=platid
OsInfo[12].Value=10
OsInfo[13].Key=sr
OsInfo[13].Value=0
OsInfo[14].Key=tmsi
OsInfo[14].Value=118645
OsInfo[15].Key=osinsty
OsInfo[15].Value=3
OsInfo[16].Key=iever
OsInfo[16].Value=11.48.17134.0-11.0.65
OsInfo[17].Key=portos
OsInfo[17].Value=0
OsInfo[18].Key=ram
OsInfo[18].Value=16256
OsInfo[19].Key=svolsz
OsInfo[19].Value=237
OsInfo[20].Key=wimbt
OsInfo[20].Value=0
OsInfo[21].Key=blddt
OsInfo[21].Value=180410
OsInfo[22].Key=bldtm
OsInfo[22].Value=1804
OsInfo[23].Key=bldbrch
OsInfo[23].Value=rs4_release
OsInfo[24].Key=bldchk
OsInfo[24].Value=0
OsInfo[25].Key=wpvermaj
OsInfo[25].Value=0
OsInfo[26].Key=wpvermin
OsInfo[26].Value=0
OsInfo[27].Key=wpbuildmaj
OsInfo[27].Value=0
OsInfo[28].Key=wpbuildmin
OsInfo[28].Value=0
OsInfo[29].Key=osver
OsInfo[29].Value=10.0.17134.48.amd64fre.rs4_release.180410-1804
OsInfo[30].Key=buildflightid
OsInfo[30].Value={5B6C906C-0533-4BD3-86BB-C9D3F9A9C0C4}.201
OsInfo[31].Key=edition
OsInfo[31].Value=Professional
OsInfo[32].Key=ring
OsInfo[33].Key=expid
OsInfo[34].Key=containerid
OsInfo[35].Key=containertype
OsInfo[36].Key=edu
OsInfo[36].Value=0
FriendlyEventName=Stopped working
ConsentKey=BEX
AppName=Proxy
AppPath=C:\Users\mfrischknecht\Documents\Test\grpc-test-public\Proxy\bin\Debug\Proxy.exe
NsPartner=windows
NsGroup=windows8
ApplicationIdentity=1DF050CBF7CA16F3A94DE7F35179C9A5
MetadataHash=918631690

What version of gRPC and what language are you using?

Language: C# via Visual Studio Professional 2015 (Version 14.0.25421.03 Update 3)

Libraries: downloaded via Nuget:

  • Grpc 1.14.1
  • Grpc.Core 1.14.1
  • Grpc.Tools 1.14.1
  • Google.Protobuf 3.6.1
  • Google.Protobuf.Tools 3.6.1

What operating system (Linux, Windows, …) and version?

Windows 10 Pro (x64), Version 1803, OS build 16134.48

What runtime / compiler are you using (e.g. python version or version of gcc)

Microsoft (R) Visual C# Compiler version 1.3.1.60616

What did you do?

I set up a simple project to test GRPC with. Source Code: https://github.com/mfrischknecht/grpc-csharp-crash

The project consists of 3 Applications:

  • A server that accepts subscriptions and streams a single PriceUpdate message for each subscription over and over again
  • A client that starts 100 subscriptions and counts the number of messages it receives
  • A proxy that accepts subscriptions from the client and forwards them to the server.
    • This application crashes.

To reproduce the issue:

  • Open the Solution using VS 2015 on Windows
  • Let Nuget restore the configured packages
  • Build the solution
  • Run the server, proxy and client (in this order)
  • Watch the client printing out the messages/s it receives
  • Wait for a couple of seconds
  • The proxy process crashes without any further output

What did you expect to see?

  • The C code shouldn't crash directly
  • If the reason for the crash is due to a usage error of the API, an according (descriptive) C# exception should be thrown.

What did you see instead?

  • The process crashes without any further hints as to what the underlying reason was.
  • I was unable to extract any helpful information using the binaries distributed through Nuget. Exceptions don't seem to be thrown (if they are, the VS debugger ignores them). The program halts without running through the rest of the Main() method.

Anything else we should know about your project / environment?

We were able to reproduce the error on a second development machine, so the error doesn't seem to be system related.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions