Search code examples
pythonwindowsvisual-studio-2012psexecpdb-files

Compile failure only when I run it as a remote service using PsExec


I am trying to run compile tests on a series of build machines so I've written a script to distribute the jobs to each machine. I am using PsExec from microsoft which installs a service on the build machines where it runs commands from. On each build machine I have a batch file which calls a python script that runs all of the tests on want. The original script will pass what test to run, as well as logging information so I can store the results and keep track of it later.

The original script can call all of the machines and execute the batch file properly. If I run the batch file locally on each machine it calls the python script correctly which compiles everything fine. But when I run the batch file remotely from the original script I get the following compile error

fatal error C1902: Program database manager mismatch; please check your installation

over and over again. I am using Microsoft Visual Studio 12 on each machine and python 2.7. Does anyone know why that error would happen only because the script calling the bat file that calls the python script? Any help or push in the right direction would be GREATLY appreciated! Thanks!


Solution

  • I've encountered such error on VS2010 except I'm using Cygwin's ssh.

    The problem that instead of dealing with debug information on his own, cl.exe compiler runs mspdbsrv.exe as a central server. When you run compiler from the interactive session, everything works fine, but when cl.exe is run from remote session of some kind, it fails to connect to actual mspdbsrv.exe and eventually fails with C1902 error.

    It seems that despite the fact Cygwin ssh runs bash (shell) from .\Administrator, somewhere inside RPC API, account from which service runs is used (.\cyg_server in my case). Here are the screenshot from API Monitor tracing cl.exe:

    I've managed to solve that problem by changing sshd service user to .\Administrator. You can probably do the trick with PsExec.