-
-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AccountDeletionWorker locking up sidekiq #15379
Comments
I dug into the rails console and got this info, maybe it will help? irb(main):029:0> Sidekiq::Queue.new('pull').find { |j| j.item['class'] == 'AccountDeletionWorker' && j.item['args'][0] == 43875 }
=> #<Sidekiq::Job:0x000055762f1f17d8 @args=nil, @value="{\"retry\":true,\"queue\":\"pull\",\"class\":\"AccountDeletionWorker\",\"args\":[43875,{\"reserve_username\":false,\"skip_activitypub\":true}],\"jid\":\"503fe0a39624d84b475e6d5a\",\"created_at\":1608438017.8601284,\"enqueued_at\":1608443329.3542883,\"error_message\":\"Attempted to destroy a stale object: Poll.\",\"error_class\":\"ActiveRecord::StaleObjectError\",\"failed_at\":1608443282.46411,\"retry_count\":0}", @item={"retry"=>true, "queue"=>"pull", "class"=>"AccountDeletionWorker", "args"=>[43875, {"reserve_username"=>false, "skip_activitypub"=>true}], "jid"=>"503fe0a39624d84b475e6d5a", "created_at"=>1608438017.8601284, "enqueued_at"=>1608443329.3542883, "error_message"=>"Attempted to destroy a stale object: Poll.", "error_class"=>"ActiveRecord::StaleObjectError", "failed_at"=>1608443282.46411, "retry_count"=>0}, @queue="pull"> |
I cannot find commit ec9ec81, but this issue doesn't ring a bell, so I don't think that's something we solved recently anyway. The |
I couldn't find any way to reproduce it, and I can't see how anything but a very specific race condition could cause this, but does the following help? diff --git a/app/models/poll.rb b/app/models/poll.rb
index b5deafcc2..e1ca55252 100644
--- a/app/models/poll.rb
+++ b/app/models/poll.rb
@@ -25,7 +25,7 @@ class Poll < ApplicationRecord
belongs_to :account
belongs_to :status
- has_many :votes, class_name: 'PollVote', inverse_of: :poll, dependent: :destroy
+ has_many :votes, class_name: 'PollVote', inverse_of: :poll, dependent: :delete_all
has_many :notifications, as: :activity, dependent: :destroy
More generally, I think there's a lot of stuff we can |
Expected behaviour
Sidekiq should not have all workers locked up by AccountDeletionWorker running forever
Actual behaviour
Sidekiq has all workers locked up by AccountDeletionWorker running forever. There are hundreds of jobs queued all with the same parameters:
43875, {"reserve_username"=>false, "skip_activitypub"=>true}
When a worker starts this job, it gets stuck forever.
Steps to reproduce the problem
Just running the server normally.
Specifications
Note: we are running glitch-soc
Commit: ec9ec81
The text was updated successfully, but these errors were encountered: