Closed Bug 1059788 Opened 9 years ago Closed 9 years ago

Log parser doesn't truncate extreme length log lines when extracting errors & search terms


(Tree Management :: Treeherder, defect, P2)



(Not tracked)



(Reporter: emorley, Assigned: KWierso, Mentored)




(Whiteboard: [good first bug])


(1 file)

TBPL truncates extreme length log lines, when extracting the error lines from the log, ie:
    $maxLineLength = 500;
    $canTruncate = ($type != "tinderbox_print" && $type != "reftest");
      if ($canTruncate && strlen($matchedline) > $maxLineLength) {
        // Cap the line length to avoid hanging the browser in extreme cases.
        $matchedline = rtrim(substr($matchedline, 0, $maxLineLength)) . "... [exceeded max length]\n";

In addition, the search term length is capped:
    // Searching for extremely long search terms is undesirable, since:
    // a) We end up spamming Bugzilla's REST API.
    // b) Bugzilla's max summary length is 256 characters, and once "Intermittent "
    // and platform/suite information is prefixed, there are even fewer characters
    // left for us to use for the failure string against which we need to match.
    // c) For long search terms, the additional length does little to prevent against
    // false positives, but means we're more susceptible to false negatives due to
    // run-to-run variances in the error messages (eg paths, process IDs).
    $searchTerm = trim(substr($searchTerm, 0, 100));

The former protects against UI hangs & helps with readability of failure summaries in the UI. The latter improves bug suggestions.
Blocks: 1057359
Mentor: cdawson
Whiteboard: [good first bug]
I think we may already do the first part of comment 0:

Though we'll need to check whether the implementation there impacts the reftest analyser (TBPL excludes these failure lines from truncation - bug 1001441).
Whether this bug blocks or not comes down to whether treeherder can offer bug suggestions for these top-oranges that I suspect might only be caught with a reduced search term (need to double check):

bug 1051908
bug 1054456
bug 1059287
I don't know python, but I think this might possibly limit the search terms to 100 characters.
Attachment #8486789 - Flags: feedback?(emorley)
Attachment #8486789 - Flags: feedback?(cdawson)
Attachment #8486789 - Flags: feedback?(cdawson) → feedback+
Attachment #8486789 - Flags: feedback?(emorley) → feedback+
Assignee: nobody → kwierso
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.