Changeset 69541 in vbox for trunk/src/VBox
- Timestamp:
- Nov 1, 2017 1:20:00 PM (7 years ago)
- Location:
- trunk/src/VBox/ValidationKit/testdriver
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/vbox.py
r69111 r69541 816 816 self.fEnableDebugger = True; 817 817 818 # TEMPORARY: For process heap checking on windows 2012 boxes. 819 self.fDoHeapChecks = False; 820 if 'COMPUTERNAME' in os.environ and utils.getHostOs() == 'windows': 821 self.fDoHeapChecks = os.environ['COMPUTERNAME'] in [ 'TESTBOXWIN5', 'WEI01-B6KC-4', 'TESTBOXPILE2' ]; 822 818 823 # Quietly detect build and validation kit. 819 824 self._detectBuild(False); … … 842 847 if self.oBuild is not None: 843 848 self.oBuild.dump(); 849 850 851 def checkProcessHeap(self): 852 """ 853 TEMPORARY: Check the process heap on some Windows 2012 server machines to try catch heap corruption issue. 854 """ 855 if self.fDoHeapChecks: 856 if sys.platform == 'win32': 857 from testdriver import winbase; 858 return winbase.checkProcessHeap(); 859 return True; 860 844 861 845 862 def _detectBuild(self, fQuiet = False): … … 1417 1434 self.oVBox = None; 1418 1435 vboxcon.goHackModuleClass.oVBoxMgr = None; # VBoxConstantWrappingHack. 1436 self.checkProcessHeap(); ## TEMPORARY 1419 1437 1420 1438 try: … … 1439 1457 reporter.logXcpt(); 1440 1458 self.fImportedVBoxApi = False; 1459 self.checkProcessHeap(); ## TEMPORARY 1441 1460 1442 1461 if self.sHost == 'win': … … 1460 1479 except: 1461 1480 reporter.logXcpt(); 1481 self.checkProcessHeap(); ## TEMPORARY 1462 1482 1463 1483 try: … … 1466 1486 except: 1467 1487 reporter.logXcpt(); 1488 self.checkProcessHeap(); ## TEMPORARY 1468 1489 return True; 1469 1490 … … 1833 1854 Only Ctrl-C exception, no return. 1834 1855 """ 1856 self.checkProcessHeap(); ## TEMPORARY 1835 1857 try: 1836 1858 self.oVBoxMgr.waitForEvents(cMsTimeout); … … 1839 1861 except: 1840 1862 pass; 1863 self.checkProcessHeap(); ## TEMPORARY 1841 1864 return None; 1842 1865 … … 2121 2144 if not self.importVBoxApi(): 2122 2145 return None; 2146 self.checkProcessHeap(); ## TEMPORARY 2123 2147 2124 2148 # create + register the VM … … 2231 2255 reporter.log('created "%s" with name "%s"' % (oVM.id, sName)); 2232 2256 self.aoVMs.append(oVM); 2257 self.checkProcessHeap(); ## TEMPORARY 2233 2258 self.logVmInfo(oVM); # testing... 2259 self.checkProcessHeap(); ## TEMPORARY 2234 2260 return oVM; 2235 2261 # pylint: enable=R0913,R0914,R0915 -
trunk/src/VBox/ValidationKit/testdriver/winbase.py
r69111 r69541 272 272 return True; 273 273 274 def checkProcessHeap(): 275 """ 276 Calls HeapValidate(GetProcessHeap(), 0, NULL); 277 """ 278 279 # Get the process heap. 280 try: 281 hHeap = ctypes.windll.kernel32.GetProcessHeap(); 282 except: 283 reporter.logXcpt(); 284 return False; 285 286 # Check it. 287 try: 288 fIsOkay = ctypes.windll.kernel32.HeapValidate(hHeap, 0, None); 289 except: 290 reporter.logXcpt(); 291 return False; 292 293 if fIsOkay == 0: 294 reporter.log('HeapValidate failed!'); 295 296 # Try trigger a dump using c:\utils\procdump64.exe. 297 from common import utils; 298 299 iPid = os.getpid(); 300 asArgs = [ 'e:\\utils\\procdump64.exe', '-ma', '%s' % (iPid,), 'c:\\CrashDumps\\python.exe-%u-heap.dmp' % (iPid,)]; 301 if utils.getHostArch() != 'amd64': 302 asArgs[0] = 'c:\\utils\\procdump.exe' 303 reporter.log('Trying to dump this process using: %s' % (asArgs,)); 304 utils.processCall(asArgs); 305 306 # Generate a crash exception. 307 ctypes.windll.msvcrt.strcpy(None, None, 1024); 308 309 return True; 310 311
Note:
See TracChangeset
for help on using the changeset viewer.