locked
Crash Dump RRS feed

  • Question

  • I've configured my oemcustomization.cmd like so, following the template, and adding some more settings.

    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl" /v CrashDumpEnabled /t REG_DWORD /d 0x1 /f

    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl" /v IgnorePageFileSize /t REG_DWORD /d 0x1 /f

    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl" /v DedicatedDumpFile /t REG_SZ /d C:\Data\DedicatedDumpFile.sys /f

    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl" /v DumpFile /t REG_SZ /d C:\Data\MEMORY.DMP /f

    I've verified C:\Data\DedicatedDumpFile.sys is being created and I've added a dereference null pointer in some c code that we are using. My application does crash, but Memory.dmp is never created. I can't copy DedicatedDumpFile.sys because it is in use by another process. Did I mess something up?

    10.0.16299.15

    Tuesday, March 13, 2018 3:48 PM

Answers

  • Hi matelich,

    For kernel mode dump file MEMORY.DMP, as per the crash dump retention polity, the OS will delete the MEMORY.DMP if a specific registry is not set, the solution is:

    1) Set below registry key value and reboot device.

    reg add HKLM\System\CurrentControlSet\Control\CrashControl /v AlwaysKeepMemoryDump /t REG_DWORD /d 1

    2) Once device crash and reboot, you can see MEMORY.DMP under C:\DATA

    Regarding crash dump retention policy, you can refer to following blog:

    https://blogs.msdn.microsoft.com/wer/2009/02/09/kernel-dump-storage-and-clean-up-behavior-in-windows-7

    But from your description, you added a dereference null pointer in app to make it crash, it should be a user mode dump file, and you can add the following key:

    reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps"

    Then crash the app, and the dump file will be generated in following location:

    C:\Data\Users\<<Your user account>>\AppData\Local\CrashDumps

    If you want to configure the setting for CrashDumps, you can refer to the following useful article:

    https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx

    Thanks,

    Jie


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, March 29, 2018 3:26 AM

All replies

  • Hi matelich,

    I am trying to involve someone familiar with this issue to further look.There might be some time delay. Appreciate your patience.

    Best Regards,

    Michael


    Thursday, March 15, 2018 6:07 AM
  • Hi matelich,

    For kernel mode dump file MEMORY.DMP, as per the crash dump retention polity, the OS will delete the MEMORY.DMP if a specific registry is not set, the solution is:

    1) Set below registry key value and reboot device.

    reg add HKLM\System\CurrentControlSet\Control\CrashControl /v AlwaysKeepMemoryDump /t REG_DWORD /d 1

    2) Once device crash and reboot, you can see MEMORY.DMP under C:\DATA

    Regarding crash dump retention policy, you can refer to following blog:

    https://blogs.msdn.microsoft.com/wer/2009/02/09/kernel-dump-storage-and-clean-up-behavior-in-windows-7

    But from your description, you added a dereference null pointer in app to make it crash, it should be a user mode dump file, and you can add the following key:

    reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps"

    Then crash the app, and the dump file will be generated in following location:

    C:\Data\Users\<<Your user account>>\AppData\Local\CrashDumps

    If you want to configure the setting for CrashDumps, you can refer to the following useful article:

    https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx

    Thanks,

    Jie


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, March 29, 2018 3:26 AM
  • Thank you, Jie. Sounds good, but I won't be able to test it for a while. Would be great if the sample FFU were updated to use these settings, e.g at https://github.com/ms-iot/iot-adk-addonkit/blob/6692da9755dc0fdaf09a5364569dde02a8c8ae70/Source-arm/Products/RecoverySample/oemcustomization.cmd#L34

    Monday, April 9, 2018 4:41 PM
  • Hi matelich,

    The preferred way is to open an issue or pull request at https://github.com/ms-iot/iot-adk-addonkit/issues, and you've already done that https://github.com/ms-iot/iot-adk-addonkit/issues/211 which is good.

    If you have any issue, feel free to open threads in this forum. 

    Thanks,

    Jie


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 10, 2018 5:52 AM
  • Hi all,

    Although I enabled Full Dumps, when I try to debug in VisualStudio only Debug Native option works. I believe it really is a full dump by following: file size greater than mini dump, Debug Manage and Debug Mixed options are available in Visual Studio (as opposed to just Debug Native for the mini dump).

    My app is a background task.

    I enabled dumps to debug a problem documented here: https://github.com/dotnet/corefx/issues/33231

    I followed steps here:  https://docs.microsoft.com/en-us/windows/desktop/wer/collecting-user-mode-dumps to enable Full Dumps 

    Any ideas?

     

    Saturday, November 3, 2018 7:19 PM
  • UPDATE: I found this:

    Visual Studio can also debug apps dump files of managed apps from ARM devices, but only in the native debugger."

    here: https://docs.microsoft.com/en-us/visualstudio/debugger/using-dump-files?view=vs-2017

    I will further investigate how can I do it.


    • Edited by Alex Iordan Monday, November 5, 2018 1:49 PM
    Monday, November 5, 2018 1:49 PM