Project

General

Profile

Bug #25711

org delete sometimes fails on product/destroy.rb

Added by Justin Sherrill 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Category:
Subscriptions
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

2018-12-15T00:30:25 [E|bac|] PG::TRDeadlockDetected: ERROR:  deadlock detected
DETAIL:  Process 27223 waits for ShareLock on transaction 14334; blocked by process 24001.
Process 24001 waits for ShareLock on transaction 14323; blocked by process 27223.
HINT:  See server log for query details.
: DELETE FROM "katello_pool_products" WHERE "katello_pool_products"."id" = $1 (ActiveRecord::Deadlocked)
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:603:in `async_exec'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:603:in `block (2 levels) in exec_no_cache'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:602:in `block in exec_no_cache'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:579:in `block (2 levels) in log'
/opt/rh/rh-ruby25/root/usr/share/ruby/monitor.rb:226:in `mon_synchronize'
SNIP
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0.pre.master/app/models/katello/model.rb:7:in `destroy!'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.0.pre.master/app/lib/actions/katello/product/destroy.rb:58:in `finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.1.6/lib/dynflow/action.rb:560:in `block (2 levels) in execute_finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.1.6/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.1.6/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.4/app/lib/actions/middleware/rails_executor_wrap.rb:20:in `block in finalize'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/execution_wrapper.rb:87:in `wrap'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.4/app/lib/actions/middleware/rails_executor_wrap.rb:19:in `finalize'


Related issues

Related to Katello - Bug #26821: PG::TRDeadlockDetected: ERROR: deadlock detected when deleting an OrganizationClosed

Associated revisions

Revision e254baba (diff)
Added by Justin Sherrill 7 months ago

Fixes #25711 - clear pool products when deleting product

This prevents the pool deletion that occursing during
listenoncandlepinevents from causing a db deadlock

History

#1 Updated by The Foreman Bot 7 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7896 added

#2 Updated by Justin Sherrill 7 months ago

  • Status changed from Ready For Testing to Closed

#3 Updated by John Mitsch 7 months ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.10.1

#4 Updated by Evgeni Golov 2 months ago

  • Related to Bug #26821: PG::TRDeadlockDetected: ERROR: deadlock detected when deleting an Organization added

Also available in: Atom PDF