-
Notifications
You must be signed in to change notification settings - Fork 427
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
Fix random OpenSSL::Cipher::CipherErrors/iv argument errors #320
Fix random OpenSSL::Cipher::CipherErrors/iv argument errors #320
Conversation
…l instances of a given class due to shallow dup. This caused random OpenSSL::Cipher::CipherError errors, particularly in cases in which concurrent encrypts/decrypts were occurring.
@saghaulor Any reason this hasn't been merged in yet, outside of not having had the time? I believe this is also at the root of the issue being described here: #323 |
@bfreese Has this solution been working well for you? |
@amrocco We have been running this code in production for the last 3 months and have not seen any errors. |
@bfreese This fix worked like a charm, thanks so much! You're a lifesaver. I'm curious about how you debugged this issue and arrived at your solution? |
We are also experiencing the same issue, and receive periodic |
We are experiencing this issue as well. Are there plans to cut a release soon (see also #348)? In the mean time has anyone had any luck safely running off |
Does anyone know when they plan to get a release? We are still seeing this issue on our end. |
@saghaulor Do you plan to push a new tag with a new release including that fix? This seems to be critical (introducing data corruption) and breaking for multiple people (including us, GitLab) for multi-threaded environments. |
FYI, This does not solve "must specify iv" error. See #344 |
I'll try to push a release this weekend. I apologize for the long pause. |
Would be nice to get this fix out, it is affecting our prod environment because we use sidekiq and threads. |
This fixes defect in which encrypted_attributes state is shared across all instances due to shallow copy which causes random OpenSSL::Cipher::CipherErrors or iv argument errors during concurrent encrypts/decrypts under load.
An example (might need to increase thread count to replicate):