Page MenuHomePhabricator

Basic.js test causing rendering of chrome page to crash on betacluster
Closed, ResolvedPublic

Description

When I test WikiLambda from my local environment and target the betacluster
and run npm run selenium-test -- --spec tests/selenium/specs/basic.js to run only the basic.js test file
then the rendering of the page crashes.

The problem is only intermittent so to get it to fail more consistently you can instead run this, which will run the tests 10 times and more quickly reproduce the failure in basic.js:

npm run browser-stress-test -- --target-file="basic.js" --execution-number="10"

Screen Recording 2024-01-09 at 4.31.23 PM.gif (1×2 px, 2 MB)

Node 16.19.1
Chrome version 118.0.5993.117
MacOS 14.2.1

Acceptance criteria:
The browser should not crash

TODO

  • updating locally to node18 after patch for T355556 is merged and new npm package version released
  • reproduce targeting a local wiki (T256239)
  • firefox (T351747)
  • chromedriver (T329153)

Event Timeline

@vaughnwalters do you get anything useful out of the log?

@vaughnwalters do you get anything useful out of the log?

@Peter No, nothing useful in the log, at least the logs on my local env at tests/selenium/log after the test runs/fails. The xml file that is created is blank when chrome crashes. I am not sure if there are additional logs I can access for this on betacluster though?

This is the error that displays in the test runner:

[0-3] RUNNING in chrome - /tests/selenium/specs/basic.js
[0-3] Error in "Installation checks.ListObjectsByType.page should exist on installation"
Error: Timeout of 60000ms exceeded. The execution in the test "ListObjectsByType page should exist on installation" took too long. Try to reduce the run time or increase your timeout for test specs (https://webdriver.io/docs/timeouts). (/Users/vaughnwalters/workspace/gerrit/mediawiki/extensions/WikiLambda/tests/selenium/specs/basic.js)
    at createTimeoutError (/Users/vaughnwalters/workspace/gerrit/mediawiki/extensions/WikiLambda/node_modules/mocha/lib/errors.js:498:15)
    at Test.Runnable._timeoutError (/Users/vaughnwalters/workspace/gerrit/mediawiki/extensions/WikiLambda/node_modules/mocha/lib/runnable.js:431:10)
    at Timeout.<anonymous> (/Users/vaughnwalters/workspace/gerrit/mediawiki/extensions/WikiLambda/node_modules/mocha/lib/runnable.js:246:24)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)
[0-3] 2024-01-10T15:41:28.337Z ERROR @wdio/local-runner: Failed launching test session: Error: no current window handle registered

But I don't think that is helpful since the reason it is timing out is because the browser crashed.

Mcastro changed the task status from Open to In Progress.Jan 11 2024, 5:37 PM
Mcastro triaged this task as Medium priority.
Mcastro moved this task from To Triage to In Progress on the Abstract Wikipedia team board.

Sometime you can find useful information in the Chrome crash report: https://www.chromium.org/developers/crash-reports/ or it can be something we can use if we need to report a bug to Chrome.

I have reproduced this on both macos and ubuntu. I'll look for logs and post them here.

vaughnwalters renamed this task from Basic.js test causing chrome to crash on betacluster to Basic.js test causing rending of chrome page to crash on betacluster.Jan 24 2024, 3:38 PM
vaughnwalters updated the task description. (Show Details)
zeljkofilipin renamed this task from Basic.js test causing rending of chrome page to crash on betacluster to Basic.js test causing rendering of chrome page to crash on betacluster.Jan 24 2024, 3:39 PM
zeljkofilipin updated the task description. (Show Details)

To try next:
firefox
chromedriver
updating locally to node18 after patch for T355556 is merged and new npm package version released

zeljkofilipin raised the priority of this task from Medium to High.Jan 26 2024, 12:35 PM

This is now passing in daily tests since Jan 26th. Just tracking it for now to make sure it stays green.

Since updating node from v16 to v18 I can't reproduce this locally any more. (Maybe the problem was in the chrome/chromium version?) The selenium-daily-betawikifunctions-WikiLambda job is also stable. Resolving this for now. We can reopen it if the problem happens again.

Running basic.js 100 times:

vaughnwalters moved this task from Tracking to Done on the User-vaughnwalters board.

https://integration.wikimedia.org/ci/job/selenium-daily-betawikifunctions-WikiLambda/ has been green for about four weeks now. Marking this ticket as done on my board.