none
BSOD when running Virtual PC XP Mode and a custom Windows Service application written in C++

    General discussion

  • When I run a Windows Service application written in C++ (Microsoft Visual Studio 2010) and a Virtual PC console on my desktop (Windows 7 Professional x64), the system crashes with a blue screen.

    The Windows Service monitors a folder for files and when new files are detected they get transferred to a web server using WinHTTP API.

    To watch for new files created into a folder I have used “WatchFolderFolderChangesW” Windows API function. This function is used asynchronously through IOCP. So I’m also using “CreateIOCompletionPort” function and “GetQueuedCompletionStatus”.

    Also, the Windows service creates a multithreaded environment and uses Concurrency Runtime provided with Visual Studio 2010.

    If this service is running, when I start Virtual PC I get a blue-screen. I can provide a memory dump file for further investigation.

    I have to mention that both Virtual PC, and the Windows service, when used individually, works perfectly. Only when they are running simultaneously blue-screen appears. The problem can be replicated.

    My computer has an Intel i5 CPU and 8 GB of RAM. It is a Dell OPTIPLEX 980 desktop computer.

    The blue-screen message says that "vpcvmm.sys" might be responsable for the crash.

    Thank you,
    Cosmin Petrenciuc
    Saturday, July 21, 2012 5:02 PM

All replies

  • Hi ,

    Thank you for your post.

    If the BSOD point to vpcvmm.sys, I suggest you to try this hotfix.

    http://support.microsoft.com/kb/977632

    Regarding this issue is related to development environment, you may post your question on MSDN Forums for discussion.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.


    Tracy Cai

    TechNet Community Support

    Monday, July 23, 2012 7:56 AM
    Moderator
  • Hello,

    Thank you for your reply, but my computer does not present any of the symptoms described in that KB article.

    Also, I never put my host computer in sleep state or hibernation.

    I will follow your recommendation and post my question on MSDN forums also.

    Thank you,

    Cosmin Petrenciuc


    Cosmin Petrenciuc

    Monday, July 23, 2012 8:23 AM
  • I have downloaded the recommended hotfix for Virtual PC and tried to install it. I could not do that. The installer says that this update is not applicable to my system.


    Cosmin Petrenciuc

    Monday, July 23, 2012 8:34 AM
  • I have asked the same question on MSDN Forums but forum administrator Elegentin Xie decided it is better if the question would remain only on this thread.

    Here is the e-mail I received from MSDN Forum when Elegentin Xie deteled my thread posted there:

    "Another user, Elegentin Xie, has replied to a thread you have subscribed to in the Visual C++ General Forum.

    Thread Title BSOD when running Virtual PC XP Mode and a custom Windows Service application written in C++
    Started by: Cosmin G. Petrenciuc

    Reply:

    Hi Cosmin,

    Welcome to the MSDN forum.

    Here you asked the same question:

    http://social.technet.microsoft.com/Forums/nb-NO/w7itprovirt/thread/001ab6ef-8509-44b9-8557-93de47a8791e

    I suggest you follow that thread and I will delete this redundant one, thanks for your understanding.

    Regards,

    Elegentin"


    Cosmin Petrenciuc

    Tuesday, July 24, 2012 6:27 AM
  • Hello Cosmin,

    First, please make sure that VPC is the only virtualization software on the same machine. This is because we do not support a scenario which involves running VPC and another virtualization software on the same machine including Hyper-V. The first client VM running gets the handle to VMM (e.g. the CPU registers) and when you try to run more than one VM solution on a given host, it will cause the system crash.

    Then if this is not the scenario you are experiencing, please send me the dump file via SkyDrive or other 3rd party tool for analysis.

    Thanks,

    Spencer


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Tuesday, July 24, 2012 8:29 AM
  • Hello Spencer,

    First of all thank you for your interest in my problem.

    I don’t have any other virtualization software installed on my machine. I have only Microsoft Virtual PC with only one machine (Windows XP Mode).

    I have uploaded the memory dumps at the following SkyDrive address https://skydrive.live.com/redir?resid=110C74F1BF80F2EB!136&authkey=!AK790_Kz0cvysiQ .

    Thank you.


    Cosmin Petrenciuc

    Tuesday, July 24, 2012 9:09 AM
  • Hello Cosmin,

    It seems that the issue was caused by vpcvmm.sys. You have SP1 installed so KB977632 cannot be applied because it has been included in SP1. Please apply KB2652034 for your machine to update the vpcvmm.sys file:

    "0x0000008E" Stop error when Windows 7 enters and then resumes from standby repeatedly if Windows XP Mode is running

    http://support.microsoft.com/kb/2652034

    Below is the dump analysis details for your reference:

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

    KMODE_EXCEPTION_NOT_HANDLED (1e)

    This is a very common bugcheck.  Usually the exception address pinpoints

    the driver/function that caused the problem.  Always note this address

    as well as the link date of the driver/image that contains this address.

    Arguments:

    Arg1: ffffffffc0000005, The exception code that was not handled

    Arg2: fffff88004074af5, The address that the exception occurred at

    Arg3: 0000000000000000, Parameter 0 of the exception

    Arg4: ffffffffffffffff, Parameter 1 of the exception

    Debugging Details:

    ------------------

    EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

    STACK_TEXT: 

    fffff880`073cde48 fffff800`02d31d88 : 00000000`0000001e ffffffff`c0000005 fffff880`04074af5 00000000`00000000 : nt!KeBugCheckEx

    fffff880`073cde50 fffff800`02ce6842 : fffff880`073ce628 00000000`000000af fffff880`073ce6d0 fffff880`062f0000 : nt!KiDispatchException+0x1033c

    fffff880`073ce4f0 fffff800`02ce514a : fffff880`073ce6e0 fffff880`073ce6f0 00000000`6c20e6da 00000000`000806da : nt!KiExceptionDispatch+0xc2

    fffff880`073ce6d0 fffff880`04074af5 : fffff880`06394240 fffff880`06394240 0000040a`00000000 00000000`00000000 : nt!KiGeneralProtectionFault+0x10a

    fffff880`073ce868 fffff880`06394240 : fffff880`06394240 0000040a`00000000 00000000`00000000 fffff880`040650ec : vpcvmm!VmxFixStateOnReturnToHost+0x35

    fffff880`073ce870 fffff880`06394240 : 0000040a`00000000 00000000`00000000 fffff880`040650ec 00000000`00000000 : 0xfffff880`06394240

    fffff880`073ce878 0000040a`00000000 : 00000000`00000000 fffff880`040650ec 00000000`00000000 00000000`00989680 : 0xfffff880`06394240

    fffff880`073ce880 00000000`00000000 : fffff880`040650ec 00000000`00000000 00000000`00989680 fffff880`062f0000 : 0x40a`00000000

    FOLLOWUP_IP:

    vpcvmm!VmxFixStateOnReturnToHost+35

    fffff880`04074af5 8eeb            mov     gs,bx

    FAULTING_SOURCE_LINE_NUMBER:  2759

    SYMBOL_STACK_INDEX:  4

    SYMBOL_NAME:  vpcvmm!VmxFixStateOnReturnToHost+35

    FOLLOWUP_NAME:  cvirthot

    MODULE_NAME: vpcvmm

    IMAGE_NAME:  vpcvmm.sys

    DEBUG_FLR_IMAGE_TIMESTAMP:  4ce7b294

    STACK_COMMAND:  .cxr 0xfff8c3f7000000 ; kb

    FAILURE_BUCKET_ID:  X64_0x1e_c0000005_vpcvmm!VmxFixStateOnReturnToHost+35

    BUCKET_ID:  X64_0x1e_c0000005_vpcvmm!VmxFixStateOnReturnToHost+35

    Followup: cvirthot

    ---------

    3: kd> lmvm vpcvmm

    start             end                 module name

    fffff880`04038000 fffff880`0408e600   vpcvmm     

        Loaded symbol image file: vpcvmm.sys

        Image path: \SystemRoot\system32\drivers\vpcvmm.sys

        Image name: vpcvmm.sys

        Timestamp:        Sat Nov 20 19:35:48 2010 (4CE7B294)

        CheckSum:         0005A84A

        ImageSize:        00056600

        Translations:     0000.04b0 0000.04e4 0409.04b0 0409.04e4

    3: kd> vertarget

    Windows 7 Kernel Version 7601 (Service Pack 1) MP (4 procs) Free x64

    Product: WinNt, suite: TerminalServer SingleUserTS

    Built by: 7601.17835.amd64fre.win7sp1_gdr.120503-2030

    Kernel base = 0xfffff800`02c68000 PsLoadedModuleList = 0xfffff800`02eac670

    Thanks,

    Spencer


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


    Tuesday, July 24, 2012 10:29 AM
  • Hello Spencer,<o:p></o:p>

    Thank you for your response. I will install the suggested patch and try to replicate the error. <o:p></o:p>

    However something is very strange. There is no chance that any of the machines (physical or virtual one) change state when the error appears. When the error appeared I was clicking items in Windows Explorer on physical machine, moving files from one folder to another. And the virtual machine has been idle for at most 1 minute. So neither one could have entered sleep mode or hibernation. More than that, I have disabled hibernation on both machines explicitly.

    Thak you,


    Cosmin Petrenciuc

    Tuesday, July 24, 2012 12:36 PM
  • Hello Spencer,

    I have installed the patch and retested the scenario. The BSOD replicated. I have uploaded to the same address in the SkyDrive the new memory dump files. The folder with the uploaded files is "2012-07-24".

    Thank you,


    Cosmin Petrenciuc

    Tuesday, July 24, 2012 1:55 PM
  • Hello Cosmin,

    This time the dump still point to vpcvmm.sys. The dump analysis result is same with the previous one. I have confirmed that the vpcvmm.sys has been updated to the latest version:

    1: kd> lmvm vpcvmm

    start             end                 module name

    fffff880`03f75000 fffff880`03fcb580   vpcvmm     (private pdb symbols) 

        Loaded symbol image file: vpcvmm.sys

        Image path: \SystemRoot\system32\drivers\vpcvmm.sys

        Image name: vpcvmm.sys

        Timestamp:        Thu Feb 02 13:18:10 2012 (4F2A1C92)

        CheckSum:         0005C735

        ImageSize:        00056580

        Translations:     0000.04b0 0000.04e4 0409.04b0 0409.04e4

    However, the stack does not point out why does this happen. I suspect that may have other services or operations triggered the issue. I notice you mentioned only when a Windows Service application written in C++ and the VPC running simultaneously will the issue happen. Since when they are used individually, there is no issue, so the VPC itself would be in good configuration status. Then the issue might be caused by the Windows Service application written in C++.

    As VPC is a Windows application, it is hard to do any changes with it, to troubleshot and make necessary changes with the application written in C++ would be the solution for us. From my point of view, the issue might be caused by some conflicts when VPC and the application written in C++ calling for the Windows components.

    I think there is nothing to do with the Windows system. However, if possible, to re-install VPC is worth to try.   

    Thanks,

    Spencer


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Wednesday, July 25, 2012 8:01 AM
  • Hello Spencer,<o:p></o:p>

    Thank you for your suggestions. I have tried to debug the Windows Service application since this application is written by me and I have the code. Unfortunately, when I begin a debug session in Visual Studio 2010 and the Virtual PC is running, the system crashes with BSOD. So I can't really see what's crushing it. If I debug the Windows Service application, with the same set of data for input, but with Virtual PC stopped, there are no issues reported by the debugger. No exception are raised, no memory leaks, no access violations, nothing suspicious. As I stated before, both applications, can be run individually without any problems. Only when they run together the BSOD appears.<o:p></o:p>

    I will try in the following days to narrow down the condition when BSOD appear. I'm hoping this happens when something is posted on the completion port by WatchForFolderChangesW function, or when concurrency runtime executes one task. I really don’t know. It is very, very strange.

    Thank you,


    Cosmin Petrenciuc

    Wednesday, July 25, 2012 8:11 AM
  • Hi Cosmin,

    The issue did strange. Hope we can find something with the application.

    Thanks,

    Spencer


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Thursday, July 26, 2012 1:09 AM
  • Hello Spencer,

    I haven’t got any time to investigate this problem further, and when I say investigate I mean debug.

    However, today even a stranger thing happened. Around 10 o clock A.M. I’ve been running that windows service. At 10:02 AM I have stopped the service. Then, at 10:17 I wanted to start the Virtual PC. And the crash happened again. This time the Windows service was not running.

    I think somehow the Windows service changes something in the operating system that makes the execution of Virtual PC impossible. But I really don’t know what that thing might be.

    Best regards,


    Cosmin Petrenciuc

    Wednesday, August 1, 2012 7:34 AM
  • Hi Cosmin,

    Thanks for letting me know the status. I will try to re-analysis the dump file and check if anything I missed. This may need some time. I will update you once any further information was found. :)

    Thanks,

    Spencer


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Wednesday, August 1, 2012 7:42 AM
  • Hi Spencer,

    Today a new BSOD. This time I haven't started Virtual PC, and I wasn't running that Windows service. This time I was simply watching a short movie on Youtube when the computer crashed.

    I didn't catch the name of the driver that caused this BSOD because my computer restarted automaticaly.

    I have uploaded the memory dump files to SkyDrive at the same address, into folder "2012-08-02".

    Thank you,


    Cosmin Petrenciuc

    Thursday, August 2, 2012 8:23 AM
  • Hello Cosmin,

    This time it point to dxgmms1.sys caused the issue which seems a known issue.

    ------------------------------------------------------------------------------------------------

    IRQL_NOT_LESS_OR_EQUAL (a)

    An attempt was made to access a pageable (or completely invalid) address at an

    interrupt request level (IRQL) that is too high.  This is usually

    caused by drivers using improper addresses.

    If a kernel debugger is available get the stack backtrace.

    Arguments:

    Arg1: 0000000000000000, memory referenced

    Arg2: 0000000000000002, IRQL

    Arg3: 0000000000000000, bitfield :

                bit 0 : value 0 = read operation, 1 = write operation

                bit 3 : value 0 = not an execute operation, 1 = execute operation (only on chips which support this level of status)

    Arg4: fffff80002c91442, address which referenced memory

    Debugging Details:

    ------------------

    READ_ADDRESS:  0000000000000000 Nonpaged pool

    CURRENT_IRQL:  2

    FAULTING_IP:

    nt!KiSignalSynchronizationObject+42

    CUSTOMER_CRASH_COUNT:  1

    DEFAULT_BUCKET_ID:  WIN7_DRIVER_FAULT

    BUGCHECK_STR:  0xA

    PROCESS_NAME:  System

    TRAP_FRAME:  fffff880009d6a00 -- (.trap 0xfffff880009d6a00)

    NOTE: The trap frame does not contain all registers.

    Some register values may be zeroed or incorrect.

    rax=0000000000000002 rbx=0000000000000000 rcx=fffff80002dfde80

    rdx=fffffa8007889d30 rsi=0000000000000000 rdi=0000000000000000

    rip=fffff80002c91442 rsp=fffff880009d6b90 rbp=0000000000000000

     r8=0000000000000000  r9=fffffa80089a7c40 r10=fffffa80089a7c40

    r11=fffff880009d6c20 r12=0000000000000000 r13=0000000000000000

    r14=0000000000000000 r15=0000000000000000

    iopl=0         nv up ei pl nz ac pe cy

    nt!KiSignalSynchronizationObject+0x42:

    fffff800`02c91442 488b3f         

    Resetting default scope

    LAST_CONTROL_TRANSFER:  from fffff80002c8a769 to fffff80002c8b1c0

    STACK_TEXT: 

    fffff880`009d68b8 fffff800`02c8a769 : 00000000`0000000a 00000000`00000000 00000000`00000002 00000000`00000000 : nt!KeBugCheckEx

    fffff880`009d68c0 fffff800`02c893e0 : fffff800`02dfde80 fffff800`031fbae7 fffff800`03224460 fffffa80`07889d38 : nt!KiBugCheckDispatch+0x69

    fffff880`009d6a00 fffff800`02c91442 : 00000000`00000000 00000000`00000000 00000000`00000002 fffff800`02c91400 : nt!KiPageFault+0x260

    fffff880`009d6b90 fffff800`02c8f846 : 00000000`00000000 fffff880`0433e1cc 00000000`00000000 fffffa80`07dac410 : nt!KiSignalSynchronizationObject+0x42

    fffff880`009d6be0 fffff880`0434e36b : fffffa80`00000000 00000000`00000000 fffffa80`0b0bca00 fffff880`ffffdf32 : nt!KeSetEvent+0x106

    fffff880`009d6c50 fffff880`0436c16d : fffffa80`00000000 fffffa80`07dac410 00000000`0000000f fffff880`0436df09 : dxgmms1!VidMmiProcessTerminationCommand+0x5f

    fffff880`009d6ca0 fffff880`0436b3f8 : fffff800`00b96080 fffffa80`0b3ee710 00000000`00000000 fffffa80`07dac410 : dxgmms1!VidSchiSubmitDeviceCommand+0x39

    fffff880`009d6cd0 fffff880`0436ae96 : 00000000`00017a0c fffffa80`08dfe9d0 00000000`00000080 fffffa80`07dac410 : dxgmms1!VidSchiSubmitQueueCommand+0xb0

    fffff880`009d6d00 fffff800`02f21e6a : 00000000`033b8698 fffffa80`085fbb50 fffffa80`066de6f0 fffffa80`085fbb50 : dxgmms1!VidSchiWorkerThread+0xd6

    fffff880`009d6d40 fffff800`02c7bec6 : fffff800`02dfde80 fffffa80`085fbb50 fffff800`02e0bcc0 0000000c`4081f000 : nt!PspSystemThreadStartup+0x5a

    fffff880`009d6d80 00000000`00000000 : fffff880`009d7000 fffff880`009d1000 fffff880`009d6680 00000000`00000000 : nt!KxStartSystemThread+0x16

    STACK_COMMAND:  kb

    FOLLOWUP_IP:

    dxgmms1!VidMmiProcessTerminationCommand+5f

    fffff880`0434e36b 33d2            xor     edx,edx

    FAULTING_SOURCE_LINE_NUMBER:  2673

    SYMBOL_STACK_INDEX:  5

    SYMBOL_NAME:  dxgmms1!VidMmiProcessTerminationCommand+5f

    FOLLOWUP_NAME:  gpusmm

    MODULE_NAME: dxgmms1

    IMAGE_NAME:  dxgmms1.sys

    DEBUG_FLR_IMAGE_TIMESTAMP:  4ce799c1

    FAILURE_BUCKET_ID:  X64_0xA_dxgmms1!VidMmiProcessTerminationCommand+5f

    BUCKET_ID:  X64_0xA_dxgmms1!VidMmiProcessTerminationCommand+5f

    Followup: gpusmm

    ---------

    0: kd> lmvm dxgmms1

    start             end                 module name

    fffff880`04333000 fffff880`04379000   dxgmms1   

        Loaded symbol image file: dxgmms1.sys

        Image path: \SystemRoot\System32\drivers\dxgmms1.sys

        Image name: dxgmms1.sys

        Timestamp:        Sat Nov 20 17:49:53 2010 (4CE799C1)

        CheckSum:         00047A89

        ImageSize:        00046000

        File version:     6.1.7601.17514

        Product version:  6.1.7601.17514

        File flags:       0 (Mask 3F)

        File OS:          40004 NT Win32

        File type:        3.7 Driver

        File date:        00000000.00000000

        Translations:     0409.04b0

        CompanyName:      Microsoft Corporation

        ProductName:      Microsoft® Windows® Operating System

        InternalName:     dxgmms1.sys

        OriginalFilename: dxgmms1.sys

        ProductVersion:   6.1.7601.17514

        FileVersion:      6.1.7601.17514 (win7sp1_rtm.101119-1850)

        FileDescription:  DirectX Graphics MMS

        LegalCopyright:   © Microsoft Corporation. All rights reserved.

    We have a hotfix which intend to fix this issue:

    "0x0000007E" or "0x0000000A" Stop error occurs when you play and at the same time record TV content on a computer that is running Windows 7 or Windows Server 2008 R2

    http://support.microsoft.com/kb/2547257

    Please apply this hotfix to update the related files to a newer version then monitor if it can fix the issue. At the same time, I also suggest to update the latest graphics drivers.

    For the original BSOD relate with vpcvmm.sys, after performing more deeper analysis, it still points to vpcvmm.sys. I suspect that the vpcvmm.sys related components should response to the issue. However, to find more information, we need to analysis the underlying code. I am sorry to say that I am not able to check the underlying code.

    To resolve the vpcvmm.sys BSOD issue, it has been not suitable for forum troubleshoot mode. I suggest to submit a professional case for further analysis. Thanks for your understanding.

    From my point of view, to isolate if the issue happens with this specific machine, please confirm if the issue will also happen on other machines.

    Thanks,

    Spencer


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


    Thursday, August 2, 2012 9:23 AM
  • Hello Spencer,<o:p></o:p>

    Thank you for your answers and recommendations. I will install that patch and I will try to find another computer in our company that has the same software configuration to see if I can replicate the issue related to Virtual PC.<o:p></o:p>

    Thank you again for your support.<o:p></o:p>

    Best regards,<o:p></o:p>



    Cosmin Petrenciuc

    Friday, August 3, 2012 5:38 AM
  • Thanks Cosmin. You are welcome. :)

    Spencer


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Friday, August 3, 2012 8:08 AM