Project

General

Profile

Actions

Bug #16260

closed

Intermittent DashboardIntegrationTest failures

Added by Dominic Cleal over 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tests
Target version:
Fixed in Releases:
Found in Releases:

Description

After #16044 was merged, the following test failure was seen on develop:

DashboardIntegrationTest.test_0009_widgets not in dashboard show up in list

ActiveRecord::StatementInvalid: PG::TRDeadlockDetected: ERROR:  deadlock detected
LINE 1: ...STINCT "hosts"."id") FROM "hosts" LEFT OUTER JOIN "host_stat...
                                                             ^
DETAIL:  Process 3578 waits for AccessShareLock on relation 7582348 of database 7582095; blocked by process 21808.
Process 21808 waits for AccessExclusiveLock on relation 7582383 of database 7582095; blocked by process 3578.
HINT:  See server log for query details.
: SELECT COUNT(DISTINCT "hosts"."id") FROM "hosts" LEFT OUTER JOIN "host_status" ON "host_status"."host_id" = "hosts"."id" WHERE "hosts"."type" IN ('Host::Managed', 'Host::Valid') AND (last_report > '2016-08-23 17:11:47.625954') AND (host_status.type = 'HostStatus::ConfigurationStatus') AND ((host_status.status > 0) AND (((host_status.status >> 30 & 63) != 0))) AND "hosts"."enabled" = $1
    app/services/dashboard/data.rb:44:in `fetch_data'
    app/services/dashboard/data.rb:11:in `initialize'
    app/controllers/dashboard_controller.rb:77:in `new'
    app/controllers/dashboard_controller.rb:77:in `prefetch_data'
    app/controllers/concerns/application_shared.rb:14:in `set_timezone'
    app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
    lib/middleware/catch_json_parse_errors.rb:9:in `call'
    lib/middleware/tagged_logging.rb:18:in `call' (ActiveRecord::StatementInvalid)
/usr/local/rvm/gems/ruby-2.1.5@test_develop-1/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/postgresql_adapter.rb:637    

(http://ci.theforeman.org/job/test_develop/2339/)

It appears that dashboard integration tests are not calling wait_for_ajax when visiting the dashboard page, so there are likely more requests still being served at the end of the test causing the deadlock.


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #16044: Errors in individual dashboard widgets fail entire pageClosedTomer Brisker08/10/2016Actions
Actions #1

Updated by Dominic Cleal over 7 years ago

  • Related to Bug #16044: Errors in individual dashboard widgets fail entire page added
Actions #2

Updated by The Foreman Bot over 7 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Tomer Brisker
  • Pull request https://github.com/theforeman/foreman/pull/3771 added
Actions #3

Updated by Anonymous over 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #4

Updated by The Foreman Bot over 7 years ago

  • Pull request https://github.com/theforeman/foreman/pull/3781 added
Actions #5

Updated by Tomer Brisker over 7 years ago

  • Target version set to 1.6.2
Actions

Also available in: Atom PDF