New issue
Advanced search Search tips

Issue 803678 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Test testGoBackAndGoForward became flaky and fails for Mac and Linux platforms

Project Member Reported by khachatryan@chromium.org, Jan 18 2018

Issue description

Tests testAlertHandlingOnPageUnload and testGoBackAndGoForward became flaky and fail on Mac and Linux platforms

Repro steps:

1. Get the latest sources from chromium repository
2. Do 'git checkout ce66ffd5325f41ec2ed4fa22dc83aa61737e7831'
3. Build chrome and chromedriver
4. Go to /src/chrome/test/chromedriver/test directory
5. Run the following command:
python run_py_tests.py --chrome=<chromium_fetched_dir>/src/out/Default/chrome --chromedriver=<chromium_fetched_dir>/src/out/Default/chromedriver --filter=*.testGoBackAndGoForward --log-path=<log_file>

Because of test testGoBackAndGoForward is flaky you should run this command until test fails with the following error:

    raise _ExceptionForLegacyResponse(response)
UnknownError: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
  (Session info: chrome=65.0.3324.0)
  (Driver info: chromedriver=2.35.530041 (c39e772a093b608128cf5f1eda0db21d92eecf37),platform=Linux 4.4.0-109-generic x86_64)

ChromeDriver log file for this failure is attached.

Bisecting reports this test started to fail after the following commit:

https://chromium-review.googlesource.com/868327





 
testGoBackAndGoForward_bisect_4.log
39.6 KB View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dd0b0ee146025f6ae6f34a666bbdc356fb378790

commit dd0b0ee146025f6ae6f34a666bbdc356fb378790
Author: Artur Khachatryan <khachatryan@chromium.org>
Date: Fri Jan 19 00:42:34 2018

[ChromeDriver] disabling testGoBackAndGoForward

Test testGoBackAndGoForward appears to be flaky for Linux and mac platforms.
Disabling test execution for those platforms.

Test fails with the following error:

UnknownError: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
  (Session info: chrome=65.0.3324.0)
    (Driver info: chromedriver=2.35.530041 (c39e772a093b608128cf5f1eda0db21d92eecf37),platform=Linux 4.4.0-109-generic x86_64)

Bug:  chromium:803678 
Change-Id: I7a4f0c5fd5cb9255b57e2e3e248e7d51787c0939
Reviewed-on: https://chromium-review.googlesource.com/875303
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Artur Khachatryan <khachatryan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530368}
[modify] https://crrev.com/dd0b0ee146025f6ae6f34a666bbdc356fb378790/chrome/test/chromedriver/test/run_py_tests.py

testAlertHandlingOnPageUnload as well became flaky due to the same commit https://crrev.com/530042


Description: Show this description
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a5893ea4171827f372fe6f892e4fbc9b2036abb7

commit a5893ea4171827f372fe6f892e4fbc9b2036abb7
Author: Artur Khachatryan <khachatryan@chromium.org>
Date: Wed Jan 24 17:39:43 2018

[ChromeDriver] Disabling a flaky test for Linux build bot

Test testAlertHandlingOnPageUnload became flaky on Linux build bot.
Disabling test execution until the bug is fixed.

Bug:  803678 
Change-Id: Ib51bbeb95f4d3b64e71a9b48a8bb2dbfecfcfa55
Reviewed-on: https://chromium-review.googlesource.com/882197
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Artur Khachatryan <khachatryan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531590}
[modify] https://crrev.com/a5893ea4171827f372fe6f892e4fbc9b2036abb7/chrome/test/chromedriver/test/run_py_tests.py

The crash problem was fixed as a part of issue 804214. However, I stumbled upon a race which still makes these tests flaky - going to fix that.
Thank you.
Project Member

Comment 7 by bugdroid1@chromium.org, Jan 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8a854532e7b2605ba975074b6e0673ea98319298

commit 8a854532e7b2605ba975074b6e0673ea98319298
Author: Dmitry Gozman <dgozman@chromium.org>
Date: Mon Jan 29 02:35:36 2018

[DevTools] Fix a race between suspended and waiting messages in DevToolsSession

If a message comes right before navigation, and we send it out but
never get a response from the old renderer (e.g. it was killed), and
then suspend messages due to navigation, the original message is
stuck in waiting_for_response_messages_ and will not be dispatched
when resuming upon navigation finish.

To mitigate this, we move all waiting messages to suspended if
we are not resending them to new renderer due to being currently
suspended.

Bug:  803678 
Change-Id: I125609e0ec8a5e2b98ff2d81a9e71732fc8f6f0f
Reviewed-on: https://chromium-review.googlesource.com/887435
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532307}
[modify] https://crrev.com/8a854532e7b2605ba975074b6e0673ea98319298/chrome/test/chromedriver/test/run_py_tests.py
[modify] https://crrev.com/8a854532e7b2605ba975074b6e0673ea98319298/content/browser/devtools/devtools_session.cc

Status: Fixed (was: Assigned)
Marking this as fixed. Please reopen if the flakiness continues.
The tests now appear stable on v66, but v65 is still flaky. Would it be possible to merge the fix to v65? Thanks.
Project Member

Comment 10 by bugdroid1@chromium.org, Jan 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/62c93ab55fdfb7945a8e4320dd07b8e8601b1f3e

commit 62c93ab55fdfb7945a8e4320dd07b8e8601b1f3e
Author: Artur Khachatryan <khachatryan@chromium.org>
Date: Tue Jan 30 20:30:17 2018

[ChromeDriver] Disable testGoBackAndGoForward for Chrome v65

Test testGoBackAndGoForward fails on Waterfall for Chrome v65.
Disabling test execution in Waterfall build.

Bug:  803678 
Change-Id: I0e084797f727dbd911cb16032fbb642040a1de3a
Reviewed-on: https://chromium-review.googlesource.com/893420
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Artur Khachatryan <khachatryan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533007}
[modify] https://crrev.com/62c93ab55fdfb7945a8e4320dd07b8e8601b1f3e/chrome/test/chromedriver/test/run_py_tests.py

Ping: Would it be possible to merge the fix to v65? Thanks.
Unfortunately, the fix does not apply to M65 due to large code changes in between. I am hesitant to make a manual fix, since it could potentially break DevTools. Is this vital for 65, or it's just a matter of flaky tests?
Thanks for the update. I'm OK with not fixing it in v65 if there is too much risk.

Sign in to add a comment