예제 #1
0
        /// <summary>
        /// Try to diagnose whether there's a CLR mismatch error.
        /// </summary>
        /// <returns>True if this is the problem.</returns>
        protected bool CLRStartupProblems()
        {
            IClusterResidentObject stdout = this.Job.ClusterConfiguration.ProcessStdoutFile(this.Vertex.ProcessIdentifier, this.Vertex.VertexIsCompleted, this.Vertex.Machine, this.Job.Summary);

            if (stdout.Exception != null)
            {
                return(false);
            }
            ISharedStreamReader sr = stdout.GetStream();

            // only look for the error in the first 10 lines
            for (int i = 0; i < 10; i++)
            {
                if (sr.EndOfStream)
                {
                    sr.Close();
                    return(false);
                }
                string line = sr.ReadLine();
                if (line.Contains("Error code 2148734720 (0x80131700)"))
                {
                    this.Log(DiagnosisMessage.Importance.Final, "Error found in vertex stdout:", line);
                    sr.Close();
                    return(true);
                }
            }
            sr.Close();
            return(false);
        }
예제 #2
0
        /// <summary>
        /// Discover whether the failure is caused by the inability to parse the XML plan.
        /// </summary>
        /// <returns>The decision.</returns>
        public Decision XmlPlanParseError()
        {
            if (this.jobManager == null)
            {
                this.Log(DiagnosisMessage.Importance.Tracing, "Could not find job manager vertex information", "");
                return(Decision.Dontknow);
            }

            IClusterResidentObject jmstdout = this.jobManager.StdoutFile;

            if (jmstdout.Exception != null)
            {
                this.Log(DiagnosisMessage.Importance.Tracing, "Could not find job manager standard output", "");
                return(Decision.Dontknow);
            }

            ISharedStreamReader sr = jmstdout.GetStream();

            if (sr.Exception != null)
            {
                this.Log(DiagnosisMessage.Importance.Tracing, "Could not read job manager standard output", sr.Exception.Message);
                return(Decision.Dontknow);
            }
            string firstline = sr.ReadLine();

            if (sr.EndOfStream || firstline == null)
            {
                sr.Close();
                return(Decision.No);
            }
            sr.Close();

            if (firstline.Contains("Error parsing input XML file"))
            {
                this.Log(DiagnosisMessage.Importance.Final, "The job manager cannot parse the XML plan file.\n",
                         "This means probably that the version of LinqToDryad.dll that you are using does not match the XmlExecHost.exe file from your drop.");
                return(Decision.Yes);
            }
            return(Decision.No);
        }
예제 #3
0
        /// <summary>
        /// Detect whether vertex terminates with a stack overflow.
        /// </summary>
        /// <returns>True if this seems likely.</returns>
        protected virtual Decision StackOverflow()
        {
            IClusterResidentObject stdout = this.Job.ClusterConfiguration.ProcessStdoutFile(this.Vertex.ProcessIdentifier, this.Vertex.VertexIsCompleted, this.Vertex.Machine, this.Job.Summary);

            if (stdout.Exception != null)
            {
                return(Decision.Dontknow);
            }
            ISharedStreamReader sr = stdout.GetStream();

            while (!sr.EndOfStream)
            {
                string line = sr.ReadLine();
                if (line.Contains("StackOverflowException"))
                {
                    this.Log(DiagnosisMessage.Importance.Final, "Error found in vertex stderr:", line);
                    sr.Close();
                    return(Decision.Yes);
                }
            }
            sr.Close();
            return(Decision.Dontknow);
        }
예제 #4
0
        /// <summary>
        /// Load a specified file.
        /// </summary>
        /// <param name="file">File to load.</param>
        public void LoadFile(IClusterResidentObject file)
        {
            string filename = file.Name;

            bool   text         = true;
            string basefilename = Path.GetFileName(filename);

            if (basefilename != null && (basefilename.EndsWith(".log") && basefilename.StartsWith("cosmos")))
            {
                text = false;
            }

            long len = file.Size;

            this.Initialize(text, basefilename);
            //ISharedStreamReader sr = new FileSharedStreamReader(filename);
            ISharedStreamReader sr = file.GetStream(false);
            long lineno            = 0;
            long bytes             = 0;

            List <TextFileLine>            toAddText = new List <TextFileLine>();
            List <PositionedDryadLogEntry> toAddLog  = new List <PositionedDryadLogEntry>();

            while (!sr.EndOfStream)
            {
                string line = sr.ReadLine();
                bytes += line.Length;
                if (this.shownText != null)
                {
                    toAddText.Add(new TextFileLine(lineno, line));
                }
                else
                {
                    PositionedDryadLogEntry cle = new PositionedDryadLogEntry(filename, lineno, line);
                    if (cle.Malformed)
                    {
                        Trace.TraceInformation("Malformed log entry: " + cle.OriginalLogLine);
                    }
                    else
                    {
                        toAddLog.Add(cle);
                    }
                }
                if (lineno++ % 100 == 0 && len > 0)
                {
                    this.UpdateProgress((int)(bytes * 100 / len));
                }
            }

            if (this.shownText != null)
            {
                this.shownText.SetItems(toAddText);
            }
            else
            {
                this.shownLogLines.SetItems(toAddLog);
            }
            this.Status("Loaded " + lineno + " lines.", StatusKind.OK);
            this.UpdateProgress(100);
            sr.Close();
            this.filteredDataGridView.DataGridView.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.DisplayedCellsExceptHeader);
        }