Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[grid] detect a client timeout while session creation #14743 #14756

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

joerg1985
Copy link
Member

@joerg1985 joerg1985 commented Nov 14, 2024

User description

Description

This PR will ensure a client timeout will not lead to a session waiting for the session timeout.
The timeout check has been removed from the complete method, to return the session as long as the client is still listening for the response.

Motivation and Context

Does fix #14743

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

Bug fix, Tests


Description

  • Improved session handling by terminating invalid sessions to prevent stale sessions.
  • Enhanced session queue logic to cancel sessions that are not visible to the client.
  • Added a new test to ensure client timeouts do not result in browser session leaks.
  • Updated Bazel build configuration to include the new distributed test.

Changes walkthrough 📝

Relevant files
Bug fix
LocalDistributor.java
Improve session validation and termination logic                 

java/src/org/openqa/selenium/grid/distributor/local/LocalDistributor.java

  • Improved session validation by terminating invalid sessions.
  • Removed comments related to session timeout handling.
  • +1/-4     
    LocalNewSessionQueue.java
    Enhance session cancellation and completion logic               

    java/src/org/openqa/selenium/grid/sessionqueue/local/LocalNewSessionQueue.java

  • Added logic to cancel sessions that will not be seen by the client.
  • Refactored session completion logic to handle cancellations.
  • Updated comments to reflect changes in session validation.
  • +19/-22 
    Tests
    DistributedTest.java
    Add test for client timeout handling in distributed grid 

    java/test/org/openqa/selenium/grid/router/DistributedTest.java

  • Added a new test to verify client timeout handling.
  • Ensured no browser session leaks occur during client timeout.
  • +199/-0 
    Configuration changes
    BUILD.bazel
    Update Bazel build to include new distributed test             

    java/test/org/openqa/selenium/grid/router/BUILD.bazel

    • Included DistributedTest.java in the list of large tests.
    +1/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Race Condition
    The session cancellation logic may have a race condition between checking if session is complete/canceled and setting the result. Consider using atomic operations or additional synchronization.

    Test Reliability
    The test relies on timing assumptions and thread sleeps which could make it flaky. Consider using more deterministic synchronization mechanisms.

    Copy link
    Contributor

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Add timeout mechanism to prevent indefinite waiting for results

    Consider adding a timeout parameter to the getResult() method to prevent indefinite
    waiting and potential deadlocks.

    java/src/org/openqa/selenium/grid/sessionqueue/local/LocalNewSessionQueue.java [467-469]

    -public synchronized Either<SessionNotCreatedException, CreateSessionResponse> getResult() {
    +public synchronized Either<SessionNotCreatedException, CreateSessionResponse> getResult(Duration timeout) throws InterruptedException {
    +  if (!latch.await(timeout.toMillis(), TimeUnit.MILLISECONDS)) {
    +    throw new SessionNotCreatedException("Timeout waiting for session result");
    +  }
       return result;
     }
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: This is a significant improvement that would prevent potential deadlocks and system hangs by adding timeout control. Given that the PR focuses on session timeout handling, this enhancement aligns well with the overall changes.

    8
    Enhancement
    Improve thread safety and observability of session cancellation state

    Add synchronization to the cancel() method to ensure thread-safe access to the
    canceled flag, and consider adding a getter method to check the cancellation status.

    java/src/org/openqa/selenium/grid/sessionqueue/local/LocalNewSessionQueue.java [471-473]

     public synchronized void cancel() {
       canceled = true;
    +  latch.countDown(); // Release any waiting threads
     }
     
    +public synchronized boolean isCanceled() {
    +  return canceled;
    +}
    +
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion improves thread safety by adding latch.countDown() to prevent waiting threads from hanging, and adds a useful isCanceled() method for state checking. These changes would help prevent potential deadlocks and improve code maintainability.

    7
    Maintainability
    Add logging to track session cancellation events

    Consider adding logging statements when a session is canceled to help with debugging
    and monitoring system behavior.

    java/src/org/openqa/selenium/grid/sessionqueue/local/LocalNewSessionQueue.java [471-473]

     public synchronized void cancel() {
       canceled = true;
    +  LOG.log(Level.INFO, "Session request has been canceled");
     }
    • Apply this suggestion
    Suggestion importance[1-10]: 4

    Why: While adding logging for session cancellation would improve debugging capabilities, it's a relatively minor enhancement that doesn't affect core functionality. The PR already includes similar logging patterns for other events.

    4

    💡 Need additional feedback ? start a PR chat

    Copy link
    Contributor

    CI Failure Feedback 🧐

    Action: Ruby / Local Tests (chrome, windows) / Local Tests (chrome, windows)

    Failed stage: Run Bazel [❌]

    Failed test name: Selenium::WebDriver::Chrome::Driver PrintsPage

    Failure summary:

    The action failed because the test Selenium::WebDriver::Chrome::Driver PrintsPage encountered
    multiple failures due to timeout errors. Specifically:

  • The test returns base64 for print command failed because it timed out while waiting for a message
    from the renderer.
  • The test prints with valid params failed due to a timeout error while executing a print command with
    specific parameters.
  • The test saves pdf failed because it timed out while attempting to save a print page as a PDF.
    All
    these failures were caused by Selenium::WebDriver::Error::TimeoutError, indicating that the
    operations exceeded the allowed time limit.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Microsoft Windows Server 2022
    ...
    
    727:  �[32m[1,882 / 1,900]�[0m 7 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:window-chrome; 6s local, disk-cache ... (4 actions, 2 running)
    728:  �[32m[1,883 / 1,900]�[0m 8 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:element-chrome; 6s disk-cache ... (4 actions, 1 running)
    729:  �[32m[1,883 / 1,900]�[0m 8 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:element-chrome; 16s disk-cache ... (4 actions, 1 running)
    730:  �[32m[1,883 / 1,900]�[0m 8 / 31 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 14s ... (4 actions, 1 running)
    731:  �[32m[1,883 / 1,900]�[0m 8 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:target_locator-chrome; 15s local, disk-cache ... (4 actions, 2 running)
    732:  �[32m[1,884 / 1,900]�[0m 9 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/remote:driver-chrome; 15s disk-cache ... (4 actions, 1 running)
    733:  �[32m[1,884 / 1,900]�[0m 9 / 31 tests;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/remote:element-chrome; 7s ... (4 actions, 1 running)
    734:  �[32m[1,884 / 1,900]�[0m 9 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:fedcm-chrome; 7s local, disk-cache ... (4 actions, 2 running)
    735:  �[32m[1,885 / 1,900]�[0m 10 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:error-chrome; 7s disk-cache ... (4 actions, 1 running)
    736:  �[32m[1,885 / 1,900]�[0m 10 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:error-chrome; 14s disk-cache ... (4 actions, 2 running)
    737:  �[32m[1,886 / 1,900]�[0m 11 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:error-chrome; 15s disk-cache ... (4 actions, 1 running)
    738:  �[32m[1,886 / 1,900]�[0m 11 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver:error-chrome; 16s disk-cache ... (4 actions, 1 running)
    ...
    
    787:  �[32m[1,897 / 1,900]�[0m 22 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/chrome:driver-chrome; 295s local, disk-cache ... (3 actions, 2 running)
    788:  �[32m[1,897 / 1,900]�[0m 22 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/chrome:driver-chrome; 299s local, disk-cache ... (3 actions, 2 running)
    789:  �[32m[1,898 / 1,900]�[0m 23 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/chrome:driver-chrome; 301s local, disk-cache ... (2 actions, 1 running)
    790:  �[32m[1,898 / 1,900]�[0m 23 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/chrome:driver-chrome; 311s local, disk-cache ... (2 actions, 1 running)
    791:  �[32m[1,898 / 1,900]�[0m 23 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/chrome:driver-chrome; 341s local, disk-cache ... (2 actions, 1 running)
    792:  �[32m[1,898 / 1,900]�[0m 23 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/chrome:driver-chrome; 401s local, disk-cache ... (2 actions, 1 running)
    793:  �[32m[1,898 / 1,900]�[0m 23 / 31 tests;�[0m Testing //rb/spec/integration/selenium/webdriver/chrome:driver-chrome; 429s local, disk-cache ... (2 actions running)
    794:  �[31m�[1mFAIL: �[0m//rb/spec/integration/selenium/webdriver/chrome:driver-chrome (see D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/chrome/driver-chrome/test.log)
    795:  �[31m�[1mFAILED: �[0m//rb/spec/integration/selenium/webdriver/chrome:driver-chrome (Summary)
    ...
    
    810:  gets and sets network conditions
    811:  sets download path
    812:  can execute CDP commands
    813:  manages network features
    814:  casts
    815:  can set single permissions
    816:  can set multiple permissions
    817:  PrintsPage
    818:  returns base64 for print command (FAILED - 1)
    819:  prints with valid params (FAILED - 2)
    820:  saves pdf (FAILED - 3)
    821:  #logs
    822:  can fetch available log types
    823:  can get the browser log
    824:  can get the driver log
    825:  can get the performance log
    826:  Failures:
    827:  1) Selenium::WebDriver::Chrome::Driver PrintsPage returns base64 for print command
    828:  Failure/Error: expect(driver.print_page).to include(magic_number)
    829:  Selenium::WebDriver::Error::TimeoutError:
    830:  timeout: Timed out receiving message from renderer: 10.000
    831:  (Session info: chrome=131.0.6778.69)
    832:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    833:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    838:  # ./rb/lib/selenium/webdriver/remote/http/default.rb:103:in `request'
    839:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:68:in `call'
    840:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
    841:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:421:in `print_page'
    842:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:54:in `print_page'
    843:  # ./rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb:67:in `block (3 levels) in <module:Chrome>'
    844:  # ------------------
    845:  # --- Caused by: ---
    846:  # Selenium::WebDriver::Error::WebDriverError:
    ...
    
    864:  GetHandleVerifier [0x00007FF7B591929B+842635]
    865:  (No symbol) [0x00007FF7B57C654F]
    866:  (No symbol) [0x00007FF7B57C1FA4]
    867:  (No symbol) [0x00007FF7B57C213D]
    868:  (No symbol) [0x00007FF7B57B1629]
    869:  BaseThreadInitThunk [0x00007FFA6B794CB0+16]
    870:  RtlUserThreadStart [0x00007FFA6D5DECDB+43]
    871:  2) Selenium::WebDriver::Chrome::Driver PrintsPage prints with valid params
    872:  Failure/Error:
    873:  expect(driver.print_page(orientation: 'landscape',
    874:  page_ranges: ['1-2'],
    875:  page: {width: 30})).to include(magic_number)
    876:  Selenium::WebDriver::Error::TimeoutError:
    877:  timeout: Timed out receiving message from renderer: 10.000
    878:  (Session info: chrome=131.0.6778.69)
    879:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    880:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    885:  # ./rb/lib/selenium/webdriver/remote/http/default.rb:103:in `request'
    886:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:68:in `call'
    887:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
    888:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:421:in `print_page'
    889:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:54:in `print_page'
    890:  # ./rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb:72:in `block (3 levels) in <module:Chrome>'
    891:  # ------------------
    892:  # --- Caused by: ---
    893:  # Selenium::WebDriver::Error::WebDriverError:
    ...
    
    911:  GetHandleVerifier [0x00007FF7B591929B+842635]
    912:  (No symbol) [0x00007FF7B57C654F]
    913:  (No symbol) [0x00007FF7B57C1FA4]
    914:  (No symbol) [0x00007FF7B57C213D]
    915:  (No symbol) [0x00007FF7B57B1629]
    916:  BaseThreadInitThunk [0x00007FFA6B794CB0+16]
    917:  RtlUserThreadStart [0x00007FFA6D5DECDB+43]
    918:  3) Selenium::WebDriver::Chrome::Driver PrintsPage saves pdf
    919:  Failure/Error: driver.save_print_page path
    920:  Selenium::WebDriver::Error::TimeoutError:
    921:  timeout: Timed out receiving message from renderer: 10.000
    922:  (Session info: chrome=131.0.6778.69)
    923:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    924:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    932:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:421:in `print_page'
    933:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:54:in `print_page'
    934:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:37:in `block in save_print_page'
    935:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:36:in `open'
    936:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:36:in `save_print_page'
    937:  # ./rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb:82:in `block (3 levels) in <module:Chrome>'
    938:  # ------------------
    939:  # --- Caused by: ---
    940:  # Selenium::WebDriver::Error::WebDriverError:
    ...
    
    958:  GetHandleVerifier [0x00007FF7B591929B+842635]
    959:  (No symbol) [0x00007FF7B57C654F]
    960:  (No symbol) [0x00007FF7B57C1FA4]
    961:  (No symbol) [0x00007FF7B57C213D]
    962:  (No symbol) [0x00007FF7B57B1629]
    963:  BaseThreadInitThunk [0x00007FFA6B794CB0+16]
    964:  RtlUserThreadStart [0x00007FFA6D5DECDB+43]
    965:  Finished in 2 minutes 7.5 seconds (files took 1.38 seconds to load)
    966:  14 examples, 3 failures
    967:  Failed examples:
    ...
    
    982:  gets and sets network conditions
    983:  sets download path
    984:  can execute CDP commands
    985:  manages network features
    986:  casts
    987:  can set single permissions
    988:  can set multiple permissions
    989:  PrintsPage
    990:  returns base64 for print command (FAILED - 1)
    991:  prints with valid params (FAILED - 2)
    992:  saves pdf (FAILED - 3)
    993:  #logs
    994:  can fetch available log types
    995:  can get the browser log
    996:  can get the driver log
    997:  can get the performance log
    998:  Failures:
    999:  1) Selenium::WebDriver::Chrome::Driver PrintsPage returns base64 for print command
    1000:  Failure/Error: expect(driver.print_page).to include(magic_number)
    1001:  Selenium::WebDriver::Error::TimeoutError:
    1002:  timeout: Timed out receiving message from renderer: 10.000
    1003:  (Session info: chrome=131.0.6778.69)
    1004:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    1005:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    1010:  # ./rb/lib/selenium/webdriver/remote/http/default.rb:103:in `request'
    1011:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:68:in `call'
    1012:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
    1013:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:421:in `print_page'
    1014:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:54:in `print_page'
    1015:  # ./rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb:67:in `block (3 levels) in <module:Chrome>'
    1016:  # ------------------
    1017:  # --- Caused by: ---
    1018:  # Selenium::WebDriver::Error::WebDriverError:
    ...
    
    1036:  GetHandleVerifier [0x00007FF7B591929B+842635]
    1037:  (No symbol) [0x00007FF7B57C654F]
    1038:  (No symbol) [0x00007FF7B57C1FA4]
    1039:  (No symbol) [0x00007FF7B57C213D]
    1040:  (No symbol) [0x00007FF7B57B1629]
    1041:  BaseThreadInitThunk [0x00007FFA6B794CB0+16]
    1042:  RtlUserThreadStart [0x00007FFA6D5DECDB+43]
    1043:  2) Selenium::WebDriver::Chrome::Driver PrintsPage prints with valid params
    1044:  Failure/Error:
    1045:  expect(driver.print_page(orientation: 'landscape',
    1046:  page_ranges: ['1-2'],
    1047:  page: {width: 30})).to include(magic_number)
    1048:  Selenium::WebDriver::Error::TimeoutError:
    1049:  timeout: Timed out receiving message from renderer: 10.000
    1050:  (Session info: chrome=131.0.6778.69)
    1051:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    1052:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    1057:  # ./rb/lib/selenium/webdriver/remote/http/default.rb:103:in `request'
    1058:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:68:in `call'
    1059:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
    1060:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:421:in `print_page'
    1061:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:54:in `print_page'
    1062:  # ./rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb:72:in `block (3 levels) in <module:Chrome>'
    1063:  # ------------------
    1064:  # --- Caused by: ---
    1065:  # Selenium::WebDriver::Error::WebDriverError:
    ...
    
    1083:  GetHandleVerifier [0x00007FF7B591929B+842635]
    1084:  (No symbol) [0x00007FF7B57C654F]
    1085:  (No symbol) [0x00007FF7B57C1FA4]
    1086:  (No symbol) [0x00007FF7B57C213D]
    1087:  (No symbol) [0x00007FF7B57B1629]
    1088:  BaseThreadInitThunk [0x00007FFA6B794CB0+16]
    1089:  RtlUserThreadStart [0x00007FFA6D5DECDB+43]
    1090:  3) Selenium::WebDriver::Chrome::Driver PrintsPage saves pdf
    1091:  Failure/Error: driver.save_print_page path
    1092:  Selenium::WebDriver::Error::TimeoutError:
    1093:  timeout: Timed out receiving message from renderer: 10.000
    1094:  (Session info: chrome=131.0.6778.69)
    1095:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    1096:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    1104:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:421:in `print_page'
    1105:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:54:in `print_page'
    1106:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:37:in `block in save_print_page'
    1107:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:36:in `open'
    1108:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:36:in `save_print_page'
    1109:  # ./rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb:82:in `block (3 levels) in <module:Chrome>'
    1110:  # ------------------
    1111:  # --- Caused by: ---
    1112:  # Selenium::WebDriver::Error::WebDriverError:
    ...
    
    1130:  GetHandleVerifier [0x00007FF7B591929B+842635]
    1131:  (No symbol) [0x00007FF7B57C654F]
    1132:  (No symbol) [0x00007FF7B57C1FA4]
    1133:  (No symbol) [0x00007FF7B57C213D]
    1134:  (No symbol) [0x00007FF7B57B1629]
    1135:  BaseThreadInitThunk [0x00007FFA6B794CB0+16]
    1136:  RtlUserThreadStart [0x00007FFA6D5DECDB+43]
    1137:  Finished in 2 minutes 7.6 seconds (files took 1.5 seconds to load)
    1138:  14 examples, 3 failures
    1139:  Failed examples:
    ...
    
    1154:  gets and sets network conditions
    1155:  sets download path
    1156:  can execute CDP commands
    1157:  manages network features
    1158:  casts
    1159:  can set single permissions
    1160:  can set multiple permissions
    1161:  PrintsPage
    1162:  returns base64 for print command (FAILED - 1)
    1163:  prints with valid params (FAILED - 2)
    1164:  saves pdf (FAILED - 3)
    1165:  #logs
    1166:  can fetch available log types
    1167:  can get the browser log
    1168:  can get the driver log
    1169:  can get the performance log
    1170:  Failures:
    1171:  1) Selenium::WebDriver::Chrome::Driver PrintsPage returns base64 for print command
    1172:  Failure/Error: expect(driver.print_page).to include(magic_number)
    1173:  Selenium::WebDriver::Error::TimeoutError:
    1174:  timeout: Timed out receiving message from renderer: 10.000
    1175:  (Session info: chrome=131.0.6778.69)
    1176:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    1177:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    1182:  # ./rb/lib/selenium/webdriver/remote/http/default.rb:103:in `request'
    1183:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:68:in `call'
    1184:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
    1185:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:421:in `print_page'
    1186:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:54:in `print_page'
    1187:  # ./rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb:67:in `block (3 levels) in <module:Chrome>'
    1188:  # ------------------
    1189:  # --- Caused by: ---
    1190:  # Selenium::WebDriver::Error::WebDriverError:
    ...
    
    1208:  GetHandleVerifier [0x00007FF7B591929B+842635]
    1209:  (No symbol) [0x00007FF7B57C654F]
    1210:  (No symbol) [0x00007FF7B57C1FA4]
    1211:  (No symbol) [0x00007FF7B57C213D]
    1212:  (No symbol) [0x00007FF7B57B1629]
    1213:  BaseThreadInitThunk [0x00007FFA6B794CB0+16]
    1214:  RtlUserThreadStart [0x00007FFA6D5DECDB+43]
    1215:  2) Selenium::WebDriver::Chrome::Driver PrintsPage prints with valid params
    1216:  Failure/Error:
    1217:  expect(driver.print_page(orientation: 'landscape',
    1218:  page_ranges: ['1-2'],
    1219:  page: {width: 30})).to include(magic_number)
    1220:  Selenium::WebDriver::Error::TimeoutError:
    1221:  timeout: Timed out receiving message from renderer: 10.000
    1222:  (Session info: chrome=131.0.6778.69)
    1223:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    1224:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    1229:  # ./rb/lib/selenium/webdriver/remote/http/default.rb:103:in `request'
    1230:  # ./rb/lib/selenium/webdriver/remote/http/common.rb:68:in `call'
    1231:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:685:in `execute'
    1232:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:421:in `print_page'
    1233:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:54:in `print_page'
    1234:  # ./rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb:72:in `block (3 levels) in <module:Chrome>'
    1235:  # ------------------
    1236:  # --- Caused by: ---
    1237:  # Selenium::WebDriver::Error::WebDriverError:
    ...
    
    1255:  GetHandleVerifier [0x00007FF7B591929B+842635]
    1256:  (No symbol) [0x00007FF7B57C654F]
    1257:  (No symbol) [0x00007FF7B57C1FA4]
    1258:  (No symbol) [0x00007FF7B57C213D]
    1259:  (No symbol) [0x00007FF7B57B1629]
    1260:  BaseThreadInitThunk [0x00007FFA6B794CB0+16]
    1261:  RtlUserThreadStart [0x00007FFA6D5DECDB+43]
    1262:  3) Selenium::WebDriver::Chrome::Driver PrintsPage saves pdf
    1263:  Failure/Error: driver.save_print_page path
    1264:  Selenium::WebDriver::Error::TimeoutError:
    1265:  timeout: Timed out receiving message from renderer: 10.000
    1266:  (Session info: chrome=131.0.6778.69)
    1267:  # ./rb/lib/selenium/webdriver/remote/response.rb:63:in `add_cause'
    1268:  # ./rb/lib/selenium/webdriver/remote/response.rb:41:in `error'
    ...
    
    1276:  # ./rb/lib/selenium/webdriver/remote/bridge.rb:421:in `print_page'
    1277:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:54:in `print_page'
    1278:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:37:in `block in save_print_page'
    1279:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:36:in `open'
    1280:  # ./rb/lib/selenium/webdriver/common/driver_extensions/prints_page.rb:36:in `save_print_page'
    1281:  # ./rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb:82:in `block (3 levels) in <module:Chrome>'
    1282:  # ------------------
    1283:  # --- Caused by: ---
    1284:  # Selenium::WebDriver::Error::WebDriverError:
    ...
    
    1302:  GetHandleVerifier [0x00007FF7B591929B+842635]
    1303:  (No symbol) [0x00007FF7B57C654F]
    1304:  (No symbol) [0x00007FF7B57C1FA4]
    1305:  (No symbol) [0x00007FF7B57C213D]
    1306:  (No symbol) [0x00007FF7B57B1629]
    1307:  BaseThreadInitThunk [0x00007FFA6B794CB0+16]
    1308:  RtlUserThreadStart [0x00007FFA6D5DECDB+43]
    1309:  Finished in 2 minutes 7.5 seconds (files took 0.94232 seconds to load)
    1310:  14 examples, 3 failures
    1311:  Failed examples:
    1312:  rspec ./rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb:65 # Selenium::WebDriver::Chrome::Driver PrintsPage returns base64 for print command
    1313:  rspec ./rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb:70 # Selenium::WebDriver::Chrome::Driver PrintsPage prints with valid params
    1314:  rspec ./rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb:77 # Selenium::WebDriver::Chrome::Driver PrintsPage saves pdf
    1315:  ================================================================================
    1316:  �[32m[1,899 / 1,900]�[0m 24 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:element-chrome; 1s local, disk-cache
    1317:  �[32m[1,899 / 1,900]�[0m 24 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:element-chrome; 11s local, disk-cache
    1318:  �[32m[1,899 / 1,900]�[0m 24 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:element-chrome; 15s local, disk-cache
    1319:  �[32m[1,900 / 1,901]�[0m 25 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-chrome; 0s disk-cache
    1320:  �[32m[1,900 / 1,901]�[0m 25 / 31 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:script-chrome
    1321:  �[32m[1,900 / 1,901]�[0m 25 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-chrome; 1s local, disk-cache
    1322:  �[32m[1,900 / 1,901]�[0m 25 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:script-chrome; 3s local, disk-cache
    1323:  �[32m[1,901 / 1,902]�[0m 26 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-chrome; 0s disk-cache
    1324:  �[32m[1,901 / 1,902]�[0m 26 / 31 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:bidi-chrome
    1325:  �[32m[1,901 / 1,902]�[0m 26 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-chrome; 1s local, disk-cache
    1326:  �[32m[1,901 / 1,902]�[0m 26 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:bidi-chrome; 3s local, disk-cache
    1327:  �[32m[1,902 / 1,903]�[0m 27 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-chrome; 0s disk-cache
    1328:  �[32m[1,902 / 1,903]�[0m 27 / 31 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-chrome
    1329:  �[32m[1,902 / 1,903]�[0m 27 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-chrome; 1s local, disk-cache
    1330:  �[32m[1,902 / 1,903]�[0m 27 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:browsing_context-chrome; 3s local, disk-cache
    1331:  �[32m[1,903 / 1,904]�[0m 28 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:network-chrome; 1s disk-cache
    1332:  �[32m[1,903 / 1,904]�[0m 28 / 31 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:network-chrome
    1333:  �[32m[1,903 / 1,904]�[0m 28 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:network-chrome; 1s local, disk-cache
    1334:  �[32m[1,903 / 1,904]�[0m 28 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:network-chrome; 3s local, disk-cache
    1335:  �[32m[1,904 / 1,905]�[0m 29 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-chrome; 0s disk-cache
    1336:  �[32m[1,904 / 1,905]�[0m 29 / 31 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver:devtools-chrome
    1337:  �[32m[1,904 / 1,905]�[0m 29 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-chrome; 1s local, disk-cache
    1338:  �[32m[1,904 / 1,905]�[0m 29 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver:devtools-chrome; 137s local, disk-cache
    1339:  �[32m[1,905 / 1,906]�[0m 30 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-chrome; 0s disk-cache
    1340:  �[32m[1,905 / 1,906]�[0m 30 / 31 tests, �[31m�[1m1 failed�[0m;�[0m [Sched] Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-chrome
    1341:  �[32m[1,905 / 1,906]�[0m 30 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-chrome; 1s local, disk-cache
    1342:  �[32m[1,905 / 1,906]�[0m 30 / 31 tests, �[31m�[1m1 failed�[0m;�[0m Testing //rb/spec/integration/selenium/webdriver/bidi:log_inspector-chrome; 3s local, disk-cache
    1343:  �[32mINFO: �[0mFound 31 test targets...
    1344:  �[32mINFO: �[0mElapsed time: 1381.807s, Critical Path: 848.47s
    1345:  �[32mINFO: �[0m1906 processes: 982 disk cache hit, 845 internal, 79 local.
    1346:  �[32mINFO: �[0mBuild completed, 1 test FAILED, 1906 total actions
    1347:  //rb/spec/integration/selenium/webdriver:action_builder-chrome           �[0m�[32mPASSED�[0m in 18.6s
    1348:  //rb/spec/integration/selenium/webdriver:bidi-chrome                     �[0m�[32mPASSED�[0m in 3.5s
    1349:  //rb/spec/integration/selenium/webdriver:devtools-chrome                 �[0m�[32mPASSED�[0m in 137.4s
    1350:  //rb/spec/integration/selenium/webdriver:driver-chrome                   �[0m�[32mPASSED�[0m in 16.4s
    1351:  //rb/spec/integration/selenium/webdriver:element-chrome                  �[0m�[32mPASSED�[0m in 15.8s
    1352:  //rb/spec/integration/selenium/webdriver:error-chrome                    �[0m�[32mPASSED�[0m in 7.6s
    ...
    
    1369:  //rb/spec/integration/selenium/webdriver/bidi:log_inspector-chrome       �[0m�[32mPASSED�[0m in 3.6s
    1370:  //rb/spec/integration/selenium/webdriver/bidi:network-chrome             �[0m�[32mPASSED�[0m in 3.6s
    1371:  //rb/spec/integration/selenium/webdriver/bidi:script-chrome              �[0m�[32mPASSED�[0m in 3.5s
    1372:  //rb/spec/integration/selenium/webdriver/chrome:options-chrome           �[0m�[32mPASSED�[0m in 9.1s
    1373:  //rb/spec/integration/selenium/webdriver/chrome:profile-chrome           �[0m�[32mPASSED�[0m in 4.0s
    1374:  //rb/spec/integration/selenium/webdriver/chrome:service-chrome           �[0m�[32mPASSED�[0m in 5.5s
    1375:  //rb/spec/integration/selenium/webdriver/remote:driver-chrome            �[0m�[32mPASSED�[0m in 4.9s
    1376:  //rb/spec/integration/selenium/webdriver/remote:element-chrome           �[0m�[32mPASSED�[0m in 7.6s
    1377:  //rb/spec/integration/selenium/webdriver/chrome:driver-chrome            �[0m�[31m�[1mFAILED�[0m in 3 out of 3 in 131.3s
    1378:  Stats over 3 runs: max = 131.3s, min = 129.8s, avg = 130.6s, dev = 0.6s
    1379:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/chrome/driver-chrome/test.log
    1380:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/chrome/driver-chrome/test_attempts/attempt_1.log
    1381:  D:/_bazel/execroot/_main/bazel-out/x64_windows-fastbuild/testlogs/rb/spec/integration/selenium/webdriver/chrome/driver-chrome/test_attempts/attempt_2.log
    1382:  Executed 31 out of 31 tests: 30 tests pass and �[0m�[31m�[1m1 fails locally�[0m.
    1383:  There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
    1384:  �[0m
    1385:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    [🐛 Bug]: Selenium driver (C#) doesn't clean up session if timing out when creating session?
    1 participant