none
TE.Host v5.8k for x64 Structured exception was encountered: 0xE0434352 RRS feed

  • Question

  • Hey guys.

    I'm trying to ramp up on driver development.  I'm using VS2015U3 on Win7-64.  I have 2 VMs, both running in ESXi.  One is the development environment, the other is the test environment.  I have a driver sample that compiles, signs, and using the WDK10 tools, gets transferred over to my test VM. 

    The uninstall passes, but the install fails with the following error:

    Test Authoring and Execution Framework: TE.Host v5.8k for x64 Structured exception was encountered: 0xE0434352 - Unknown exception 
    KERNELBASE.dll!RaiseException+0x3d 
    clr.dll!StrongNameSignatureVerification+0x456a9
    clr.dll!Ordinal24+0x8684 
    clr.dll!Ordinal24+0x8fd6 
    clr.dll!NukeDownloadedCache+0xdb3b 
    clr.dll!NukeDownloadedCache+0xdb49 
    clr.dll!GetAssemblyIdentityFromFile+0x285e6 
    clr.dll!CreateAssemblyConfigCookie+0xa11b7 
    clr.dll!CopyPDBs+0x21f2 
    clr.dll!StrongNameSignatureVerification+0x1b553 
    Te.Common.dll!?DestinationIsDirectory@DeploymentItem@TestExecution@WEX@@AEBA_NXZ+0x127 
    TE.Loaders.dll!?CreateTaefTestLoader@TestExecution@WEX@@YA?AV?$unique_ptr@VITestLoader@TestExecution@WEX@@U?$default_delete@VITestLoader@TestExecution@WEX@@@std@@@std@@XZ+0x8a5 
    TE.Loaders.dll!SendExecutorUri+0x3227 
    TE.Loaders.dll!SendExecutorUri+0x3ba0 
    TE.Loaders.dll!SendExecutorUri+0x3a5e 
    TE.Loaders.dll!?GetTestClassInstance@TestExecutor@TestExecution@WEX@@QEAA?AV?$shared_ptr@VTestClassInstance@TestExecution@WEX@@@tr1@std@@AEBVString@Common@3@0_N@Z+0xca 
    TE.Host.dll!HostApplicationRunWithArgumentsInEnvironmentVariable+0x3769 
    Te.Common.dll!?Initialize@CommandThread@TestExecution@WEX@@QEAAX_K@Z+0x65f 
    Te.Common.dll!?Initialize@CommandThread@TestExecution@WEX@@QEAAX_K@Z+0x3a5 
    Te.Common.dll!?Initialize@CommandThread@TestExecution@WEX@@QEAAX_K@Z+0x7d9 
    Te.Common.dll!?Initialize@CommandThread@TestExecution@WEX@@QEAAX_K@Z+0x5ed 
    kernel32.dll!BaseThreadInitThunk+0xd 
    ntdll.dll!RtlUserThreadStart+0x21 
    If the stack trace above was incomplete, please set the _NT_SYMBOL_PATH environment variable

    My build builds successfully, and according to the build output, signs the driver successfully as well.  Checking the certificates on the test VM shows that my cert was installed as well.

    Here's the build output:

    1>------ Build started: Project: KMDF Driver1, Configuration: Debug x64 ------
    1>  Building 'KMDF Driver1' with toolset 'WindowsKernelModeDriver10.0' and the 'Desktop' target platform.
    1>  Stamping x64\Debug\KMDFDriver1.inf [Version] section with DriverVer=01/25/2017,23.46.46.98
    1>  minispy.c
    1>  mspyLib.c
    1>  RegistrationData.c
    1>  Generating Code...
    1>  KMDF Driver1.vcxproj -> C:\Users\frank\Documents\Visual Studio 2015\Projects\KMDF Driver1\x64\Debug\KMDFDriver1.sys
    1>  KMDF Driver1.vcxproj -> C:\Users\frank\Documents\Visual Studio 2015\Projects\KMDF Driver1\x64\Debug\KMDFDriver1.pdb (Full PDB)
    1>  Done Adding Additional Store
    1>  Successfully signed: C:\Users\frank\Documents\Visual Studio 2015\Projects\KMDF Driver1\x64\Debug\KMDFDriver1.sys
    1>
    1>  .........................
    1>  Signability test complete.
    1>
    1>  Errors:
    1>  None
    1>
    1>  Warnings:
    1>  None
    1>
    1>  Catalog generation complete.
    1>  C:\Users\frank\Documents\Visual Studio 2015\Projects\KMDF Driver1\x64\Debug\KMDF Driver1\kmdfdriver1.cat
    1>  Done Adding Additional Store
    1>  Successfully signed: C:\Users\frank\Documents\Visual Studio 2015\Projects\KMDF Driver1\x64\Debug\KMDF Driver1\kmdfdriver1.cat
    1>
    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


    I'm HOPING this is a common problem, and there's a simple answer.

    -Frank




    Thursday, January 26, 2017 3:50 PM

Answers

All replies

  • Hi Frank,

    It seems that it is not the VS Debugger tool issue. To help you find a more appropriate forum or provide useful information, would you please let me know more information about this issue?

    >>The uninstall passes, but the install fails with the following error:

    As you said that you installed this app, do you mean that you create the setup file for this project using the VS? If so, how did you create the setup file for it, click-once or others?

    In addition, as far as I know the driver has his own supported forum:

    https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?forum=wdk%2Cwhck&filter=alltypes&sort=lastpostdesc

    Best Regards,

    Jack


    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, January 26, 2017 9:06 AM
  • Hi Jack, 

    Thanks for the reply.

    >t seems that it is not the VS Debugger tool issue. To help you find a more appropriate forum or provide useful information, would you please let me know more information about this issue?

    Sure, I'll tell you all I can.

    > As you said that you installed this app, do you mean that you create the setup file for this project using the VS? If so, how did you create the setup file for it, click-once or others?

    VS builds everything.  Here's the build output:

    1>------ Build started: Project: KMDF Driver1, Configuration: Debug x64 ------
    1>  Building 'KMDF Driver1' with toolset 'WindowsKernelModeDriver10.0' and the 'Desktop' target platform.
    1>  Stamping x64\Debug\KMDFDriver1.inf [Version] section with DriverVer=01/25/2017,23.46.46.98
    1>  minispy.c
    1>  mspyLib.c
    1>  RegistrationData.c
    1>  Generating Code...
    1>  KMDF Driver1.vcxproj -> C:\Users\frank\Documents\Visual Studio 2015\Projects\KMDF Driver1\x64\Debug\KMDFDriver1.sys
    1>  KMDF Driver1.vcxproj -> C:\Users\frank\Documents\Visual Studio 2015\Projects\KMDF Driver1\x64\Debug\KMDFDriver1.pdb (Full PDB)
    1>  Done Adding Additional Store
    1>  Successfully signed: C:\Users\frank\Documents\Visual Studio 2015\Projects\KMDF Driver1\x64\Debug\KMDFDriver1.sys
    1>
    1>  .........................
    1>  Signability test complete.
    1>
    1>  Errors:
    1>  None
    1>
    1>  Warnings:
    1>  None
    1>
    1>  Catalog generation complete.
    1>  C:\Users\frank\Documents\Visual Studio 2015\Projects\KMDF Driver1\x64\Debug\KMDF Driver1\kmdfdriver1.cat
    1>  Done Adding Additional Store
    1>  Successfully signed: C:\Users\frank\Documents\Visual Studio 2015\Projects\KMDF Driver1\x64\Debug\KMDF Driver1\kmdfdriver1.cat
    1>
    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


    Then, once the build is done, I choose "Deploy Solution" from the build menu, and it transfers the whole glob to the test machine, and tries to install it.  

    Output from that:

    Deploying driver files for project "C:\Users\frank\Documents\Visual Studio 2015\Projects\KMDF Driver1\KMDF Driver1\KMDF Driver1.vcxproj".  Deployment may take a few minutes...
    [08:48:35:051]: Copying required files
    [08:48:35:129]: Task "Copying required files" completed successfully
    [08:48:35:363]: Remove Existing Remote Package
    [08:48:35:426]: Task "Remove Existing Remote Package" completed successfully
    [08:48:35:441]: Copy Driver Package
    [08:48:35:706]: Task "Copy Driver Package" completed successfully
    [08:48:35:722]: Driver Removal
    [08:48:35:722]: Removing any existing files from test execution folder.
    [08:48:35:800]: Copying required files for "Driver Removal".
    [08:48:36:502]: [Driver Removal] Command Line:
    $KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks_downlevel.dll" /select:"@Name='DriverTestTasks::_DriverRemoval'" /p:"InfFile=KMDFDriver1.inf" /p:"ImportDriver=1" /p:"RemoveDriver=1"
     /p:"CertificateFile=KMDFDriver1.cer" /p:"PackageGuid=x64" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Removal_00002.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*"
     /runas:Elevated
    [08:49:33:348]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
    [08:49:33:348]: Task "Driver Removal" completed successfully
    [08:49:34:706]: Driver Preparation
    [08:49:34:706]: Removing any existing files from test execution folder.
    [08:49:34:752]: Copying required files for "Driver Preparation".
    [08:49:35:236]: [Driver Preparation] Command Line:
    $KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks_downlevel.dll" /select:"@Name='DriverTestTasks::_DriverPreparation'" /p:"InfFile=KMDFDriver1.inf" /p:"ImportDriver=1" /p:"RemoveDriver=1"
     /p:"CertificateFile=KMDFDriver1.cer" /p:"PackageGuid=x64" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Preparation_00002.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*"
     /runas:Elevated
    [08:50:21:724]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
    [08:50:21:724]: Task "Driver Preparation" completed successfully
    [08:50:22:941]: Default Driver Package Installation Task
    [08:50:22:941]: Removing any existing files from test execution folder.
    [08:50:23:050]: Copying required files for "Default Driver Package Installation Task".
    [08:50:23:503]: [Default Driver Package Installation Task] Command Line:
    $KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DefaultDriverPackageInstallationTask.dll" /select:"@Name='Microsoft.DriverKit.DefaultDriverPackageInstallationClass.PerformDefaultDriverPackageInstallation'" /p:"AbsoluteDriverPackagePath=%SystemDrive%\DriverTest\Drivers\KMDFDriver1.inf"
     /p:"DQ=%SystemDrive%\DriverTest\Drivers\KMDFDriver1.inf" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Default_Driver_Package_Installation_Task_00002.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*"
     /runas:Elevated
    [08:50:34:828]: Result Summary: Total=1, Passed=0, Failed=0, Blocked=1, Warned=0, Skipped=0
    [08:50:34:844]: ERROR: Task "Default Driver Package Installation Task" failed to complete successfully. Look at the logs in the driver test group explorer for more details on the failure.
    [08:50:36:061]: Driver Post Install Actions
    [08:50:36:061]: Removing any existing files from test execution folder.
    [08:50:36:092]: Copying required files for "Driver Post Install Actions".
    [08:50:36:685]: [Driver Post Install Actions] Command Line:
    $KitRoot$\Testing\Runtimes\TAEF\te.exe "%SystemDrive%\DriverTest\Run\DriverTestTasks_downlevel.dll" /select:"@Name='DriverTestTasks::_DriverPostInstall'" /rebootStateFile:%SystemDrive%\DriverTest\Run\DriverTestReboot.xml /enableWttLogging
     /wttDeviceString:$LogFile:file="%SystemDrive%\DriverTest\Run\Driver_Post_Install_Actions_00002.wtl",writemode=append,encoding=unicode,nofscache=true,EnableLvl="WexStartTest|WexEndTest|WexXml|WexProperty|WexCreateContext|WexCloseContext|*"
     /runas:Elevated
    [08:50:40:647]: Result Summary: Total=1, Passed=1, Failed=0, Blocked=0, Warned=0, Skipped=0
    [08:50:40:663]: Task "Driver Post Install Actions" completed successfully
    Driver Deployment Task Failed: Default Driver Package Installation Task

    • Edited by FrankRizzo890 Friday, January 27, 2017 3:27 AM reformat to make easier to read.
    Thursday, January 26, 2017 3:58 PM
  • Anyone, anyone?  Bueller?  Bueller?
    Sunday, January 29, 2017 12:45 AM
  • Unsure, what to make out of it.
    Would not rely on function-names for your exception stack. offsets are too big e.g.
    clr.dll!StrongNameSignatureVerification+0x456a9
    You missing symbols?

    Do you refer to
    https:/github.com/Microsoft/Windows-driver-samples/tree/master/filesys/miniFilter/minispy 
    (Looks for me, sample is meant for manual installation.)

    If so - for 'Driver Preparation' passed - , probably driver is already staged - copied into driver store (setupapi.dev.log?).
    Also, could imagine, settings in 'Property Pages' - 'Driver Install' could of interest

    With kind regards
    Sunday, January 29, 2017 11:34 AM
  • I don't have the symbols installed on that VM, as it's the target, and just has the OS, and the WDK_Target*.exe package installed to allow it to communicate with the host.

    (Prepare for newbie question).  If I DON'T use the VS auto-installer, how do I install it manually?

    The most recent entries in setupapi.dev.log are from 3-4 days before my last attempt to install the driver.  And the text "minispy" doesn't exist in there at all.

    Here are the settings in my Driver Install Property Pages.  I have pictures ready to go, but can't post them as I'm a newbie here.  So, I put them in my dropbox.  Base64 decode this to see the URL
    aHR0cHM6Ly93d3cuZHJvcGJveC5jb20vc2gvMHFza296dG9ia2FjZGc0L0FBQl9pSWJfMEltemFWNVlkUmpoZVdocWE/ZGw9MA==


    Sunday, January 29, 2017 7:22 PM
  • Not that familiar with this stuff myself ...
    Just thought, that you are using somehow
    https:/github.com/Microsoft/Windows-driver-samples/tree/master/filesys/miniFilter/minispy 
    because source files minispy.c, mspyLib.c, RegistrationData.c are matching.
    But not sure what you are doing in detail, for you end up with a KMDFDriver1.sys ...
    Probably not best practice: to test basic functionality, I'd open solution (as is - eventually 'Target Platform Desktop'), add the inf-file to the driver project.

    then in driver properties add user-application to package:

    and specify in deployment 'Do not install'

    Build solution.
    Deploy driver project.

    For installation use instructions from
     https://github.com/uri247/wdk81/blob/master/Minispy%20File%20System%20Minifilter%20Driver/description.html
    >>'Installation
    The minifilter samples come with an INF file that will install the minifilter. To install the minifilter, do the following:
    Make sure that filtername.sys and filtername.inf are in the same directory.
    Note  This installation will make the necessary registry updates to register the minifilter service and place filtername.sys in the %SystemRoot%\system32\drivers directory.
    In Windows Explorer, right-click filtername.inf, and click Install.
    To load the minifilter, run fltmc load filtername or net start filtername.'<<

    On success, probably it is possible later on, to omit step right-click filtername.inf, and click Install):


    Besides for the target may miss debug version of c-runtime, would link the user-application statically for a debug-build.

    With kind regards
    Sunday, January 29, 2017 10:46 PM
  • THANK YOU for the response!

    It builds, and deploys, but "fltmc.exe load minispy" returns error 0x8007007f.

    Some digging online pointed me to dependency walker, which tells me that it's trying to reference FLTMGR.SYS, and failing.  For whatever reason, it wanted it copied to C:\DriverTest\Drivers.  Did that, and now it's complaining about KeInitializeSpinLock.  A quick scan of the MSDN page on that function reveals that it was added for Windows 2000, and this is Windows 7-64.  ???

    • Edited by FrankRizzo890 Monday, January 30, 2017 3:48 AM Made more progress on my own.
    Monday, January 30, 2017 2:14 AM
  • Ah sorry, overlooked that. Not familiar with Win 7. You already tried setting 'Target OS Version' 'Windows 7' in 'Project-Properties->Driver Settings->General' (both projects)?

    With kind regards

    Monday, January 30, 2017 8:36 AM
  • THANK YOU!  That was it.  

    I can now load it without error, and it shows up in the fltmc output.  Now the fun REALLY begins!

    Thanks again

    Monday, January 30, 2017 5:36 PM
  • @FrankRizzo890,

    If it works well now, would you please mark helpful reply as the answer? So it could help other community member who meet the same issue.

    Sincerely,

    Jack


    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.


    Monday, February 6, 2017 10:37 AM