[Webkit-unassigned] [Bug 15743] run-webkit-tests hangs when WebCore tries to log too much

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 18 09:17:11 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=15743


David Kilzer (ddkilzer) <ddkilzer at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #35030|review?                     |review-
               Flag|                            |




--- Comment #6 from David Kilzer (ddkilzer) <ddkilzer at webkit.org>  2009-08-18 09:17:09 PDT ---
(From update of attachment 35030)
I do think the original issue may have been blocked write(2) calls due to too
much STDERR output.  Do you have an easy way to reproduce this?  Can you just
add a "fprintf(stderr, "Blah\n");" to a function in WebKit that's called a lot
to see the bad behavior?

Overall, this change looks good, but I have a couple of concerns.

> @@ -1984,14 +1985,16 @@ sub readFromDumpToolWithTimer(*;$)
>              last;
>          }
>  
> -        my $line = readline($fh);
> -        if (!defined($line)) {
> +        # Once we've seen the EOF, we must not read anymore.
> +        my $lineIn = readline($fhIn) unless $haveSeenEof;
> +        my $lineError = readline($fhError);

It's an interesting strategy to read a line of STDERR with a line of STDOUT
from DumpRenderTree, but what guarantees that all of STDERR is read before
going to the next test?  Would reading all STDERR each time work as well?

    my $lineError = <$fhError>;

> @@ -2001,20 +2004,29 @@ sub readFromDumpToolWithTimer(*;$)
>          }
>  
>          $timeOfLastSuccessfulRead = time;
> -        
> -        if (!$haveSeenContentType && $line =~ /^Content-Type: (\S+)$/) {
> -            $mimeType = $1;
> -            $haveSeenContentType = 1;
> -            next;
> +
> +        if (defined($lineIn)) {
> +            if (!$haveSeenContentType && $lineIn =~ /^Content-Type: (\S+)$/) {
> +                $mimeType = $1;
> +                $haveSeenContentType = 1;
> +                next;
> +            }
> +
> +            if ($lineIn =~ /#EOF/) {
> +                $haveSeenEof = 1;
> +                next;
> +            }
> +
> +            push @output, $lineIn;
>          }
> -        last  if ($line =~ /#EOF/);
> -        
> -        push @output, $line;
> +        push @error, $lineError if defined($lineError);
>      }

If any STDERR is printed at the same time as the "Content-Type" line or the
"#EOF" line, it appears that whatever is in $lineError will be discarded.  I
think the logic here should be restructured to use if () {} elif () {} else {}
within if (defined($lineIn)) so that $lineError always gets appended to @error
if it's defined.

r- to address the above issues.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list