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

handle transient and permanent cuda failures differently #4348

Closed
totaam opened this issue Sep 6, 2024 · 4 comments
Closed

handle transient and permanent cuda failures differently #4348

totaam opened this issue Sep 6, 2024 · 4 comments
Labels
bug Something isn't working encoding

Comments

@totaam
Copy link
Collaborator

totaam commented Sep 6, 2024

Some of these errors are worth retrying - others are not.

For example, this one is unlikely to yield better results later:

RuntimeError: creating decoder returned error: 'NO_DEVICE'
2024-09-04 16:46:25,252 Error drawing on window 2
Traceback (most recent call last):
  File "/usr/lib64/python3.11/site-packages/xpra/client/mixins/window_manager.py", line 1592, in _do_draw
    window.draw_region(x, y, width, height, coding, data, rowstride,
  File "/usr/lib64/python3.11/site-packages/xpra/client/gui/client_window_base.py", line 838, in draw_region
    backing.draw_region(x, y, width, height, coding, img_data, rowstride, options, callbacks)
  File "/usr/lib64/python3.11/site-packages/xpra/client/gui/window_backing_base.py", line 923, in draw_region
    self.paint_with_video_decoder(VIDEO_DECODERS.get(coding),
  File "/usr/lib64/python3.11/site-packages/xpra/client/gui/window_backing_base.py", line 800, in paint_with_video_decoder
    vd.init_context(coding, enc_width, enc_height, input_colorspace)
  File "xpra/codecs/nvidia/nvdec/decoder.pyx", line 507, in xpra.codecs.nvidia.nvdec.decoder.Decoder.init_context
    self.init_decoder()
  File "xpra/codecs/nvidia/nvdec/decoder.pyx", line 593, in xpra.codecs.nvidia.nvdec.decoder.Decoder.init_decoder
    cudacheck(r, "creating decoder returned error")
  File "/usr/lib64/python3.11/site-packages/xpra/codecs/nvidia/cuda_errors.py", line 17, in cudacheck
    raise RuntimeError(msg)
@totaam totaam added bug Something isn't working encoding labels Sep 6, 2024
@totaam
Copy link
Collaborator Author

totaam commented Sep 6, 2024

Improved somewhat in 4ce1d9b + a61ea33

We need to remove the decoder spec completely if the error is not transient..
Problem is that some other errors will also show up as RuntimeErrors..

@totaam
Copy link
Collaborator Author

totaam commented Sep 6, 2024

Forgot to tag this ticket: 97d1ac3, a071047, 9c2953f

@totaam
Copy link
Collaborator Author

totaam commented Sep 6, 2024

I think that the commits above improve things quite a bit, but the new problem this creates is that we may now end up disabling video decoders that were previously used to expose encodings to the server!

So we may need to tell the server that the list of encodings has changed.
Perhaps overload the encoding packet with an optional list of encodings? Or full csc modes for each one?

@totaam
Copy link
Collaborator Author

totaam commented Sep 6, 2024

This will do for now.

@totaam totaam closed this as completed Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working encoding
Projects
None yet
Development

No branches or pull requests

1 participant