Xpra: Ticket #2001: numpy suspend code can cause nvenc to fail to load

This is a race condition caused by r19989:

2018-10-22 21:56:15,686 Error importing nvenc encoder (nvenc)
2018-10-22 21:56:15,686  import of numpy halted; None in sys.modules
2018-10-22 21:56:15,686
Traceback (most recent call last):
  File "/usr/lib64/python3.7/site-packages/xpra/codecs/loader.py", line 53, in codec_import_check
    ic =  __import__(class_module, {}, {}, classname)
  File "xpra/codecs/nvenc/encoder.pyx", line 13, in init xpra.codecs.nvenc.encoder
    import numpy
ModuleNotFoundError: import of numpy halted; None in sys.modules

Tue, 23 Oct 2018 16:16:05 GMT - Antoine Martin: status changed

This can also affect nvfbc and other codecs: the codec checks may import numpy to create test buffers.

Tue, 23 Oct 2018 16:49:04 GMT - Antoine Martin: status changed; resolution set

This isn't a race condition, just an ugly bug. Fixed in r20798.

Tue, 23 Oct 2018 16:51:00 GMT - Antoine Martin:

Note: the codecs are safe because we load them synchronously first, before doing the threaded init.

Sat, 23 Jan 2021 05:39:28 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2001