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
[Urgent] Seg fault using Ruby google-protobuf v3.17.3 #8842
Comments
Thanks for the very useful report. It's especially helpful that the C stack trace has function/line info, how did you get that? Other reports don't have symbol information, since I believe the gem gets its symbols stripped during release (which I would like to fix, but I'm not sure how to get the Ruby toolchain not to do this). It appears that this crash is in the DSL. This is a bit surprising as the DSL has not changed very much since #5866 in 2019. I took a look and could not find an obvious explanation for this crash. Since getting a root cause could be difficult, I thought an easier fix would be to port the DSL from C to Ruby. I've wanted to do this for a while anyway, since there's no reason for the DSL to be implemented in C anymore. If the code is in Ruby, it can't cause SEGV bugs (there could still be SEGV bugs elsewhere in the library, but at the very least this will narrow down where the bug could be). Do you have any way of trying out the fix on this branch? https://github.com/haberman/protobuf/tree/rubybuilder |
@haberman
The logs were printed by Cloudwatch Logs, and I didn't do any special setup, haha.
Well, I will see if this fix works for us. |
Unfortunately I don't have sample code to reproduce, since I don't have a root cause on the bug. My fix for the bug is to migrate the crashing C code to Ruby, which shouldn't be capable of causing segfaults (unless there is a bug in C code elsewhere). Have you been able to try the fix that was merged to master in #8850? |
I am going to close this as we believe it to be fixed in #8850 If you see this crash even with the fix (which should be released in the next protobuf release before too long), please comment again on the bug and we will re-open it. |
What version of protobuf and what language are you using?
protobuf: 3.17.3
Language: Ruby
What operating system (Linux, Windows, ...) and version?
What runtime / compiler are you using (e.g., python version or gcc version)
gcc (Debian 8.3.0-6) 8.3.0
What did you do?
Steps to reproduce the behavior:
Still trying to reproduce error
What did you expect to see
No segmentation fault
What did you see instead?
Segmentation fault
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
If you need more info, please let me know
The text was updated successfully, but these errors were encountered: