Outils pour utilisateurs

Outils du site


prog:windbg

Le logiciel permet de lire les dump de mémoire Windows (.dmp). Visual Studio n'arrive pas à lire ce format.

Installation

Cela se faire depuis Windows SDK et sélectionner Debugging Tools for Windows. Debugging Tools for Windows (WinDbg, KD, CDB, NTSD) Archive du 22/02/2017 le 28/04/2020

Si un dossier de symbole est à déclarer, la syntaxe est la suivante :

srv*c:\SymbolsSrvCache*https://msdl.microsoft.com/download/symbols
srv*c:\SymbolsSrvCache*https://referencesource.microsoft.com/symbols

Le guide ULTIME pour résoudre les erreurs d’écran bleu (BSOD) sur Windows Archive du 06/03/2019 le 30/01/2020

Activer les dump Windows pour les BSOD

Il faut déjà commencer par activer les dumps mémoires. Aller dans Paramètres système avancés puis Démarrage et récupération et choisir Image mémoire complète.

Activer les dump Windows pour les programmes

Tout se fait dans la base de registre.

Créer la clé HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps

Ajouter les champs ci-dessous pour faire un dump de tous les process :

NomType
DumpCountDWORD
DumpType2 (Full dump)
DumpFolder Folder. Par défaut %LOCALAPPDATA%\CrashDumps

Pour n'activer les dump que pour un process précis, ajouter les mêmes champs dans HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\PROCESS.EXE

Collecting User-Mode Dumps Archive du 31/05/2018 le 16/10/2019

Comment lire les minidump

Pour lire le minidump : How to read the small memory dump file that is created by Windows if a crash occurs Archive du 18/12/2019 le 28/04/2020

Exécuter WinDgb :

"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\windbg.exe" -y C:\SymbolCache -i C:\Windows\System32 -z C:\Windows\Minidump\XXXX.dmp

puis cliquer sur !analyze -v pour afficher l'état de la pile du noyau.

Globalement, pour trouver les coupables, c'est souvent ceux n'étant pas fourni avec Windows et donc ceux n'ayant pas les symboles (dans le cas de l'exemple 2).

Exemple 1 : crash du driver graphique.

STACK_TEXT:  
fffffd08`5ae7f918 fffff806`7da8d5e6 : 00000000`00000116 ffff8f89`ef3c7010 fffff806`80d7eacc ffffffff`c000009a : nt!KeBugCheckEx
fffffd08`5ae7f920 fffff806`7da48c28 : fffff806`80d7eacc ffff8f89`cf30c3b0 00000000`01000000 ffff8f89`cf30c448 : dxgkrnl!TdrUpdateDbgReport+0x5e6
fffffd08`5ae7f960 fffff806`7da41156 : ffff8f89`cf310000 ffff8f89`ebce61d0 00000000`00000001 00000000`00000001 : dxgkrnl!TdrIsEnabled+0x74a28
fffffd08`5ae7f990 fffff806`7da8cd25 : fffff806`79fb0140 ffff8f89`cf3109c0 ffff8f8a`1ae61080 fffff806`7a419240 : dxgkrnl!TdrIsEnabled+0x6cf56
fffffd08`5ae7fa10 fffff806`7da8ce87 : 00000000`00000200 ffff8f89`c1c4d7f0 fffff806`7a2ca560 ffff8f89`c1c50a50 : dxgkrnl!TdrResetFromTimeout+0x15
fffffd08`5ae7fa40 fffff806`79f2fbfa : ffff8f89`f29d5040 fffff806`7da8ce60 ffff8f89`ebce61d0 fffffd08`00000000 : dxgkrnl!TdrResetFromTimeoutAsync+0xa7
fffffd08`5ae7fa70 fffff806`79ef8b35 : ffff8f89`f29d5040 ffff8f89`c1c5f040 ffff8f89`f29d5040 00000000`00000000 : nt!ExQueueWorkItem+0x2e1a
fffffd08`5ae7fb10 fffff806`7a07635c : fffff806`7834c180 ffff8f89`f29d5040 fffff806`79ef8ae0 fffff806`79f8e8bf : nt!RtlIpv4StringToAddressW+0x155
fffffd08`5ae7fb60 00000000`00000000 : fffffd08`5ae80000 fffffd08`5ae79000 00000000`00000000 00000000`00000000 : nt!KeSynchronizeExecution+0x62dc

Exemple 2 : conflit entre Npcap et Trend Micro.

STACK_TEXT:  
fffff804`2de6b458 fffff804`2bd3be27 : 00000000`0000001e ffffffff`c0000005 fffff804`2f05701f fffff804`2de6c4b8 : nt!KeBugCheckEx
fffff804`2de6b460 fffff804`2bc7af36 : fffff804`2f05701f fffff804`2badd1a8 fffff804`2de6c6f0 fffff804`2de6bd00 : nt!KeRegisterNmiCallback+0x2d7
fffff804`2de6b4a0 fffff804`2bc3c42f : ffffc28a`00000001 fffff804`2de6cb80 fffff804`2de67000 fffff804`2de6e000 : nt!memset+0x66b6
fffff804`2de6b4e0 fffff804`2bc6a9ef : fffff804`2de6cb80 fffff804`2de6bac0 fffff804`2de6bba0 fffff804`2fcb98e0 : nt!_C_specific_handler+0x9f
fffff804`2de6b550 fffff804`2bbc33a0 : fffff804`2de6bba0 00000000`00000000 fffff804`2de6bac0 fffff804`2f0e66d8 : nt!_chkstk+0x41f
fffff804`2de6b580 fffff804`2bad0bb4 : fffff804`2de6c4b8 fffff804`2de6c200 fffff804`2de6c4b8 ffffc28a`094c0381 : nt!RtlUnwindEx+0x3440
fffff804`2de6bcd0 fffff804`2bc73742 : fffff804`2de6c431 fffff804`2f07f2b5 ffffc28a`0b76b001 00000000`00000002 : nt!ExReleaseAutoExpandPushLockExclusive+0x264
fffff804`2de6c380 fffff804`2bc6f605 : 00000000`00000002 fffff804`2f058490 00000000`00000001 00000000`00000002 : nt!setjmpex+0x7ec2
fffff804`2de6c560 fffff804`2f05701f : ffffc289`ff202100 00000000`00000000 ffff96e1`45133780 ffff96cb`70a28998 : nt!setjmpex+0x3d85
fffff804`2de6c6f0 fffff804`2f057b81 : ffffc28a`09b61bb0 ffffc28a`09b61bb0 00000000`00000000 00000000`00000001 : ndis!NdisFReturnNetBufferLists+0x41f
fffff804`2de6c7f0 fffff804`2fca2dd6 : 00000000`00000000 00000000`00000000 ffffc28a`1f9cbe80 ffffc28a`092fbc30 : ndis!NdisFIndicateReceiveNetBufferLists+0x71
fffff804`2de6c830 fffff804`2fca2c2f : 00000000`00000000 fffff804`2de6ca00 ffffc28a`2df42210 00000000`00000000 : tmlwf+0x2dd6
fffff804`2de6c880 fffff804`2fcab013 : ffffc28a`00000000 ffffc28a`2df42210 00000000`00000002 00000000`00000000 : tmlwf+0x2c2f
fffff804`2de6c8b0 fffff804`2fcaadff : 00000000`00000000 fffff804`2de6ca00 00000000`00000002 ffffc28a`2df3cef0 : tmlwf+0xb013
fffff804`2de6c900 fffff804`2fca19ac : 00000000`00000000 00000000`00000000 ffffc28a`286d5020 ffffc28a`092fbc30 : tmlwf+0xadff
fffff804`2de6ca50 fffff804`2f0578d8 : ffffc28a`1f9cc2a0 ffffc28a`09b61bb0 fffff804`00000000 00000000`00000000 : tmlwf+0x19ac
fffff804`2de6cae0 fffff804`2f0584ce : ffffc28a`1aad2080 fffff804`2de6ccd1 fffff804`2de6ccb0 fffff804`2de6e000 : ndis!NdisMFreeNetBufferSGList+0x218
fffff804`2de6cb30 fffff804`2bb8e9c8 : fffff804`2de6ccd1 ffffc28a`09b61bb0 ffffc289`00000001 fffff804`2bb29bd6 : ndis!NdisFreeNetBuffer+0x34e
fffff804`2de6cb80 fffff804`2bb8e93d : fffff804`2f058490 fffff804`2de6ccb0 00000000`00000002 fffff804`2bc5cb6d : nt!Ordinal7+0x78
fffff804`2de6cbf0 fffff804`2f07f1f7 : 00000000`00000000 fffff804`2bdf98f0 ffffc28a`097e7040 fffff804`00000000 : nt!KeExpandKernelStackAndCalloutEx+0x1d
fffff804`2de6cc30 fffff804`2f057b81 : ffffc28a`094a0af0 ffffc28a`094a0af0 ffffc28a`00000000 00000000`0000000e : ndis!NdisQueueIoWorkItem+0xa107
fffff804`2de6cd30 fffff804`2fc7b9ba : 00000000`00000002 fffff804`2de6ce70 ffffc28a`09b24078 ffffc28a`09b24000 : ndis!NdisFIndicateReceiveNetBufferLists+0x71
fffff804`2de6cd70 fffff804`2f0578d8 : ffffc28a`2f6421ee 00000000`00000000 ffffc289`ff20ac80 ffffc28a`2f642000 : agnfilt+0x1b9ba
fffff804`2de6cf20 fffff804`2f0584ce : ffffc28a`1aad2080 fffff804`2de6d111 fffff804`2de6d0f0 fffff804`2de6e000 : ndis!NdisMFreeNetBufferSGList+0x218
fffff804`2de6cf70 fffff804`2bb8e9c8 : fffff804`2de6d111 ffffc28a`094a0af0 ffffc28a`00000001 ffffc289`ff202340 : ndis!NdisFreeNetBuffer+0x34e
fffff804`2de6cfc0 fffff804`2bb8e93d : fffff804`2f058490 fffff804`2de6d0f0 00000000`00000002 00000000`00000000 : nt!Ordinal7+0x78
fffff804`2de6d030 fffff804`2f07f1f7 : 00000000`00000200 00000000`00000000 fffff804`2de6d109 fffff804`2bdf806d : nt!KeExpandKernelStackAndCalloutEx+0x1d
fffff804`2de6d070 fffff804`2f057b81 : ffffc28a`094a0770 ffffc28a`094a0770 ffffc28a`00000000 00000000`0000000e : ndis!NdisQueueIoWorkItem+0xa107
fffff804`2de6d170 fffff804`2fcf5ff7 : ffffc28a`09b53000 ffffc28a`08eb2840 00000000`00000803 00000000`00000000 : ndis!NdisFIndicateReceiveNetBufferLists+0x71
fffff804`2de6d1b0 fffff804`2f0578d8 : ffffc28a`094a0770 fffff804`2fcf5f28 ffffc28a`09b53000 00000000`00000001 : npcap+0x5ff7
fffff804`2de6d210 fffff804`2f0584ce : ffffc28a`1aad2080 fffff804`2de6d401 fffff804`2de6d3e0 fffff804`2de6e000 : ndis!NdisMFreeNetBufferSGList+0x218
fffff804`2de6d260 fffff804`2bb8e9c8 : fffff804`2de6d401 ffffc28a`094a0770 00000000`00000001 fffff804`2de6d400 : ndis!NdisFreeNetBuffer+0x34e
fffff804`2de6d2b0 fffff804`2bb8e93d : fffff804`2f058490 fffff804`2de6d3e0 00000000`00000002 ffffc28a`09b53000 : nt!Ordinal7+0x78
fffff804`2de6d320 fffff804`2f07f1f7 : 00000008`00000004 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KeExpandKernelStackAndCalloutEx+0x1d
fffff804`2de6d360 fffff804`2f057b81 : ffffc28a`090acbe0 ffffc28a`090acbe0 ffffc28a`00000000 fffff804`0000000e : ndis!NdisQueueIoWorkItem+0xa107
fffff804`2de6d460 fffff804`2f2811b3 : 00000000`00000002 fffff804`2de6d5a0 00000000`00000001 ffffc28a`093067c0 : ndis!NdisFIndicateReceiveNetBufferLists+0x71
fffff804`2de6d4a0 fffff804`2f0578d8 : fffff804`00000000 00001f80`00ac02ce fffff804`2de6d820 ffffc28a`09cc9b00 : wfplwfs+0x11b3
fffff804`2de6d600 fffff804`2f0584ce : ffffc28a`1aad2080 fffff804`2de6d850 fffff804`2de6d820 fffff804`2de6e000 : ndis!NdisMFreeNetBufferSGList+0x218
fffff804`2de6d650 fffff804`2bb8e9c8 : fffff804`2de6d850 ffffc28a`090acbe0 ffffc28a`00000001 fffff804`2f0bb6ef : ndis!NdisFreeNetBuffer+0x34e
fffff804`2de6d6a0 fffff804`2bb8e93d : fffff804`2f058490 fffff804`2de6d820 00000000`00486117 00000000`00000000 : nt!Ordinal7+0x78
fffff804`2de6d710 fffff804`2f055196 : fffff804`3171b550 fffff804`316c9a76 00000000`00000000 fffff804`2de6d7b9 : nt!KeExpandKernelStackAndCalloutEx+0x1d
fffff804`2de6d750 fffff804`316c71bf : ffffc28a`08eb2840 00000000`00000000 ffffc28a`09dc2080 ffffc28a`094f4aa0 : ndis!NdisMIndicateReceiveNetBufferLists+0x6c6
fffff804`2de6d8d0 fffff804`316c82e3 : ffffc28a`08f4e800 ffffc28a`09dc1000 ffffc28a`09dc2080 00000000`00000000 : e1d65x64!DriverEntry+0x13d43
fffff804`2de6d930 fffff804`316cdd74 : ffffc28a`084ffa90 ffff0001`00000000 ffffc28a`09dc1001 ffff0001`00000000 : e1d65x64!DriverEntry+0x14e67
fffff804`2de6d9b0 fffff804`316cfc4e : ffff0001`00000000 fffff804`00000000 fffff804`2de6dab0 00000000`00000000 : e1d65x64!DriverEntry+0x1a8f8
fffff804`2de6da30 fffff804`316cf1b0 : ffffc28a`084ff8f0 fffff804`2f713601 ffffc28a`00000000 00000000`00000000 : e1d65x64!DriverEntry+0x1c7d2
fffff804`2de6daf0 fffff804`2f056838 : ffffc28a`09a64000 ffffc28a`09a64000 00000000`00000000 00000000`00000000 : e1d65x64!DriverEntry+0x1bd34
fffff804`2de6db30 fffff804`2bb27677 : 00000000`00000000 fffff804`2e25fe00 ffffc28a`083d00b8 fffff804`29ebe180 : ndis!NdisMAllocateNetBufferSGList+0x858
fffff804`2de6dc60 fffff804`2bb26cbe : fffff804`29ebe180 00000000`00000000 00000000`00000002 00000000`00000025 : nt!IofCallDriver+0xbe7
fffff804`2de6dda0 fffff804`2bc68d65 : 00000000`00000000 fffff804`29ebe180 ffffef04`64fc7a80 ffffab01`4414a3c0 : nt!IofCallDriver+0x22e
fffff804`2de6dfb0 fffff804`2bc68b50 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KeSynchronizeExecution+0x5ce5
ffffef04`64fc79c0 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KeSynchronizeExecution+0x5ad0

Cas du <Unloaded_xxxxxxxx.dll>+0x12345

Ouvrir WinDbg. Cliquer sur !analyze -v.

Lancer la commande lm.

Unloaded modules:
00007ffb`33920000 00007ffb`33943000   VCOMP120.DLL

Si dans la pile, on constate d'une dll est dans la zone Unloaded modules:, il faut forcer son chargement.

Taper les commandes :

? 00007ffb`33943000 - 00007ffb`33920000
Evaluate expression: 143360 = 00000000`00023000

.reload vcomp120.dll=00007ffb`33920000,00000000`00023000

Ainsi, les symboles arrivent à se charger :

VCOMP120 + 0x411e   

devient :

vcomp120!_vcomp::PartialBarrierN::Block + 0x3a   

Crash in Unloaded_mydll.dll – how to find out who called unloaded dll Archive du 11/12/2012 le 16/10/2019

prog/windbg.txt · Dernière modification : 2021/05/24 15:36 de root