⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 286128 in webkit


Ignore:
Timestamp:
Nov 23, 2021, 12:57:03 AM (5 years ago)
Author:
Angelos Oikonomopoulos
Message:

Fix buildbot command timeout issue for remote tests
https://bugs.webkit.org/show_bug.cgi?id=233309

Reviewed by Adrian Perez de Castro.

Occasionally, buildbots that execute the JSC tests on remote devices
would stop producing any output and eventually get killed due to a timeout.

The issue is that run-jsc-stress-tests would start an ssh command
(overwhelmingly likely, the command to copy over the payload), then the remote
board would stop responding.

Introduce a timeout option to forEachRemote and bound the waiting time.
Could also do this for each command individually (and this would make it
straightforward to GC zombie processes) but seems way more fragile than
doing it at the thread level.

  • Scripts/run-jsc-stress-tests:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r286125 r286128  
     12021-11-23  Angelos Oikonomopoulos  <angelos@igalia.com>
     2
     3        Fix buildbot command timeout issue for remote tests
     4        https://bugs.webkit.org/show_bug.cgi?id=233309
     5
     6        Reviewed by Adrian Perez de Castro.
     7
     8        Occasionally, buildbots that execute the JSC tests on remote devices
     9        would stop producing any output and eventually get killed due to a timeout.
     10
     11        The issue is that run-jsc-stress-tests would start an ssh command
     12        (overwhelmingly likely, the command to copy over the payload), then the remote
     13        board would stop responding.
     14
     15        Introduce a timeout option to forEachRemote and bound the waiting time.
     16        Could also do this for each command individually (and this would make it
     17        straightforward to GC zombie processes) but seems way more fragile than
     18        doing it at the thread level.
     19
     20        * Scripts/run-jsc-stress-tests:
     21
    1222021-11-22  Wenson Hsieh  <wenson_hsieh@apple.com>
    223
  • trunk/Tools/Scripts/run-jsc-stress-tests

    r286109 r286128  
    8282                                  :iterationsCeiling => 10)
    8383
     84REMOTE_TIMEOUT = 120
    8485begin
    8586    require 'shellwords'
     
    26022603    }
    26032604
     2605    etime = nil
     2606    if options.has_key?(:timeout)
     2607        etime = Time.now + options[:timeout]
     2608    end
    26042609    liveRemotes = []
    26052610    threads.each_index {
     
    26072612        thread = threads[index]
    26082613        begin
    2609             thread.join
     2614            if options.has_key?(:timeout)
     2615                if etime.nil?
     2616                    # If a timeout has been requested and etime is nil,
     2617                    # that means the timeout has expired and we shouldn't
     2618                    # wait at all.
     2619                    timeout = 0
     2620                else
     2621                    timeout = etime - Time.now
     2622                    if timeout < 0
     2623                        timeout = 0
     2624                    end
     2625                end
     2626                if thread.join(timeout).nil?
     2627                    if $verbosity > 0
     2628                        $stderr.puts("Timeout joining thread for remote #{remoteHosts[index]}")
     2629                    end
     2630                    # Timeout expired, so we can't block waiting for
     2631                    # any other threads. Either they're done or
     2632                    # they've also timed out.
     2633                    etime = nil
     2634                    raise CommandExecutionFailed
     2635                end
     2636            else
     2637                thread.join # No timeout requested, just block.
     2638            end
    26102639            liveRemotes << remoteHosts[index]
    26112640        rescue CommandExecutionFailed
     
    26952724
    26962725def unpackBundleGnuParallel(remoteHosts)
    2697     forEachRemote(remoteHosts, :dropOnFailure => true) {
     2726    forEachRemote(remoteHosts, :dropOnFailure => true, :timeout => REMOTE_TIMEOUT) {
    26982727        | _, remoteHost |
    26992728        mysys(["ssh", "-o", "NoHostAuthenticationForLocalhost=yes"] +
     
    28642893        # iteration, we'll try to run test jobs on it, possibly using
    28652894        # an unrelated bundle from a previous run.
    2866         remoteHosts = forEachRemote(remoteHosts, {:dropOnFailure => true}) {
     2895        remoteHosts = forEachRemote(remoteHosts, {:dropOnFailure => true, :timeout => REMOTE_TIMEOUT}) {
    28672896            | _, remoteHost |
    28682897            getRemoteDirectoryIfNeeded(remoteHost)
Note: See TracChangeset for help on using the changeset viewer.