VirtualBox

Changeset 65513 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Jan 29, 2017 8:22:01 PM (8 years ago)
Author:
vboxsync
Message:

ValidationKit: Collect information about the VM process state if pwoering off the VM failed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/vbox.py

    r65386 r65513  
    23742374        return fRc;
    23752375
    2376     def annotateAndUploadProcessReport(self, sProcessReport):
     2376    def annotateAndUploadProcessReport(self, sProcessReport, sFilename, sKind, sDesc):
    23772377        """
    23782378        Annotates the given VM process report and uploads it if successfull.
     
    23882388                sReportDbgSym = oResolver.annotateReport(sProcessReport);
    23892389                if sReportDbgSym is not None:
    2390                     reporter.addLogString(sReportDbgSym, 'vmprocess.log', 'process/report/vm', 'Annotated VM process state');
     2390                    reporter.addLogString(sReportDbgSym, sFilename, sKind, sDesc);
    23912391                    fRc = True;
    23922392                else:
     
    25982598        # requires memory too and seems to wedge.
    25992599        #
    2600         sHostProcessInfo    = None;
    2601         sLastScreenshotPath = None;
    2602         sOsKernelLog        = None;
    2603         sVgaText            = None;
    2604         asMiscInfos         = [];
     2600        sHostProcessInfo     = None;
     2601        sHostProcessInfoHung = None;
     2602        sLastScreenshotPath  = None;
     2603        sOsKernelLog         = None;
     2604        sVgaText             = None;
     2605        asMiscInfos          = [];
    26052606
    26062607        if not oSession.fHostMemoryLow:
     
    27062707                uPid = oSession.getPid();
    27072708                if uPid is not None:
     2709                    #
     2710                    # Collect some information about the VM process first to have
     2711                    # some state information for further investigation why powering off failed.
     2712                    #
     2713                    sHostProcessInfoHung = utils.processGetInfo(uPid, fSudo = True);
     2714
     2715                    # Exterminate...
    27082716                    reporter.error('terminateVmBySession: Terminating PID %u (VM %s)' % (uPid, oSession.sName));
    27092717                    fClose = base.processTerminate(uPid);
     
    27652773        if sHostProcessInfo is not None:
    27662774            reporter.log('Trying to annotate the VM process report, please stand by...');
    2767             fRcTmp = self.annotateAndUploadProcessReport(sHostProcessInfo);
     2775            fRcTmp = self.annotateAndUploadProcessReport(sHostProcessInfo, 'vmprocess.log',
     2776                                                         'process/report/vm', 'Annotated VM process state');
    27682777            # Upload the raw log for manual annotation in case resolving failed.
    27692778            if not fRcTmp:
    27702779                reporter.log('Failed to annotate VM process report, uploading raw report');
    27712780                reporter.addLogString(sHostProcessInfo, 'vmprocess.log', 'process/report/vm', 'VM process state');
     2781
     2782        # Add the host process info for failed power off attempts if we were able to retrieve it.
     2783        if sHostProcessInfoHung is not None:
     2784            reporter.log('Trying to annotate the hung VM process report, please stand by...');
     2785            fRcTmp = self.annotateAndUploadProcessReport(sHostProcessInfoHung, 'vmprocess-hung.log',
     2786                                                         'process/report/vm', 'Annotated hung VM process state');
     2787            # Upload the raw log for manual annotation in case resolving failed.
     2788            if not fRcTmp:
     2789                reporter.log('Failed to annotate hung VM process report, uploading raw report');
     2790                reporter.addLogString(sHostProcessInfoHung, 'vmprocess-hung.log', 'process/report/vm',
     2791                                      'Hung VM process state');
    27722792
    27732793        return fRc;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette