Comment obtenir une pile d'appels pour un devenv.com qui tombe en panne de manière intermittente?

StackOverflow https://stackoverflow.com/questions/835281

Question

J'ai un script de traitement par lots DOS de construction nocturne qui appelle devenv.exe pour créer un fichier de solution. J'observe par intermittence un crash de devenv.com. Je reçois un fichier DW20.exe " partagez votre douleur " dialogue.

1) Si vous appuyez sur le bouton Débogage, le message "Choisissez votre débogueur" ne s'affiche pas. la fenêtre. Au contraire, cela ne fait rien.

2) Si je lance un Visual Studio et que je tente de me connecter à devenv.com, cela signifie que l'application semble être dans l'impasse ou en attente de la fin d'une opération. (Je pense que cela a été débogué par DW20.exe)

Que recommanderiez-vous que je fasse pour obtenir une pile d'appels décente?

MODIFIER

J'ai réussi à attacher WinDBG. Exécuté la commande k. Ce qui suit ressemble-t-il à quelque chose de significatif qui peut être transmis à l’équipe de compilation? Existe-t-il un moyen de regarder l'exception actuelle?

(e90.fb8): Break instruction exception - code 80000003 (!!! second chance !!!)
eax=0012ccb8 ebx=04ed2750 ecx=0111bdc4 edx=5a57f004 esi=00000000 edi=14ed1000
eip=77e4bef7 esp=0012ccb4 ebp=0012cd08 iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINDOWS\system32\kernel32.dll - 
kernel32!RaiseException+0x3c:
77e4bef7 5e              pop     esi
Missing image name, possible paged-out or corrupt data.
Missing image name, possible paged-out or corrupt data.
Missing image name, possible paged-out or corrupt data.
Missing image name, possible paged-out or corrupt data.
0:000> k
ChildEBP RetAddr  
WARNING: Stack unwind information not available. Following frames may be wrong.
0012cd08 5a760cf1 kernel32!RaiseException+0x3c
0012cd58 5a766105 cslangsvc!InMemoryCompile+0x4c6c1
0012cd7c 5a767375 cslangsvc!InMemoryCompile+0x51ad5
0012cd84 5a767637 cslangsvc!InMemoryCompile+0x52d45
00000000 00000000 cslangsvc!InMemoryCompile+0x53007

J'essaie de faire fonctionner ! analyse -v .

0:000> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************

***** OS symbols are WRONG. Please fix symbols to do analysis.

*************************************************************************
***                                                                   ***
***                                                                   ***
***    Your debugger is not using the correct symbols                 ***
***                                                                   ***
***    In order for this command to work properly, your symbol path   ***
***    must point to .pdb files that have full type information.      ***
***                                                                   ***
***    Certain .pdb files (such as the public OS symbols) do not      ***
***    contain the required information.  Contact the group that      ***
***    provided you with these symbols if you need this command to    ***
***    work.                                                          ***
***                                                                   ***
***    Type referenced: ntdll!_PEB                                    ***
***                                                                   ***
*************************************************************************
c0000005 Exception in ext.analyze debugger extension.
PC: 014d7875  VA: 00000000  R/W: 0  Parameter: 0001003f

EDIT 2

J'ai découvert l'existence de ces merveilleuses extensions SOS de WinDBG. Apparemment, je peux les utiliser pour déboguer le compilateur C # ...

0:000> !PrintException
There is no current managed exception on this thread
0:000> !clrstack
OS Thread Id: 0x9fc (0)
ESP       EIP     
0012ee08 77e4bef7 [ComPlusMethodFrameGeneric: 0012ee08] Microsoft.Build.Tasks.Hosting.ICscHostObject.Compile()
0012ee18 6be671ab Microsoft.Build.Tasks.Csc.CallHostObjectToExecute()
0012ee48 6c0aed17 Microsoft.Build.Utilities.ToolTask.Execute()
0012ee7c 6bcbb348 Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode, System.Collections.Hashtable, Microsoft.Build.BuildEngine.BuildPropertyGroup, Boolean ByRef)
0012ef24 6bcadf87 Microsoft.Build.BuildEngine.Target.ExecuteAllTasks(Microsoft.Build.BuildEngine.DependencyAnalysisResult, System.Collections.Hashtable, System.Collections.Hashtable, Microsoft.Build.BuildEngine.ItemBucket, System.Collections.ArrayList, Microsoft.Build.BuildEngine.BuildPropertyGroup)
0012efa0 6bcac7c0 Microsoft.Build.BuildEngine.Target.ExecuteAllTasks()
0012efec 6bcad05b Microsoft.Build.BuildEngine.Target.Build(System.Collections.IDictionary)
0012f070 6bcacfa6 Microsoft.Build.BuildEngine.Target.Build(System.Collections.IDictionary)
0012f0f4 6bcacfa6 Microsoft.Build.BuildEngine.Target.Build(System.Collections.IDictionary)
0012f178 6bcacfa6 Microsoft.Build.BuildEngine.Target.Build(System.Collections.IDictionary)
0012f1fc 6bc9b20d Microsoft.Build.BuildEngine.Project.DoBuild(System.String[], System.Collections.IDictionary, Boolean)
0012f250 6bca2134 Microsoft.Build.BuildEngine.Engine.BuildProject(Microsoft.Build.BuildEngine.Project, System.String[], System.Collections.IDictionary, Microsoft.Build.BuildEngine.BuildSettings, Boolean)
0012f2ac 6bc9af03 Microsoft.Build.BuildEngine.Project.Build(System.String[], System.Collections.IDictionary)
0012f2c0 04711a36 Microsoft.VisualStudio.Build.ComInteropWrapper.ProjectShim.BuildTarget(System.String, System.Collections.IDictionary)
0012f4f4 79f68cde [GCFrame: 0012f4f4] 
0012f650 79f68cde [ComMethodFrame: 0012f650] 

Je suis toujours à la recherche d'un moyen d'examiner le contenu de l'exception. ! PrintException n'a trouvé aucune exception.

Était-ce utile?

La solution 3

Ceci est un peu verbeux, je vais donc le poster en réponse. Il provient du site Microsoft Connect, en réponse à mon problème. Reader pourrait le trouver pertinent:

Date: jeu. 7 mai 2009 19:14:52 -0700

Salutations de Microsoft Connect!

Cette notification a été générée pour l'élément de commentaire: Problèmes de construction nocturnes (compartiment 365749762) que vous avez soumis sur le site Microsoft Connect.

Merci d'avoir signalé ce problème rencontré avec Visual Studio 2005, ainsi que pour les vidages que vous avez fournis!

Il semble que le problème se trouve dans cslangsvc.dll (le compilateur C-in-process), dans lequel DevEnv appelle pour effectuer votre construction.

Notre suggestion de contourner ce problème serait Essayez plutôt d’utiliser MSBuild pour vos constructions nocturnes, car cela devrait être plus robuste que l’automatisation de DevEnv / build. En particulier, vous éviterez probablement ce problème car MSBuild utilisera csc.exe pour la compilation plutôt que cslangsvc.dll.

Il est peu probable que nous ayons une nouvelle version de VS 2005 pour résoudre le problème de cslangsvc. Je résous donc ce bogue qui ne résout pas le problème, mais veuillez le réactiver si vous rencontrez toujours un problème lors de l'utilisation de MSBuild. .

Merci encore pour toutes les informations sur ce problème!

Alex Turner Gestionnaire de programme Compilateur Visual C #

Autres conseils

Vous pouvez essayer d’installer Outils de débogage pour Windows , puis utiliser le Option -iae (pour NTSD / CDB) ou option -I (pour WinDBG) pour que l'un des débogueurs de ce package soit le débogueur JIT / AeDebug.

Je suis enfin arrivé à un type d'exception et à une pile d'appels pour le compilateur défaillant. Je l'ai fait en enregistrant un fichier de vidage complet (.dump / ma c: \ myCSCdump.dmp), puis en ouvrant le fichier de vidage comme vous ouvriez tout autre fichier de projet dans VS2005. En appuyant sur le bouton Exécuter, vous obtenez les éléments suivants dans la fenêtre de la pile d’appel:

kernel32.dll!_RaiseException@16()  + 0x3c bytes 
  

cslangsvc.dll! ALLOCHOST :: ThrowOutOfMemoryException () + 0x10 octets

      cslangsvc.dll! PAGEHEAP :: AllocPages () + 0xc1fd8 octets

      cslangsvc.dll! SYMTBL :: GrowTable () + 0x5b octets       cslangsvc.dll! BSYMMGR :: AddChild () + 0x3b octets       cslangsvc.dll! BSYMMGR :: CreateGlobalSym () + 0x2ba octets       cslangsvc.dll! BSYMMGR :: CreateMethod () + 0xc octets
      cslangsvc.dll! IMPORTER :: ImportMethod () + 0x1d9 octets
      cslangsvc.dll! IMPORTER :: DefineImportedType () + 0x3b2 octets       cslangsvc.dll! CLSDREC :: prepareAggregate () + 0x8d octets       cslangsvc.dll! COMPILER :: ForceAggStates () + 0x8e octets
      cslangsvc.dll! COMPILER :: ForceAggStates () + 0x127 octets       cslangsvc.dll! COMPILER :: EnsureState () + 0x2e octets       cslangsvc.dll! CLSDREC :: CheckForTypeErrors () + 0x23 octets

      cslangsvc.dll! CLSDREC :: CheckForTypeErrors () + 0x2ba octets

      cslangsvc.dll! CLSDREC :: CheckForTypeErrors () + 0x80 octets

      cslangsvc.dll! CLSDREC :: CheckForTypeErrors () + 0x8a octets

      cslangsvc.dll! CLSDREC :: CheckForTypeErrors () + 0x8a octets

      cslangsvc.dll! CLSDREC :: CheckForTypeErrors () + 0x8a octets

      cslangsvc.dll! COMPILER :: CheckForTypeErrors () + 0x100 octets       cslangsvc.dll! COMPILER :: CompileAll () + 0x546 octets       cslangsvc.dll! COMPILER :: Compile () + 0x7c octets       cslangsvc.dll! CController :: RunCompiler () + 0x177 octets       cslangsvc.dll! CController :: Compile () + 0x16 octets

      cslangsvc.dll! CCSharpProjectSite :: BuildProjectCore () + 0x5a octets

      cslangsvc.dll! CProjectSite :: BuildProject () + 0x11 octets

      csproj.dll! CCSharpBuildCompiler :: DoMainBuild () + 0x88 octets

      csproj.dll! CCscMSBuildHostObject :: Compile () + 0x4e octets

      mscorwks.dll!_CLRToCOMWorker@8 () + 0x171 octets

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top