Skip to content

Instantly share code, notes, and snippets.

View MattWhilden's full-sized avatar

Matthew Whilden MattWhilden

  • Microsoft
  • Redmond
View GitHub Profile
@MattWhilden
MattWhilden / RHB0002: Failed to write PDB
Created December 17, 2019 22:23
Working your way out of compiler failure RHB0002
The other rhbind crashes we’ve seen of this type are generally OutOfMemory errors during final PDB generation. Essentially, the 32 bit address spaces available to RhBind just doesn't contain a big enough block for the PDB being generated. 300-800MB PDBs are not super uncommon.
We'd certainly like a more holistic solution to this issue (64 bit version of this tool, streamed writting of pdb, better early analysis to reduce overall compiler pressure etc) but that doesn't help customers currently impacted. I've laid out some essential reading followed by strategies that should help some folks get unblocked in the time being. The strategies outlined below focus on reducing the amount of infromation heading through the compiler.
If you have questions or success with this approach, please feel free to reach out to us at dotnetnative@microsoft.com.
 
Docs worth at least skimming to get the idea of:
· https://devblogs.microsoft.com/dotnet/net-native-deep-dive-dynamic-features-in-static-code/
· https://docs.micro
@MattWhilden
MattWhilden / CollectingEtl.txt
Created April 9, 2019 17:36
How to collect diagnostic data for background transfer issues
1. Copy this wprp file to the an impacted machine: https://gist.github.com/MattWhilden/5b844d89c821be6426ecead8ba4217f7
2. Download WPR (Windows Performance Recorder) - included in the Windows ADK: https://go.microsoft.com/fwlink/p/?LinkId=526740
3. Reboot the machine.
4. Start an elevated command prompt.
5. wpr -start <path to WindowsNetworkingBackgroundTransfer.wprp>
6. Launch the app and let it run for a couple of minutes, confirming that the bad behavior is occurring (if possible).
7. wpr -stop BackgroundTransfer.etl
8. Share BackgroundTransfer.etl with us.
@MattWhilden
MattWhilden / WindowsNetworkingBackgroundTransfer.wprp
Created April 9, 2019 17:34
wprp file for tracking down background transfer issues
<?xml version="1.0" encoding="utf-8"?>
<!--
WPR Profile for manual capture and analysis using WPR and WPA
NOTE: This is provided as a convenience and is not consumed by the builds
-->
<WindowsPerformanceRecorder Version="1.0" Author="Microsoft Corporation" Copyright="Microsoft Corporation" Company="Microsoft Corporation">
<Profiles>
<EventCollector Id="EventCollector_WindowsNetworkingBackgroundTransfer" Name="WindowsNetworkingBackgroundTransferCollector">
<BufferSize Value="64" />
<Buffers Value="4" />
<!--
***********************************************************************************************
Microsoft.NetNative.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
<!--
***********************************************************************************************
Microsoft.NetNative.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
<!--
***********************************************************************************************
Microsoft.NetNative.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************