-
Notifications
You must be signed in to change notification settings - Fork 302
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
regression caused by #682 #722
Comments
Seems unlikely to be caused by the PR but if you can provide meaningful details I can take a look. |
just have a quick check: after const char * const *va_drivers = map[i].va_driver; the va_drivers include 4 strings, |
please ignore previous comments, previous debug info looks a env issue. let re-start the issue debug: the issue actually is: the second time, so, the call failed , and the num_drivers is still 20 after revert #682, 2 initialization both success. |
and before #682, the ctx->display_type also is 48 VA_DISPLAY_DRM then , it still work.... |
Not sure I follow - the formatting is all over the place making it almost impossible to understand. Do you have a simple reproducer to share? Ideally we should add it to the libva test suite. The latter living in libva-utils, which makes zero sense and should be moved, but I digress. |
there are 2 problems I suppose we should set the num_drivers to be zero , if https://github.com/intel/libva/blob/master/va/va.c#L685 failed. |
2nd problem: diff --git a/va/drm/va_drm_utils.c b/va/drm/va_drm_utils.c
using above patch: we could see: a simple fix is move the count++ under the protection of if (count < MAX_NAMES |
about the issue I mentioned in previous comments:
it is very hard to reproduce, because it actually about such case: and then initialize failed but before #682 , even the authentication failed, the code still could run under this protection: so, it will still get the first candidate name. it maybe is a application issue, need to understand why the authentication failed.
suppose it is because of the second vaInitialize. |
a simple sample to reproduce the issue, mentioned here #722 (comment) : #include <unistd.h> int fd0,fd1; va_dpy0 = vaGetDisplayDRM(fd0); va_dpy1 = vaGetDisplayDRM(fd1); vaTerminate(va_dpy0); close(fd0); second vaInitialize will cause drmAuthMagic failure with errno=13 |
Thanks for the example. Off the top of my head this behaviour is normal and expected. In more detail: the first client (regardless if that's libva or Xorg or Weston or...) is always master and authenticated. Since the first client has not a) closed the fd or b) explicitly dropped the master - any other client who tries to issue ioctls that requires master will fail with EACCESS aka 13. This is part of the DRM fundamentals - trying to relax that this will open a massive security hole. I would strongly recommend using the render node, unless you absolutely need to use the card node. What program/project is that? If open-source I can send a fix their way. |
the 3rd issue should be expected. I will sync with that app owners |
map is a array, which could be accessed by index, even the index is out of range. Fixes intel#722 Signed-off-by: Carl Zhang <carl.zhang@intel.com>
map is a array, which could be accessed by index, even the index is out of range. Fixes intel#722 Signed-off-by: Carl Zhang <carl.zhang@intel.com>
What do you mean there are no DRI2 & DRI3 support? Can you provide an example of what hardware/software I need? |
The automatic markdown conversion has rendered the patch useless. Can you wrap it in backticks as per the documentation |
please help to review PR #731 as one fix |
map is a array, which could be accessed by index, even the index is out of range. Fixes intel#722 Signed-off-by: Carl Zhang <carl.zhang@intel.com>
map is a array, which could be accessed by index, even the index is out of range. Fixes intel#722 Signed-off-by: Carl Zhang <carl.zhang@intel.com>
map is a array, which could be accessed by index, even the index is out of range. Fixes intel#722 Signed-off-by: Carl Zhang <carl.zhang@intel.com>
there are one regression caused by #682 , current finding:
libva info: VA-API version 1.19.0
libva error: vaGetDriverNames() failed with operation failed
libva error: va_new_opendriver:715: Out of memory
from app side
vaInitialize, err=0x2
xdpyinfo | grep DRI
Windows-DRI
it maybe not a libva issue, maybe just this change expose potential issues.
I will paste more information after some investigation
The text was updated successfully, but these errors were encountered: