[Bug]: ActionMailer::MailDeliveryJob.arguments
unexpected format for sidekiq
#426
Labels
ActionMailer::MailDeliveryJob.arguments
unexpected format for sidekiq
#426
Problem Description
Hi, I was debugging why our sidekiq dashboard
http://rails-app-url/sidekiq
crashes with a 500 error when we have a mail delivery job in the queue. This happens only in production and cannot be replicated in development environments. I realized Instana is likely the cause from doing a quick search of installed gems.The issue manifests as follows:
MailDeliveryJob is added to the queue
Development
The response from enqueuing looks like this:
Production
The response from enqueuing looks like this:
Please note
@arguments
is different in production,given_arguments
has been added to wrap the argsSidekiq dashboard is loaded
Development
No problems
Production
500 error
Sidekiq is unable to render the busy dashboard because the structure it is expecting for arguments has been changed from what it expects. Here is the specific line of source code that crashes https://github.com/sidekiq/sidekiq/blob/main/lib/sidekiq/api.rb#L399. Sidekiq is expecting to see a list, drop the first 3 elements and call values_at on the remaining element. However, it ends up calling
values_at
onnil
.Possible cause
I did a quick search in my app for
given_arguments
to see if I had any code mutating the arguments somehow but did not find anything. I searched the source code of all installed gems and found this line in Instanaruby-sensor/lib/instana/instrumentation/active_job.rb
Line 41 in f386da7
Minimal, Complete, Verifiable, Example
Included in problem description, summary:
stacktrace:
Gemfile.lock
Ruby Version
The text was updated successfully, but these errors were encountered: