Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numpy suspend code can cause nvenc to fail to load #2001

Closed
totaam opened this issue Oct 23, 2018 · 3 comments
Closed

numpy suspend code can cause nvenc to fail to load #2001

totaam opened this issue Oct 23, 2018 · 3 comments
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Oct 23, 2018

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
@totaam
Copy link
Collaborator Author

totaam commented Oct 23, 2018

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

@totaam
Copy link
Collaborator Author

totaam commented Oct 23, 2018

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

@totaam totaam closed this as completed Oct 23, 2018
@totaam
Copy link
Collaborator Author

totaam commented Oct 23, 2018

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

@totaam totaam added the v2.4.x label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant