john-peterson / windows

0 stars 0 forks source link

No minidump saved #4

Open john-peterson opened 10 years ago

john-peterson commented 10 years ago

Question

How do I change the Windows described in this question to save a minidump in %SystemRoot%\Minidump when a BugCheck occur?

Problem

Windows don't save a minidump in %SystemRoot%\Minidump when a BugCheck occur

This is a problem because

The recoveros settings are correct

wmic recoveros list /format:list && wmic recoveros get debuginfotype,minidumpdirectory /format:list
AutoReboot=TRUE
WriteDebugInfo=TRUE
WriteToSystemLog=TRUE
DebugInfoType=3
MiniDumpDirectory=%SystemRoot%\Minidump

It doesn't matter if auto reboot is disabled

wmic recoveros set autoreboot=false

BugCheck code

There's no indication that the BugCheck code matters. I.o.w. that a minidump is saved for some BugCheck codes because

An example of a BugCheck name that isn't saved is

PROCESS_HAS_LOCKED_PAGES
no BugCheck name (i.o.w. the "BugCheck name" row in the topic "BugCheck display" isn't written)

BugCheck display

The BugCheck display the same message as when a minidump event (1001) is saved

A problem has been detected and Windows has been shutdown to prevent damage to your computer.

BugCheck name (this row is sometimes not displayed)

General information

Technical information:

*** STOP: BugCheck code (arguments)

*** driver where BugCheck was called

Collecting data for crash dump ...
Initializing disk for crash dump ...
Physical memory dump complete.
Contact your system administrator or technical support group for further assistance.

wevtutil

When a BugCheck occur

Windows don't save a minidump event (1001)

wevtutil qe system /q:*[System[EventID=1001]] /rd:true /f:text /c:1

Windows save the other BugCheck events

wevtutil qe system /q:*[System[EventID=41]] /rd:true /f:text /c:1
  Date: 2013-01-29T19:15:42.198
The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.

wevtutil qe system /q:*[System[EventID=6008]] /rd:true /f:text /c:1
  Date: 2013-01-29T19:15:47.000
The previous system shutdown at 7:14:47 PM on ‎1/‎29/‎2013 was unexpected.

wevtutil qe system /q:*[System[EventID=1076]] /rd:true /f:text /c:1
  Date: 2013-01-29T19:16:49.000
The reason supplied by user PC\User for the last unexpected shutdown of this computer is: System Failure: Stop error
 Reason Code: 0x805000f
 Problem ID:
 Bugcheck String:
 Comment:

werfault

Windows don't display this werfault dialog when starting after a BugCheck

Windows has recovered from an unexpected shutdown

Windows can check online for a solution to the problem.

minidumpscount

minidumpscount is more than 0 (and, if it matters, higher than the number of minidumps)

reg query hklm\system\currentcontrolset\control\crashcontrol /v minidumpscount
    minidumpscount    REG_DWORD    0x3e7

dir %systemroot%\minidump | tail -2
              35 File(s)      9▒917▒969 bytes

pagefileset

The adequate pagefileset size for saving a minidump isn't known. It could be this size

wmic pagefileset list /format:list
InitialSize=1000
MaximumSize=1000

These sizes have been tried without solving the problem

wmic pagefileset where name="c:\\pagefile.sys" set initialsize=2000,maximumsize=2000
wmic pagefileset where name="c:\\pagefile.sys" set initialsize=3000,maximumsize=3000
wmic pagefileset where name="c:\\pagefile.sys" set initialsize=4000,maximumsize=4000
wmic computersystem where name="%computername%" set automaticmanagedpagefile=true

Disk space

The available c: disk space for

wmic computersystem where name="%computername%" set automaticmanagedpagefile=true

is

fsutil volume diskfree c:
Total # of free bytes        : 19957088256
Total # of bytes             : 119926681600
Total # of avail free bytes  : 19957088256

attrib

The minidump folder isn't read-only (i.o.w. allow a BugCheck to save a minidump)

attrib %SystemRoot%\Minidump
        I    C:\Windows\Minidump

icacls

The minidump folder security is correct (i.o.w. allow a BugCheck to save a minidump)

icacls %SystemRoot%\Minidump
C:\Windows\Minidump BUILTIN\Administrators:(OI)(CI)(F)
                    NT AUTHORITY\SYSTEM:(OI)(CI)(F)

Successfully processed 1 files; Failed processing 0 files

rmdir

The minidump folder is deleted because

rmdir /s /q %SystemRoot%\Minidump

However, a BugCheck don't create a folder with the name %SystemRoot%\Minidump. But creating the minidump folder manually with the mkdir command below don't cause a BugCheck to save a minidump

mkdir %SystemRoot%\Minidump

System

Speccy output

Operating System
    Windows 7 Ultimate 64-bit SP1
CPU
    Intel Core i7 3770K @ 3.50GHz   49 °C
    Ivy Bridge 22nm Technology
RAM
    32,0GB Dual-Channel DDR3 @ 668MHz (9-9-9-24)
Motherboard
    ASUSTeK COMPUTER INC. P8Z77-M PRO (LGA1155) 36 °C
Graphics
    DELL U2312HM (1920x1080@60Hz)
    BenQG2222HDL (1920x1080@60Hz)
    Intel HD Graphics 4000 (ASUStek Computer Inc)
    1024MB ATI AMD Radeon HD 6800 Series (XFX Pine Group)   79 °C
Hard Drives
    112GB OCZ-VERTEX2 ATA Device (SSD)  30 °C
Optical Drives
    QBCNK MRSHA3S5 SCSI CdRom Device
Audio
    Corsair Vengeance 2000 Headset

Last minidump

The last 41 event for which there's a minidump is

wevtutil qe system /q:*[System[EventID=41]] /rd:true /f:text /c:6
Event[5]:
  Date: 2012-12-03T06:21:37.590

dir %systemroot%\minidump /o:-d | head -8 | tail -1
2012-12-03  06:21           322▒616 120312-37830-01.dmp
john-peterson commented 10 years ago

Answer

The solution that's applied to the test system is

change pagefile.sys size to ≥ RAM size

wmic computersystem where name="%computername%" set automaticmanagedpagefile=true

wmic pagefile list /format:list
AllocatedBaseSize=32635
CurrentUsage=0
PeakUsage=0

dir /ah c:\pagefile.sys
2013-10-06  14:29    34 220 941 312 pagefile.sys

i.o.w. larger than the largest tested size in the question

wmic pagefileset where name="c:\\pagefile.sys" set initialsize=4000,maximumsize=4000

not counting the question setting

wmic computersystem where name="%computername%" set automaticmanagedpagefile=true

because it's not known which pagefile.sys size this is because the test system pagefile.sys size between 2012-12-03 and 2013-10-06 (or another time) isn't recorded

Last minidump

This solution cause BugCheck to create a minidump

dir %systemroot%\minidump /o:-d | head -9 | tail -2
2013-10-06  14:29           324▒949 100613-14570-01.dmp
2012-12-03  07:21           322▒616 120312-37830-01.dmp

Disk space

This solution require changing the free c: disk space to ≥ RAM size

fsutil volume diskfree c:
Total # of free bytes        : 82576859136
Total # of bytes             : 249844199424
Total # of avail free bytes  : 82576859136

System

The system (Speccy output) difference compared to the topic "System" in the question is

Hard Drives
    233GB Samsung SSD 840 EVO 250GB ATA Device (SSD)    34 °C

Uncertainty

The uncertainty in this solution is

it's not known where between 4 GB, the largest tested (in the topic "pagefileset" in the question) pagefile.sys with the problem

wmic pagefileset where name="c:\\pagefile.sys" set initialsize=4000,maximumsize=4000

and 32 GB, the smallest tested pagefile.sys without the problem

wmic computersystem where name="%computername%" set automaticmanagedpagefile=true

the pagefile.sys size should be because a size between these sizes isn't tested in the system that has this problem because

Unsolved problem

These problems remain unsolved even after applying the solution described in the topic "Answer"

Minimum pagefile.sys for minidump isn't described

Microsoft hasn't described clearly the minimum pagefile.sys size for which Windows save a minidump when RAM is 32 GB

Misleading BugCheck screen message

Microsoft mislead the user by writing "Physical memory dump complete." in the BugCheck screen also when a minidump isn't saved

Samsung Magician recommendation don't indicate that it cause Windows to not save a minidump

Samsung don't indicate that the pagefile.sys size recommendation in "SYSTEM MANAGEMENT > OS Optimization" in Samsung Magician 4.2.1 cause a BugCheck to not save a minidump

The Samsung Magician 4.2.1 "SYSTEM MANAGEMENT > OS Optimization" recommendation is

Maximum Capacity and Maximum Reliability

Virtual Memory

Virtual memory will be set to an initial size of 200 MB and a maximum of 1 GB.

Advanced

Manually set virtual memory in Windows Performance Options. If your PC has more than 4 GB of RAM, Samsung recommends you initially set virtual memory to 200 MB with a maximum of 2 GB. Use the shortcut to the right to adjsut settings.

i.o.w. the "Advanced" recommendation is

wmic pagefileset where name="c:\\pagefile.sys" set initialsize=200,maximumsize=2000

Recommendation

Describe minimum pagefile.sys size

Microsoft should describe the minimum c:\pagefile.sys size for which BugCheck save a minidump because

Change Windows so that a BugCheck save a minidump when pagefile.sys is small

Microsoft should change Windows so that it save a minidump when c:\pagefile.sys is small (f.e. 0,2 GB) because