Windows error reporting dump file

Collecting User-Mode Dumps

Starting with Windows Server 2008 and Windows Vista with Service Pack 1 (SP1), Windows Error Reporting (WER) can be configured so that full user-mode dumps are collected and stored locally after a user-mode application crashes. Applications that do their own custom crash reporting, including .NET applications, are not supported by this feature.

This feature is not enabled by default. Enabling the feature requires administrator privileges. To enable and configure the feature, use the following registry values under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps key.

Value Description Type Default value
DumpFolder The path where the dump files are to be stored. If you do not use the default path, then make sure that the folder contains ACLs that allow the crashing process to write data to the folder. For service crashes, the dump is written to service specific profile folders depending on the service account used. For example, the profile folder for System services is %WINDIR%\System32\Config\SystemProfile. For Network and Local Services, the folder is %WINDIR%\ServiceProfiles. REG_EXPAND_SZ %LOCALAPPDATA%\CrashDumps
DumpCount The maximum number of dump files in the folder. When the maximum value is exceeded, the oldest dump file in the folder will be replaced with the new dump file. REG_DWORD 10
DumpType Specify one of the following dump types:
  • 0: Custom dump
  • 1: Mini dump
  • 2: Full dump
REG_DWORD 1
CustomDumpFlags The custom dump options to be used. This value is used only when DumpType is set to 0.
The options are a bitwise combination of the MINIDUMP_TYPE enumeration values.
REG_DWORD MiniDumpWithDataSegs | MiniDumpWithUnloadedModules | MiniDumpWithProcessThreadData.

These registry values represent the global settings. You can also provide per-application settings that override the global settings. To create a per-application setting, create a new key for your application under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps (for example, HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\MyApplication.exe). Add your dump settings under the MyApplication.exe key. If your application crashes, WER will first read the global settings, and then will override any of the settings with your application-specific settings.

After an application crashes and prior to its termination, the system will check the registry settings to determine whether a local dump is to be collected. After the dump collection has completed, the application will be allowed to terminate normally. If the application supports recovery, the local dump is collected before the recovery callback is called.

These dumps are configured and controlled independently of the rest of the WER infrastructure. You can make use of the local dump collection even if WER is disabled or if the user cancels WER reporting. The local dump can be different than the dump sent to Microsoft.

Настройка Windows на создание дампов.

#1 VVS

  • Moderators
  • 18 191 Сообщений:
  • Для настройки Windows Vista+ на создание дампов падающих процессов необходимо выполнить следуюшее:

    Запускаем редактор реестра и находим:

    • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting

    Создаем новый ключ:
    LocalDumps
    Создаем параметры:

    имя DumpFolder
    тип REG_EXPAND_SZ
    значение %LOCALAPPDATA%\CrashDumps

    имя DumpType
    тип REG_DWORD
    значение 2

    Возможные значения DumpType

    0 — Custom dump
    1 — Minidump (default)
    2 — Full dump

    Находим

    • HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting

    И проделываем то же самое.

    2-ой вариант:
    Распаковываем wer_dump.zip, запускаем wer_dump.reg (он сделает ровно то, что описано выше).

    Независимо от того, какой вариант внесения изменений в реестр использовался, перезагружаем машину, воспроизводим ситуацию. Если нам повезло, crash-dump будет лежать в каталоге %LOCALAPPDATA%\CrashDumps

    Сообщение было изменено VVS: 09 Июнь 2016 — 17:25


    меня вот что возмутило. что даже не начинают толком диалог сразу дампы. © alehas777

    #2 VVS

  • Moderators
  • 18 191 Сообщений:
  • Использование программы procdump для создания дампов:

    0) procdump -ma
    команда выполняется в следующих случаях:
    — завершение приложения с показом окна ошибки. Команду необходимо выполнить до закрытия окна с сообщением об ошибке
    — ложное срабатывание защиты от эксплоитов. В этом случае необходимо переключить в интерактивный режим и выполнить команду при возникновении запроса на действие с процессом
    — зависание или аномалии в ходе исполнения процесса (например, повышенное использование ресурсов CPU или диска). Команду необходимо выполнить при воспроизведении.

    1) procdump -e -ma

    команда ввозится до воспроизведения, но после запуска процесса, procdump снимет дамп процесса с указанных PID при возникновении необработанного исключения

    2) procdump -t -ma

    команда ввозится до воспроизведения, но после запуска процесса, procdump снимет дамп процесса с указанным PID при получении события process terminated

    3) procdump -w -e -ma

    команда вводится ДО воспроизведения и ДО запуска провесса, procdump будет ожидать появления процесса c указанным именем и снимет дамп при возникновении необработанного исключения

    4) procdump -w -t -ma

    команда вводится ДО воспроизведения и ДО запуска провесса, procdump будет ожидать появления процесса c указанным именем и снимет дамп при получении события process terminated

    5) аргументы -t и -e можно комбинировать (в этом случае дамп снимется при возникновении необработанного исключения ИЛИ при получении события process terminated).

    6) procdump -i -ma

    устанавливает procdump в качестве postmortem дебаггера, т.е. прокдамп будет пытаться снимать полный дамп памяти любого процесса, который упал

    Примечание:
    Если процессов с одинаковым именем несколько, то нужно использовать PID, а не имя процесса.

    Сообщение было изменено VVS: 09 Июнь 2016 — 17:11


    меня вот что возмутило. что даже не начинают толком диалог сразу дампы. © alehas777

    Deleting memory dump files and system error reporting files

    Original Title: deleting files

    what are memory dump files & system error reporting files? should I delete them to clean up my disk?

    Replies (3) 

    Memory Dump files:

    A memory dump records all the contents of system memory when your computer stops unexpectedly. A complete memory dump may contain data from processes that were running when the memory dump was collected.

    You can refer to the below link for details on Memory Dump Files:

    Overview of memory dump file options for Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7 and Windows Server 2008 R2

    System Error Reporting Files:

    Windows Error Reporting in Windows 7 is a feature that allows Microsoft to track and address errors relating to the operating system, Windows features, and applications. Windows Error Reporting gives users the opportunity to send data about errors to Microsoft and to receive information about solutions. Solution information can include instructions for working around a problem, or a link to the Windows Update Web site or another Web site for updated drivers, patches, or Microsoft Knowledge Base articles. Microsoft developers can use Windows Error Reporting as a problem-solving tool to address customer problems in a timely manner and to improve the quality of Microsoft products.

    If you want to free some space on your computer, you can delete these files. Refer the below link on how to delete files using Disk cleanup:

    Windows error reporting dump file

    This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

    Answered by:

    Question

    I need to configure Windows server 2016 WER or a memory dump for a specific application / executable (*.exe). The applications runs as a service and fails unexpected some times and we want to gather and analyze a memory dump and / or WER information.

    We don’t want to configure a default memory dump only for that singele application.

    Thank you in advance for your help

    Answers

    Thanks for your replying.

    Have you gone through the link that I provided? It explains clearly. WER do can capture a dump for a specific application.

    You can also provide per-application settings that override the global settings. To create a per-application setting, create a new key for your application under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps (for example, HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\MyApplication.exe ). Add your dump settings under the MyApplication.exe key. If your application crashes, WER will first read the global settings, and then will override any of the settings with your application-specific settings.

    As for the memory dump, it is usually used for the situation like blue screen, system hang.

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Edited by cora Zhou Microsoft contingent staff Tuesday, January 15, 2019 6:04 AM
    • Marked as answer by Stephan-L Wednesday, January 16, 2019 10:11 AM

    All replies

    A full memory dump is going to capture the contents of the memory on the system, not just the memory of a particular application. By default, Windows is not generally configured to take a full memory dump because it is rarely needed. https://support.microsoft.com/en-us/help/254649/overview-of-memory-dump-file-options-for-windows provides an overview of memory dumps. Once the dump is captured, you can read the dump to see the information for any application that is using memory.

    As to WER, is the application written to write to the event log? If not, you need to talk to the developers to make it write to the event log. That is something that is handled by the application, unless the application does something the operating system does not like, such as reference memory outside its space, in which case it will be reported. But if it is a well-behaved application, but it has not been coded to write to the event log, there is nothing that can be done externally to make it write to the event log. That requires the developers.

    Служба Windows Error Reporting и очистка каталога WER\ReportQueue в Windows

    Служба WER (Windows Error Reporting) служит для сбора и отправки отладочной информации о падении системных и сторонних приложений в Windows на сервера Microsoft. По задумке Microsoft, эта информация должна анализироваться и при наличии решения, вариант исправления проблемы должен отправляется пользователю через Windows Error Reporting Response. Но по факту мало кто пользуется этим функционалом, хотя Microsoft настойчиво оставляет службу сбора ошибок WER включенной по умолчанию во всех последних версиях Windows. В большинстве случае о службе WER вспоминают, когда каталог C:\ProgramData\Microsoft\Windows\WER\ReportQueue\ начинает занимать на системном диске довольно много места (вплоть до нескольких десятков Гб), даже не смотря на то что на этом каталоге по умолчанию включена NTFS компрессия.

    Служба Windows Error Reporting

    Служба Windows Error Reporting представляет собой отдельный сервис Windows, который можно легко отключить командой:

    net stop WerSvc

    Внутри каталога WER\ReportQueue\ содержится множество каталогов, с именами в формате:

    • Critical_6.3.9600.18384__00000000_cab_3222bf78
    • Critical_powershell.exe__cab_271e13c0
    • Critical_sqlservr.exe___cab_b3a19651
    • NonCritical_7.9.9600.18235___0bfcb07a
    • AppCrash_cmd.exe__bda769bf_37d3b403

    Как вы видите, имя каталога содержит степень критичности события и имя конкретного exe файла, который завершился аварийно. Во всех каталогах обязательно имеется файл Report.wer, который содержит описание ошибок и несколько файлов с дополнительной информацией.

    Очистка папки WER\ReportQueue в Windows

    Как правило, размер каждой папки незначителен, но в некоторых случаях для проблемного процесса генерируется дамп памяти, который занимает довольно много места. На скриншоте ниже видно, что размер файла дампа memory.hdmp составляет около 610 Мб. Парочка таким дампов – и на диске исчезло несколько свободных гигибайт.

    Чтобы очистить все эти ошибки и журналы штатными средствами, откройте панель управления и перейдите в раздел ControlPanel -> System and Security -> Action Center -> Maintenance -> View reliability history -> View all problem reports и нажмите на кнопку Clear all problem reports.

    Для быстрого освобождения места на диске от файлов отладки, сгенерированных службой WER, содержимое следующих каталогов можно безболезненно удалить и руками.

    Отключение Window Error Reporting в Windows Server 2012 R2 / 2008 R2

    Отключить запись информации об ошибках Windows Error Reporting в серверных редакция Windows можно следующим образом:

    • Windows Server 2012 / R2 – Панель Управления -> System and Security -> Action Center -> раздел Maintenance -> Settings -> выберите опцию I don’t want to participate, and don’t ask me again
    • Windows Server 2008 R2 – откройте консоль Server Manager и промотайте список, перейдя в раздел Resources and Support. Нажмите на Turn Off Windows Error Reporting и выберите пункт I don’t want to participate, and don’t ask me again.

    Отключение функции сбора и отправки отчетов в Windows 10

    В Windows 10 возможность отключить Error Reporting через GUI отсутствует. Проверить статус компонента можно в панели управления Система и безопасность ->Центр безопасности и обслуживания -> секция Обслуживание. Как вы видите, по умолчанию параметр Поиск решения для указанных в отчетах проблем включен (Control Panel -> System and Security -> Security and Maintenance -> Maintenance -> Check for solutions to problem reports).

    Отключить Windows Error Reporting в Windows 10 можно через реестр. Для этого в ветке HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting нужно создать новый параметр типа DWORD (32 бита) с именем Disabled и значением 1.

    Теперь еще раз проверим статус параметра Поиск решения для указанных в отчетах проблем в панели управления. Его статус должен изменится на Отключено.

    Отключение Windows Error Reporting через групповые политики

    Ведение журналов службой Windows Error Reporting можно отключить и через групповую политику. Она находится в разделе Computer Configuration/Administrative Templates/Windows Components/Windows Error Reporting (Компоненты Windows -> Отчеты об ошибках Windows). Для отключения сбора и отправки данных включите политику Disable Windows Error Reporting (Отключить отчеты об ошибках Windows).

    В результате сообщения об ошибках приложений в Windows перестанут формироваться и автоматически отправляться в Microsoft.

    Читайте также:  Ассистент bootcamp не видит установочный диск windows 10
    Оцените статью