-
Notifications
You must be signed in to change notification settings - Fork 26
Description
I'm using logstash 2.2.0 to read medium volume events from AWS SQS (running 64 input threads). We recently added the cipher plugin to address the fact that SQS offers no confirmed encryption at-rest capabilities. We had some issues with logstash crashing with stack traces like so:
NoMethodError: undefined method `padding=' for nil:NilClass
and
OpenSSL::Cipher::CipherError: key not specified
Turning on debugging I saw the following messages from the cipher plugin:
max_cipher_reuse[10] reached, total_cipher_uses = 11
max_cipher_reuse[10] reached, total_cipher_uses = 12
The only possible interpretation I could come to from this was that the cipher object was being called from multiple threads, despite the fact that this shouldn't be possible given the pipeline worker architecture per https://www.elastic.co/guide/en/logstash/2.2/pipeline.html
As a quick patch to get us up and running, I put a mutex around basically the entire code that uses the OpenSSL cipher object. I realize this probably isn't the right solution but I wanted to get this documented.
I'll create a pull request with my code for reference.