-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
[BUG] Segmentation fault at 0x0000000000000000
in rb_fiber_transfer
#113
Comments
Thanks for your report, I will take a look tomorrow. If I prepare a debug release, would you be able to test it? |
Of |
I have a couple of questions to help me understand the nature of the problem.
|
Ok, but keep in mind I'm here with some sort of SRE hat. I don't know the code using
Yeah, it's running inside Pitchfork, in a fairly gigantic application.
Yeah, unfortunately I don't know that, and as mentioned I can't just rely on the backtrace to point me at the calling code like I usually do for this sort of issues. All I know is that it's in a generic
So I think it's a pool of HTTP connections? If I grep for results = Async do |task|
tasks = batch_entries.map do |batch_entry|
task.async do
run_with_cache(batch_entry.context, batch_entry.http_request)
end
end
tasks.map(&:wait)
end.wait Async do |task_scheduler|
tasks = scope_key_to_missing_fetch_results.map do |scope_key, missing_fetch_results|
task_scheduler.async do
perform_fetch(scope_key: scope_key, fetch_results: missing_fetch_results)
rescue StandardError => e
missing_fetch_results.each do |fetch_result|
fetch_result.error_result = e.message
end
log_fetch_error(e, message: "[REDACTED]")
end
end
tasks.map(&:wait)
end.wait That seems to be all what it's used for. As for the organization of threads, as you can see in the crash report there's 16 Ruby threads, but also a whole lot of native threads started by gems like
Well, I don't know how often this codepath is called, but probably quite a lot, dozens of times a day isn't a whole lot for us, probably |
Thanks, that's helpful. |
The mention of |
It's not specific to graphql, it's also failing on some non graphql endpoints. |
Opening here first because I'm too unfamiliar with this to know whether it's a Ruby bug or a bug in
io-event
. All I can say is thatrb_fiber_transfer
expectsrb_current_execution_context()
to return something, but it's called from a thread that doesn't have a current execution context.So I don't know if it's IO-event trying to resume a fiber from a wrong thread or wrong assumption in
rb_fiber_transfer
.I unfortunately don't have a repro script, but this is happening on a fairly frequent basis (dozens of times a day).
The text was updated successfully, but these errors were encountered: