Actions
Bug #16260
closedIntermittent DashboardIntegrationTest failures
Difficulty:
Triaged:
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.
Updated by Dominic Cleal about 8 years ago
- Related to Bug #16044: Errors in individual dashboard widgets fail entire page added
Updated by The Foreman Bot about 8 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
Updated by Anonymous about 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 1706113ea32f5dedc4d9560a1eaf1376e95934c7.
Updated by The Foreman Bot about 8 years ago
- Pull request https://github.com/theforeman/foreman/pull/3781 added
Actions