Generating a memory dump for a crashing process

H2SO4

A bit of a numpty
Guru
Local time
3:27 AM
Messages
1,377
Summary:

When faced with a crashing process or application, the following procedure is one way to obtain useful information regarding the specifics of the crash, and hence the likely cause:

1) Download and install either the 32-bit or the 64-bit "Debugging Tools" package, depending on your OS type: Debugging Tools for Windows - Overview

2) Open a CMD prompt and CD to the folder where you installed the debugging tools.

3) Run this command after substituting the real executable name for <ProcessName> in the example:

cscript adplus.vbs -crash -nodumponfirst -minionsecond -quiet -pn <ProcessName>.exe

4) Reproduce the application/process crash.

5) Find the new folder in that same location with a DMP (memory dump) file.

In that dump folder you should find 2 DMP files:

a) A massive one (hundreds of MB) with "1st_chance" as part of its name.
b) A much smaller one (few MB at most) with "2nd_chance" in the name.

It's (b) that is of primary interest. Zipped up, that file may only be a few hundred KB in size - small enough to upload here.



=================================

Background Information:

Unlike a BSOD, a crash in a non-critical process does not normally affect the rest of the operating system (OS). Instead, once the OS notices that the process has attempted to do something undesirable or impossible, such as accessing memory which does not belong to it or attempting to divide by zero due to programming bugs, the offending process is shut down to prevent further damage.

To the user, this looks like an application crash, although in more recent versions of Windows the wording in the user interface has been softened to refer to an application as having "stopped working". The event logs will frequently record some summary information about the crash conditions, but unless a 3rd-party module (usually a DLL) is specifically fingered by the event description, it is difficult to proceed based on the event information alone.

By attaching a debugger to the process using the steps above, a crash can be "recorded" in the sense that a memory dump is produced which contains far more information than the textual event description. Analysis of the memory dump using techniques similar to those employed during BSOD troubleshooting can frequently pinpoint the cause of the application crash.
 
Last edited:

My Computer

Computer Manufacturer/Model Number
Multiple machines in various stages of decomposition.
OS
Win7x64
What if I don't know the process name?

I'm getting blue screens and shut-downs and I 'believe' it has to do with CPU temps but I can't prove it. I followed the previous 2min drill and set up windbg and the symbol path.

I kinda follow the rest of the debugging info but how do I figure out what process to attach 'to'? I currently only have one gig of RAM so the blue screen pretty much just flashes by and when the machine doesn't blue screen it just shuts down and the screen goes black.

I've looked at more logs in the past week than I knew existed. I would appreciate any help you can give me.

I'm running an EliteGroup (ECS) GeForce 7050M-M motherboard and an AMD Phenom 9950 Quad-Core Processor. As I said I currently only have one gig of Ram, more after the first of the year.

What other info could I provide that would help?

Thanks in advance.

J. R.
 

My Computer

Computer Manufacturer/Model Number
ECS
OS
WIN 7
CPU
AMD Phenom 9950 Quad-Core
Motherboard
GeForce7050M-M
Memory
1 Gig DDR2 (PC2-6400)
Graphics Card(s)
NVIDIA Quadro MVS 285 (64Mb mem)
Sound Card
On board
Monitor(s) Displays
Dell 2407WFP
Hard Drives
C = 1 Tb
D = 160 Gb
Navigate to C:/windows/minidump and zip up the .dmp file and attach it to your next post for analysis...
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
LENOVO K450 @3.0GHZ
OS
64-bit Windows 8.1 Pro
CPU
Core(TM) i5 CPU 4330 Haswell @ 3.20GHz
Motherboard
LENOVO
Memory
12.00 GB
Graphics Card(s)
Intel(R) HD Graphics
Sound Card
Intel HD integtrated
Monitor(s) Displays
HP 25' ISP Monitor
Screen Resolution
1900/1020
Hard Drives
(1) ST1000DM003-1CH162 (2) Generic STORAGE DEVICE USB Device (3) Generic STORAGE DEVICE USB Device
Internet Speed
100mb down/10mb up
Dump problems

Sorry, I should have mentioned that. The 'minidump' folder is empty. I also looked for the 'memory.dmp' file but it isn't on the drive.

Do I need to set something in 7 to ensure that the .dmp files are generated?

J. R.
 

My Computer

Computer Manufacturer/Model Number
ECS
OS
WIN 7
CPU
AMD Phenom 9950 Quad-Core
Motherboard
GeForce7050M-M
Memory
1 Gig DDR2 (PC2-6400)
Graphics Card(s)
NVIDIA Quadro MVS 285 (64Mb mem)
Sound Card
On board
Monitor(s) Displays
Dell 2407WFP
Hard Drives
C = 1 Tb
D = 160 Gb
  1. Click Start, point to Settings, and then click Control Panel.
  2. Double-click System.
  3. Click the Advanced tab, and then click Settings under Startup and Recovery.
  4. In the Write debugging information list, click Small memory dump (64k).
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
LENOVO K450 @3.0GHZ
OS
64-bit Windows 8.1 Pro
CPU
Core(TM) i5 CPU 4330 Haswell @ 3.20GHz
Motherboard
LENOVO
Memory
12.00 GB
Graphics Card(s)
Intel(R) HD Graphics
Sound Card
Intel HD integtrated
Monitor(s) Displays
HP 25' ISP Monitor
Screen Resolution
1900/1020
Hard Drives
(1) ST1000DM003-1CH162 (2) Generic STORAGE DEVICE USB Device (3) Generic STORAGE DEVICE USB Device
Internet Speed
100mb down/10mb up
Dump Problems

Thanks Tews:

Well, I've got it all setup as you instructed. Last night after I created the settings, I decided to call it a night. About fifteen minutes later, with the machine sitting idle and the three cores running at 1% or less, with memory usage at approximately 55% and CPU temps around 94 F, the system randomly shut down again. No blue screen, just 'click' and shut down to power off and black screen.
After waiting for a short time, I rebooted and checked the 'windows/minidump' folder, it is empty.

At this time I think I'm going to start working my way through the system restore point list, as suggested a while back. I've been creating a restore point before I install anything, regardless how trivial. I've also got a system image of the system when it was running fine.

All it will cost me is time. I can use my other XP Pro SP3 system just as I have been all along. There is another thing I forgot to mention, my Win7 machine is a clean install on new hardware.

As soon as I get anymore info, I'll get back to you. Many thanks for your patience and help.

One last question, what memory checker would you recommend I use to check my RAM? Do I need a 64bit tool or?

I'll be back, :D

J. R.
 

My Computer

Computer Manufacturer/Model Number
ECS
OS
WIN 7
CPU
AMD Phenom 9950 Quad-Core
Motherboard
GeForce7050M-M
Memory
1 Gig DDR2 (PC2-6400)
Graphics Card(s)
NVIDIA Quadro MVS 285 (64Mb mem)
Sound Card
On board
Monitor(s) Displays
Dell 2407WFP
Hard Drives
C = 1 Tb
D = 160 Gb
Use Memtest86 to check your RAM ... get it -=> here
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
LENOVO K450 @3.0GHZ
OS
64-bit Windows 8.1 Pro
CPU
Core(TM) i5 CPU 4330 Haswell @ 3.20GHz
Motherboard
LENOVO
Memory
12.00 GB
Graphics Card(s)
Intel(R) HD Graphics
Sound Card
Intel HD integtrated
Monitor(s) Displays
HP 25' ISP Monitor
Screen Resolution
1900/1020
Hard Drives
(1) ST1000DM003-1CH162 (2) Generic STORAGE DEVICE USB Device (3) Generic STORAGE DEVICE USB Device
Internet Speed
100mb down/10mb up
Holy necromancy Batman!!
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
LENOVO K450 @3.0GHZ
OS
64-bit Windows 8.1 Pro
CPU
Core(TM) i5 CPU 4330 Haswell @ 3.20GHz
Motherboard
LENOVO
Memory
12.00 GB
Graphics Card(s)
Intel(R) HD Graphics
Sound Card
Intel HD integtrated
Monitor(s) Displays
HP 25' ISP Monitor
Screen Resolution
1900/1020
Hard Drives
(1) ST1000DM003-1CH162 (2) Generic STORAGE DEVICE USB Device (3) Generic STORAGE DEVICE USB Device
Internet Speed
100mb down/10mb up
ProcDump from Sysinternals:

ProcDump is a command-line utility whose primary purpose is monitoring an application for CPU spikes and generating crash dumps during a spike that an administrator or developer can use to determine the cause of the spike. ProcDump also includes hung window monitoring (using the same definition of a window hang that Windows and Task Manager use) and unhandled exception monitoring. It also can serve as a general process dump utility that you can embed in other scripts.


More Info : ProcDump
 

My Computer

Computer Manufacturer/Model Number
Samsung NP550P5C-S02IN
OS
Windows 7 Ultimate - 64-bit | Windows 8 Pro - 64-bit
CPU
Intel® Core™ i7 Processor 3,610QM (2.30Hz, 6MB L3 Cach
Memory
8 GB
Graphics Card(s)
NVIDIA® GeForce® GT 650M 2GB Graphics, Optimus™ techno
Sound Card
SoundAlive™ JBL 3 Speakers (With sub-Woofer)
Monitor(s) Displays
39.62cm (15.6) SuperBright 300nit HD+ LED Display
Screen Resolution
1,600 x 900, Anti-Reflective
Hard Drives
1TB S-ATA II Hard Drive (5,400RPM)
never mind, i figured that part out. now im confused by "3) Run this command after substituting the real executable name for <ProcessName> in the example:

cscript adplus.vbs -crash -nodumponfirst -minionsecond -quiet -pn <ProcessName>.exe"


what am i supposed to replace process name with?
 

My Computer

Computer Manufacturer/Model Number
EVGA 01G-P3-1465-AR GeForce GTX 465 (Fermi) 1GB 256-bit GDDR5 PCI Express 2.0 x16 HDCP Ready SLI Sup
OS
Windows 7 Ultimate
CPU
Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz
Motherboard
EVGA 750i SLI
Memory
CORSAIR XMS2 4GB (2 x 2GB) 240-Pin DDR2 SDRAM DDR2 1066 (PC2
Graphics Card(s)
NVIDIA GeForce 9600 GT
Hard Drives
Western Digital Caviar Black WD5001AALS 500GB 7200 RPM 32MB Cache SATA 3.0Gb/s 3.5" Internal Hard Drive
PSU
CORSAIR CMPSU-650TX 650W ATX12V / EPS12V
Case
cooler master haf 922
Cooling
Air
Mouse
Razor NAGA
im confused, "2) Open a CMD prompt and CD to the folder where you installed the debugging tools." how do you "CD to the folder"

CD is "Change Directory"

From Command Prompt you have to navigate to that location.

cd\
cd Program File\Debugging Tools for Windows (x86)\ and Hit Enter

Hope this helps,
Captain
 

My Computer

Computer Manufacturer/Model Number
Samsung NP550P5C-S02IN
OS
Windows 7 Ultimate - 64-bit | Windows 8 Pro - 64-bit
CPU
Intel® Core™ i7 Processor 3,610QM (2.30Hz, 6MB L3 Cach
Memory
8 GB
Graphics Card(s)
NVIDIA® GeForce® GT 650M 2GB Graphics, Optimus™ techno
Sound Card
SoundAlive™ JBL 3 Speakers (With sub-Woofer)
Monitor(s) Displays
39.62cm (15.6) SuperBright 300nit HD+ LED Display
Screen Resolution
1,600 x 900, Anti-Reflective
Hard Drives
1TB S-ATA II Hard Drive (5,400RPM)
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

Collecting User-Mode Dumps (Windows)
 

My Computer

Computer Manufacturer/Model Number
Samsung NP550P5C-S02IN
OS
Windows 7 Ultimate - 64-bit | Windows 8 Pro - 64-bit
CPU
Intel® Core™ i7 Processor 3,610QM (2.30Hz, 6MB L3 Cach
Memory
8 GB
Graphics Card(s)
NVIDIA® GeForce® GT 650M 2GB Graphics, Optimus™ techno
Sound Card
SoundAlive™ JBL 3 Speakers (With sub-Woofer)
Monitor(s) Displays
39.62cm (15.6) SuperBright 300nit HD+ LED Display
Screen Resolution
1,600 x 900, Anti-Reflective
Hard Drives
1TB S-ATA II Hard Drive (5,400RPM)

My Computer

Computer Manufacturer/Model Number
Home built (x64), Lenovo x61s Tablet, Samsung Netbook
OS
Win7 x64 + x86
CPU
Intel i7 920, other Intel chips, and the Atom in the netbook
Motherboard
Asus P6T Deluxe
Memory
12 gB; 4 gB Lenovo; 1 gB Samsung netbook
Graphics Card(s)
ATI 4870
Sound Card
Yes, I have one of these
Monitor(s) Displays
32" Sharp Aquos TV
Screen Resolution
800x600 - I have vision issues
Hard Drives
4 - 150 gB Velociraptors in RAID 5
Promise controller
PSU
1000 watt (can't recall the brand)
Case
Antec 300
Cooling
Big honking cooler that was rated highly at Toms Hardware
Keyboard
Microsoft Natural
Mouse
Logitech Trackman
Internet Speed
Cable
Other Info
GeekSquad UPS
CyberPower UPS
DLink DNS-323 NAS (2 tB)
Netgear wireless router as an access point
Netgear wired router FSV-318
Home network consists of
4 desktop computers (2 Vista, 2 Win7)
1 netbook (Win7)
4 laptop computers (XP, 2-Vista, Win7)
Wii and XBox 360
hi,

I have run the cscript adplus.vbs ... (actually I've only found and used the file adplus_old.vbs to my application that runs as python.exe and this openned 3 consoles (because there are 3 python.exe running).
Unluckely, running like this doesn't reproduce the crash because it makes my application to run a little slower.
Anyway, when I've restarted the system and run my application normally (without this cscript) it stopped working. I've already uninstalled and installed my app, what does this cscript did?
 
Last edited by a moderator:

My Computer

Computer type
PC/Desktop
OS
win 7
Back
Top