ruby-gpgme icon indicating copy to clipboard operation
ruby-gpgme copied to clipboard

GPGME::Error Bad file descriptor using GPGME::Key.find

Open joshuamcginnis opened this issue 6 years ago • 0 comments

I'm using ruby 2.5.0 and gpgme 2.0.16 with rails and sidekiq. I'm spinning up about 40 GPG decryption jobs, processing about 10 jobs (using threads) * 3 processes concurrently.

Searching for a private key randomly raises GPGME::Error Bad file descriptor randomly in my jobs:

return unless GPGME::Key.find(:secret, PRIVATE_KEY_SHA).empty?

Two questions: When would using GPGME::Key.find trigger this error? Is this gem thread-safe?

Any insight would be much appreciated.

joshuamcginnis avatar Apr 16 '18 19:04 joshuamcginnis