[Errno 12] Cannot allocate memory
On my workstation, bitmask-client will take a very long time before becoming responsive, eating substantial amounts of memory (~9GB) in the process.
Looking a bit further on my provider, where pixelated-user-agent would/will also take a very long time, I noticed the following trace, noting that I originally installed the swapspace
daemon, which will try to create swap files dynamically, but which seems to fail if large chunks are allocated at once.
Now, I have created a static swap file of 16GB, with system memory being at 8GB, and pixelated-user-agent
(by way of leap.bitmask.mail.incoming.service
, I suspect) seems to be using ~10GB of RAM with total system swap usage at ~5GB.
Googling a bit, I found https://stackoverflow.com/questions/20111242/how-to-avoid-errno-12-cannot-allocate-memory-errors-caused-by-using-subprocess , which seems to reference some resources on Python memory handling and potential problems with forking/spawning.
Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: 2017-06-01 13:55:11 [leap.bitmask.mail.incoming.service] ERROR _decrypt_doc: Error decrypting document with ID 5dd29026-3995-4c43-894a-3f69658f3d28 Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: 2017-06-01 13:55:11 [leap.bitmask.mail.incoming.service] ERROR [Failure instance: Traceback: <type 'exceptions.OSError'>: [Errno 12] Cannot allocate memory Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/internet/defer.py:434:errback Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/internet/defer.py:501:_startRunCallbacks Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/internet/defer.py:588:_runCallbacks Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/internet/defer.py:1184:gotResult Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: --- <exception caught here> --- Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/internet/defer.py:1126:_inlineCallbacks Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/python/failure.py:389:throwExceptionIntoGenerator Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/src/leap.bitmask/src/leap/bitmask/keymanager/__init__.py:597:decrypt Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/internet/defer.py:1126:_inlineCallbacks Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/python/failure.py:389:throwExceptionIntoGenerator Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/src/leap.bitmask/src/leap/bitmask/keymanager/__init__.py:563:_decrypt Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/internet/defer.py:1126:_inlineCallbacks Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/python/failure.py:389:throwExceptionIntoGenerator Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/src/leap.bitmask/src/leap/bitmask/keymanager/openpgp.py:752:decrypt Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/python/threadpool.py:246:inContext Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/python/threadpool.py:262:<lambda> Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/python/context.py:118:callWithContext Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/local/lib/python2.7/site-packages/twisted/python/context.py:81:callWithContext Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/src/gnupg/gnupg/gnupg.py:1078:decrypt Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/src/gnupg/gnupg/gnupg.py:1099:decrypt_file Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/src/gnupg/gnupg/_meta.py:760:_handle_io Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/share/python/pixelated-user-agent/src/gnupg/gnupg/_meta.py:622:_open_subprocess Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/lib/python2.7/subprocess.py:710:__init__ Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: /usr/lib/python2.7/subprocess.py:1231:_execute_child Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: ] Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: 2017-06-01 13:55:11 [leap.bitmask.mail.incoming.service] INFO processing decrypted doc Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: 2017-06-01 13:55:11 [leap.bitmask.mail.incoming.service] ERROR Error while decrypting 5dd29026-3995-4c43-894a-3f69658f3d28 Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: 2017-06-01 13:55:11 [leap.bitmask.mail.incoming.service] ERROR No JSON object could be decoded Jun 1 13:55:11 mail2 pixelated-user-agent[6729]: 2017-06-01 13:55:11 [leap.bitmask.mail.incoming.service] INFO adding message 5dd29026-3995-4c43-894a-3f69658f3d28 to local db