xpra icon
Bug tracker and wiki

Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#2001 closed defect (fixed)

numpy suspend code can cause nvenc to fail to load

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: critical Milestone: 2.5
Component: encodings Version: 2.4.x
Keywords: Cc:

Description

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

Change History (3)

comment:1 Changed 3 weeks ago by Antoine Martin

Status: newassigned

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

comment:2 Changed 3 weeks ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

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

comment:3 Changed 3 weeks ago by Antoine Martin

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

Note: See TracTickets for help on using tickets.