1

I use uWSGI on ubuntu 18 (18.04.5 LTS). Very recently this stopped working - I'd get this error on startup:

Fatal Python error: Cannot recover from MemoryErrors while normalizing exceptions.

Nothing had changed my side but the server was set to auto-upgrade. Running uwsgi as root worked, but as www-data (which is how I run it normally) failed.

After some trial and error it turned out that the --never-swap option was causing this - certainly when I removed that, it worked again.

So I can live with removing --never-swap, but I'd love to know why this happened. Is some new security feature preventing non-root users locking memory pages - that's what the doc says this option does - uWSGI doc here.

Rich B
  • 11
  • 1

1 Answers1

0

An unprivileged process needs the CAP_IPC_LOCK capability in order to lock memory pages. Most likely someone (you or another admin) set this capability manually, and then it was of course gone when a recent update was installed.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • Thanks - interesting but I don't think that's relevant to me - I configured the server and have never made any change to that. Unless a default changed? – Rich B Dec 04 '20 at 12:46