BSOD on system shutdown

Started by Simon

Simon

BSOD on system shutdown   11 November 2015, 21:42

Hello,

I've recently installed RAM Disk v3.4.7 on Windows 7 x64.
I just had a BSOD while shutting down. I'd had a RAM Disk mounted, and had unmounted and deleted it a few minutes before shutting down. I was restarting to install Windows Updates.

Here's the stackdump:
fffff880`0d561ce8 fffff800`0346fbfe : 00000000`000007ff 00000000`00000770 fffff880`0d561dc0 fffff800`034cf02d : nt!KeBugCheck
fffff880`0d561cf0 fffff800`034a2e8d : fffff800`0368a3c4 fffff800`035cbcc4 fffff800`03404000 fffff880`0d562c08 : nt!KiKernelCalloutExceptionHandler+0xe
fffff880`0d561d20 fffff800`034a1c65 : fffff800`035cbcbc fffff880`0d561d98 fffff880`0d562c08 fffff800`03404000 : nt!RtlpExecuteHandlerForException+0xd
fffff880`0d561d50 fffff800`034b2c41 : fffff880`0d562c08 fffff880`0d562460 fffff880`00000000 00000000`00000000 : nt!RtlDispatchException+0x415
fffff880`0d562430 fffff800`03477882 : fffff880`0d562c08 fffffa80`551faa80 fffff880`0d562cb0 00000000`00008000 : nt!KiDispatchException+0x135
fffff880`0d562ad0 fffff800`03475074 : 00000000`00000001 fffffa80`00000000 fffff880`0d562da8 00000000`00000000 : nt!KiExceptionDispatch+0xc2
fffff880`0d562cb0 fffff880`011bba64 : fffff880`01616de0 00000000`00000000 00000000`00000000 fffffa80`a519a140 : nt!KiDivideErrorFault+0xf4
fffff880`0d562e40 fffff880`01616ddf : 00000000`00000000 00000000`00000000 fffffa80`a519a140 fffffa80`a519a140 : spvve+0x5a64
fffff880`0d562e48 fffffa80`4aa57e20 : fffff880`00eaedac fffff880`01616de0 00000000`167d0000 fffff880`0ce94ed8 : Ntfs!NtfsMasterIrpSyncCompletionRoutine+0x4f
fffff880`0d562e78 fffff880`00eaedac : fffff880`01616de0 00000000`167d0000 fffff880`0ce94ed8 fffffa80`53a35a30 : 0xfffffa80`4aa57e20
fffff880`0d562e80 fffffa80`551faa80 : fffff880`04bab000 00000000`0002a000 fffffa80`53a35a30 fffffa80`53a35a00 : partmgr!PmPassThrough+0x7c
fffff880`0d562ec0 fffff880`04bab000 : 00000000`0002a000 fffffa80`53a35a30 fffffa80`53a35a00 fffffa80`53a35a00 : 0xfffffa80`551faa80
fffff880`0d562ec8 00000000`0002a000 : fffffa80`53a35a30 fffffa80`53a35a00 fffffa80`53a35a00 fffff880`011bec61 : 0xfffff880`04bab000
fffff880`0d562ed0 fffffa80`53a35a30 : fffffa80`53a35a00 fffffa80`53a35a00 fffff880`011bec61 fffffa80`551faa80 : 0x2a000
fffff880`0d562ed8 fffffa80`53a35a00 : fffffa80`53a35a00 fffff880`011bec61 fffffa80`551faa80 fffffa80`5359bb50 : 0xfffffa80`53a35a30
fffff880`0d562ee0 fffffa80`53a35a00 : fffff880`011bec61 fffffa80`551faa80 fffffa80`5359bb50 00000000`00008000 : 0xfffffa80`53a35a00
fffff880`0d562ee8 fffff880`011bec61 : fffffa80`551faa80 fffffa80`5359bb50 00000000`00008000 00000000`00000000 : 0xfffffa80`53a35a00
fffff880`0d562ef0 fffffa80`551faa80 : fffffa80`5359bb50 00000000`00008000 00000000`00000000 fffffa80`551faa80 : spvve+0x8c61
fffff880`0d562ef8 fffffa80`5359bb50 : 00000000`00008000 00000000`00000000 fffffa80`551faa80 fffffa80`53a35a30 : 0xfffffa80`551faa80
fffff880`0d562f00 00000000`00008000 : 00000000`00000000 fffffa80`551faa80 fffffa80`53a35a30 fffff880`0ce94da0 : 0xfffffa80`5359bb50
fffff880`0d562f08 00000000`00000000 : fffffa80`551faa80 fffffa80`53a35a30 fffff880`0ce94da0 fffff880`01616df6 : 0x8000

And the exception record:
EXCEPTION_RECORD: fffff8800d562c08 -- (.exr 0xfffff8800d562c08)
ExceptionAddress: fffff880011bba64 (spvve+0x0000000000005a64)
ExceptionCode: c0000094 (Integer divide-by-zero)
ExceptionFlags: 00000000
NumberParameters: 0

Seems like a bug in the driver, in the function at spvve+0x5A20 (0x180005A20). The instruction at spvve+0x5A64 is indeed a div:
.text:0000000180005A64 48 F7 F7 div rdi

In addition, I was not using hard disk emulation mode, nor was I using an image file.
SoftPerfect Support forum - Andrew avatar image

Re: BSOD on system shutdown   12 November 2015, 19:47

Indeed looks like a bug. Thank you for the detailed tech info, I'll check where it happens and let you know shortly.
Simon

Re: BSOD on system shutdown   12 November 2015, 21:30

Thanks, Andrew!
SoftPerfect Support forum - Andrew avatar image

Re: BSOD on system shutdown   15 November 2015, 22:44

I have analysed where the exception occurred, but I am afraid it's unclear why. The div instruction above is only executed when we are reading an image file and need to find out how many whole sectors are to be read. In this case the sector size somehow was zero, which led to the exception, while this code shouldn't execute at all without image files.

I guess this may have something to do with installing the Windows Updates and it's not likely this bug will appear again.
Simon

Re: BSOD on system shutdown   16 November 2015, 02:27

Thanks for the response!

I should have mentioned in my first post that I forced the dismount of the drive (RAM Disk claimed that it was still in use by something).

Perhaps some object was deleted and the memory freed, and Windows still had an outstanding request holding a pointer to the object? If this happened and the memory was reallocated for use by something else, and if there's some flag set when an image file is in use (or not) then the flag could have been set and the sector size set to zero by coincidence.

I'll let you know if it happens again.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

  *******   **     **  **      **  ********  ******** 
 **     **   **   **   **  **  **  **        **       
 **     **    ** **    **  **  **  **        **       
  ********     ***     **  **  **  ******    ******   
        **    ** **    **  **  **  **        **       
 **     **   **   **   **  **  **  **        **       
  *******   **     **   ***  ***   ********  ******** 

Message: