-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
NoMethodError: undefined method '_stack_table' for nil #2525
Comments
I have updated to SDK version Since then, I have a job that ran 46 times, and got that error 18 times. (39%) Important note: while solid_queue shows the jobs as failed, the logic inside the jobs executed successfully. I basically get data from an API and insert rows in a table, and all 46 jobs inserted the data as expected. So the problem might occur towards the end of the job, I don't know, I have never used Vernier before. Yet this is what I see in mission_control: |
I encountered the same error, in development environment, with After some investigation, I identified the possible root causes:
I hope that could be useful for this thread. |
Thanks for reporting this. Vernier runs globally and it cannot run in isolation on a per job basis. We can prevent it from being started again although that may turn out to be tricky. I'll give this a go and report back here. |
Got a potential fix here #2528 |
We're running to this bug as well. Until this is released, is there a reasonable workaround? |
@zackkitzmiller I'm running on PostgreSQL so the syntax might differ depending on your database, but I created this simple job to purge errors of this nature: class DeleteVernierErrorsJob < ApplicationJob
def perform
SolidQueue::FailedExecution
.where("(error::jsonb)->>'message' = 'undefined method ''_stack_table'' for nil'")
.delete_all
end
end |
@solnic I don't know if creating a new issue is required, I just want to point out that I get this message every time I open a rails console, or in the logs of my deployments:
It is an order of magnitude less impactful, but looks related to Vernier integration as well. I suppose we shouldn't see this message if we plugged in Vernier instead of stackprof. |
@pil0u thanks, would you mind actually reporting an issue about this for tracking purposes? 🙏🏻 |
Created #2534 |
@zackkitzmiller you could try adding this monkeypatch: module SentryPatch
def start_profile
unless @collector
super
end
end
end
module Vernier
class << self
prepend(SentryPatch)
end
end The spec from my PR is passing with this patch, FWIW 🙃 |
@solnic Where should I throw this, I assume in the initializer before the configuration happens. |
yes that's a good place |
@solnic I am still seeing the |
@felixbuenemann OK thanks for letting me know. I'll try to reproduce this in a spec. |
Issue Description
Disclaimer: I am very unfamiliar with profiling, for context I am plugging Sentry to a new side project and saw this new feature and decided to enable it.
I just setup
vernier
for my profiling on a new, simple Rails app. My app runs background jobs (viasolid_queue
), including cron jobs. Some of the cron jobs (not all of them) return this internal error from Vernier. Weirdly, trying to re-run them from MissionControl, again, sometimes it fails, sometimes it passes.It is not blocking anything on my side at the moment. I will monitor this to share some numbers, but if you already have some questions or ideas at what I should look at to help, let me know.
Note that this error is not reported by Sentry in the issue tracker.
Example of a full stack trace:
Reproduction Steps
I'm having a hard time to reproduce, because it is not systematic.
Here is my Gemfile.lock:
Expected Behavior
Not having this vernier internal error
Actual Behavior
Getting sporadically this error, in dev and in prod.
Ruby Version
3.4.1
SDK Version
5.22.1
Integration and Its Version
Rails 8.0.1 + Solid Queue as ActiveJob backend
Sentry Config
The text was updated successfully, but these errors were encountered: