-
Notifications
You must be signed in to change notification settings - Fork 110
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
Intermittent segfault on Nokogiri 1.13.6 -> 1.13.7 when processing Tempfile #105
Comments
I have identified the same problem on the I think it's from Nokogiri because ironically their last change note for My current solution is the same, rollback nokogiri with :
Interesting parts of my segfault backtrace
|
👀 Nokogiri maintainer here, I'll try to reproduce this. Any help you can provide would be great. |
I could really use a reliable repro if either of you can provide one. Thanks. |
Please open an issue upstream at https://github.com/sparklemotion/nokogiri with the information requested about your system and any kind of a repro you might have. I know nothing about Creek so any help you can provide will help us diagnose what's going on faster. |
@flavorjones Thanks for looking ✨ I'll share what I can. I haven't been able to reproduce it outside of the test suite yet. I have a test which triggers is .. some times.. but at least it's a specific test |
👍 even a "sometimes" repro is good enough with most memory-related issues, because I can always run it in a loop. |
Please follow along upstream at sparklemotion/nokogiri#2598 |
Side note: I have a PR up that adds See https://github.com/sparklemotion/nokogiri/runs/7454887315?check_suite_focus=true for an example. |
FWIW this is addressed in Nokogiri v1.13.8 and later, and can probably be closed. |
Closing as resolved by new release |
I've isolated this to creek (2.5.3, rails 7.0.3, cruby 3.0.3) but haven't figured out exactly why..
we store some xlsx files inline as bytea columns and load them into the Creek gem when processing
where
new_file_handler
isand
load_file
isI thought the problem might be the
fh.close
before reading the file via path could change the behavior with the new nokogiri code, and the resolution would be to have an ensure block withbook&.close
when all done.I tried that and I tried swapping out
fh.write(file)
withFile.binwrite(fh.path, file)
like Creek does for remote files, but that didn't resolve the seg faults. Only rolling back Nokogiri seems to have resolved them.In any case, leaving this issue here in case any one else notices it.
The text was updated successfully, but these errors were encountered: