(master) glamor: glamor_egl.c do not call xorgGlxCreateVendor()#3174
Conversation
Add warning, that xorgGlxCreateVendor need to be called once Signed-off-by: Tautvis <gtautvis@gmail.com>
This calls installed default glx vendor at top of callback chain, which causes problem with other glx vendors, because it always succeds and set same vendor for screen. Signed-off-by: Tautvis <gtautvis@gmail.com>
|
Is the problem caused by the multiple calls to that function? I remember looking into this some time ago, but I figured it's only effect is a duplicate vendor message in the log output, and is not worth patching. |
As far as I testing, problem is here. And I agree that duplicate vendor message looks harmless, But when nvidia proprietary driver involved it looks doing essentially what is in : xserver/Xext/glx/vndservermapping.c Line 171 in 59dcf88 That bug surfaces only when nvidia is drivers are loaded before glamor. |
stefan11111
left a comment
There was a problem hiding this comment.
LGTM, assuming this works fine on xf86.
This change matches what I tested some time ago.
SInce https://gitlab.freedesktop.org/xorg/xserver/-/commit/d8ec33fe0542141aed1d9016d2ecaf52da944b4b , all X server call xorgGlxCreateVendor themselves, except xf86, which does it when loading the glx extension module.
Should not negatively affect kdrive or Xvfb, and it should fix the:
(II) GLX: Another vendor is already registered for screen 0
in the X server logs.
|
@metux When I looked into this some time ago, I also tried fixing the log message by adding a static variable to the function, to ensure it only gets called once. However, that didn't work for xf86. From what gdb said, xf86 calls 2 functions that are at different addrsses, but both are named Xfbdev did not have such behavior, everything worked as expected there. |
Verdict: ✅ passed — correct, no blocking findings.
|
uh ? can you please explain in more detail what change you've tried and what happened there ? |
From memory, it was something like this: This stopped the log message error in Xfbdev, but not in Xorg. |
Uh, that is strange. Could it somehow happen that this file is compiled twice ? |
@stefan11111 @metux — re "xf86 calls two functions at different addresses, both named Root cause:
|
We need to untwist this (@metux please do not release new version) - when not repeating These calls look like this with my patch : (gdb) b xorgGlxServerInit
Function "xorgGlxServerInit" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (xorgGlxServerInit) pending.
(gdb) b egl_screen_probe
Function "egl_screen_probe" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 2 (egl_screen_probe) pending.
Breakpoint 1.3, xorgGlxServerInit (pcbl=0x5555557915c0 <vndInitCallbackListPtr>, param=0x0, ext=0x555557c5ede0) at ../xlibre-server-9999/Xext/glx/glxext.c:515
515 {
(gdb) bt
#0 xorgGlxServerInit (pcbl=0x5555557915c0 <vndInitCallbackListPtr>, param=0x0, ext=0x555557c5ede0) at ../xlibre-server-9999/Xext/glx/glxext.c:515
#1 0x00005555555b135c in _CallCallbacks (pcbl=pcbl@entry=0x5555557915c0 <vndInitCallbackListPtr>, call_data=call_data@entry=0x555557c5ede0) at ../xlibre-server-9999/dix/dixutils.c:692
#2 0x00005555556abf8b in CallCallbacks (pcbl=0x5555557915c0 <vndInitCallbackListPtr>, call_data=0x555557c5ede0) at ../xlibre-server-9999/include/callback.h:79
#3 GlxExtensionInit () at ../xlibre-server-9999/Xext/glx/vndext.c:244
#4 0x0000555555571a2d in InitExtensions (argc=argc@entry=2, argv=argv@entry=0x7fffffffda68) at ../xlibre-server-9999/mi/miinitext.c:264
#5 0x00005555555aff55 in dix_main (argc=2, argv=0x7fffffffda68, envp=<optimized out>) at ../xlibre-server-9999/dix/main.c:199
#6 0x00007ffff75223fb in ?? () from /usr/lib64/libc.so.6
#7 0x00007ffff75224ab in __libc_start_main () from /usr/lib64/libc.so.6
#8 0x0000555555571595 in _start ()
(gdb) c
Continuing.
Breakpoint 1.4, xorgGlxServerInit (pcbl=<optimized out>, param=<optimized out>, ext=<optimized out>) at ../xlibre-server-9999/Xext/glx/glxext.c:527
527 DIX_FOR_EACH_SCREEN({
(gdb) bt
#0 xorgGlxServerInit (pcbl=<optimized out>, param=<optimized out>, ext=<optimized out>) at ../xlibre-server-9999/Xext/glx/glxext.c:527
#1 xorgGlxServerInit (pcbl=<optimized out>, param=<optimized out>, ext=<optimized out>) at ../xlibre-server-9999/Xext/glx/glxext.c:514
#2 0x00005555555b135c in _CallCallbacks (pcbl=pcbl@entry=0x5555557915c0 <vndInitCallbackListPtr>, call_data=call_data@entry=0x555557c5ede0) at ../xlibre-server-9999/dix/dixutils.c:692
#3 0x00005555556abf8b in CallCallbacks (pcbl=0x5555557915c0 <vndInitCallbackListPtr>, call_data=0x555557c5ede0) at ../xlibre-server-9999/include/callback.h:79
#4 GlxExtensionInit () at ../xlibre-server-9999/Xext/glx/vndext.c:244
#5 0x0000555555571a2d in InitExtensions (argc=argc@entry=2, argv=argv@entry=0x7fffffffda68) at ../xlibre-server-9999/mi/miinitext.c:264
#6 0x00005555555aff55 in dix_main (argc=2, argv=0x7fffffffda68, envp=<optimized out>) at ../xlibre-server-9999/dix/main.c:199
#7 0x00007ffff75223fb in ?? () from /usr/lib64/libc.so.6
#8 0x00007ffff75224ab in __libc_start_main () from /usr/lib64/libc.so.6
#9 0x0000555555571595 in _start ()
(gdb) c
After reverting patch these functions called twice and between Breakpoint 2.1, xorgGlxServerInit (pcbl=0x5555557915c0 <vndInitCallbackListPtr>, param=0x0, ext=0x555557c14eb0) at ../xlibre-server-9999/Xext/glx/glxext.c:515
515 {
(gdb) bt
#0 xorgGlxServerInit (pcbl=0x5555557915c0 <vndInitCallbackListPtr>, param=0x0, ext=0x555557c14eb0) at ../xlibre-server-9999/Xext/glx/glxext.c:515
#1 0x00005555555b135c in _CallCallbacks (pcbl=pcbl@entry=0x5555557915c0 <vndInitCallbackListPtr>, call_data=call_data@entry=0x555557c14eb0) at ../xlibre-server-9999/dix/dixutils.c:692
#2 0x00005555556abf8b in CallCallbacks (pcbl=0x5555557915c0 <vndInitCallbackListPtr>, call_data=0x555557c14eb0) at ../xlibre-server-9999/include/callback.h:79
#3 GlxExtensionInit () at ../xlibre-server-9999/Xext/glx/vndext.c:244
#4 0x0000555555571a2d in InitExtensions (argc=argc@entry=2, argv=argv@entry=0x7fffffffda68) at ../xlibre-server-9999/mi/miinitext.c:264
#5 0x00005555555aff55 in dix_main (argc=2, argv=0x7fffffffda68, envp=<optimized out>) at ../xlibre-server-9999/dix/main.c:199
#6 0x00007ffff75223fb in ?? () from /usr/lib64/libc.so.6
#7 0x00007ffff75224ab in __libc_start_main () from /usr/lib64/libc.so.6
#8 0x0000555555571595 in _start ()
(gdb) c
Continuing.
Breakpoint 2.2, xorgGlxServerInit (pcbl=<optimized out>, param=<optimized out>, ext=<optimized out>) at ../xlibre-server-9999/Xext/glx/glxext.c:527
527 DIX_FOR_EACH_SCREEN({
(gdb) bt
#0 xorgGlxServerInit (pcbl=<optimized out>, param=<optimized out>, ext=<optimized out>) at ../xlibre-server-9999/Xext/glx/glxext.c:527
#1 xorgGlxServerInit (pcbl=<optimized out>, param=<optimized out>, ext=<optimized out>) at ../xlibre-server-9999/Xext/glx/glxext.c:514
#2 0x00005555555b135c in _CallCallbacks (pcbl=pcbl@entry=0x5555557915c0 <vndInitCallbackListPtr>, call_data=call_data@entry=0x555557c14eb0) at ../xlibre-server-9999/dix/dixutils.c:692
#3 0x00005555556abf8b in CallCallbacks (pcbl=0x5555557915c0 <vndInitCallbackListPtr>, call_data=0x555557c14eb0) at ../xlibre-server-9999/include/callback.h:79
#4 GlxExtensionInit () at ../xlibre-server-9999/Xext/glx/vndext.c:244
#5 0x0000555555571a2d in InitExtensions (argc=argc@entry=2, argv=argv@entry=0x7fffffffda68) at ../xlibre-server-9999/mi/miinitext.c:264
#6 0x00005555555aff55 in dix_main (argc=2, argv=0x7fffffffda68, envp=<optimized out>) at ../xlibre-server-9999/dix/main.c:199
#7 0x00007ffff75223fb in ?? () from /usr/lib64/libc.so.6
#8 0x00007ffff75224ab in __libc_start_main () from /usr/lib64/libc.so.6
#9 0x0000555555571595 in _start ()
(gdb) c
Continuing.
Breakpoint 3, egl_screen_probe (pScreen=0x555555b18710) at ../xlibre-server-9999/glamor/glamor_glx_provider.c:379
379 {
(gdb) bt
#0 egl_screen_probe (pScreen=0x555555b18710) at ../xlibre-server-9999/glamor/glamor_glx_provider.c:379
#1 0x00007ffff6fab8df in xorgGlxServerInit (pcbl=<optimized out>, param=<optimized out>, ext=<optimized out>) at ../xlibre-server-9999/Xext/glx/glxext.c:527
#2 xorgGlxServerInit (pcbl=<optimized out>, param=<optimized out>, ext=<optimized out>) at ../xlibre-server-9999/Xext/glx/glxext.c:514
#3 0x00005555555b135c in _CallCallbacks (pcbl=pcbl@entry=0x5555557915c0 <vndInitCallbackListPtr>, call_data=call_data@entry=0x555557c14eb0) at ../xlibre-server-9999/dix/dixutils.c:692
#4 0x00005555556abf8b in CallCallbacks (pcbl=0x5555557915c0 <vndInitCallbackListPtr>, call_data=0x555557c14eb0) at ../xlibre-server-9999/include/callback.h:79
#5 GlxExtensionInit () at ../xlibre-server-9999/Xext/glx/vndext.c:244
#6 0x0000555555571a2d in InitExtensions (argc=argc@entry=2, argv=argv@entry=0x7fffffffda68) at ../xlibre-server-9999/mi/miinitext.c:264
#7 0x00005555555aff55 in dix_main (argc=2, argv=0x7fffffffda68, envp=<optimized out>) at ../xlibre-server-9999/dix/main.c:199
#8 0x00007ffff75223fb in ?? () from /usr/lib64/libc.so.6
#9 0x00007ffff75224ab in __libc_start_main () from /usr/lib64/libc.so.6
#10 0x0000555555571595 in _start ()
(gdb) c
Continuing.
Breakpoint 2.3, xorgGlxServerInit (pcbl=0x5555557915c0 <vndInitCallbackListPtr>, param=0x0, ext=0x555557c14eb0) at ../xlibre-server-9999/Xext/glx/glxext.c:515
515 {
(gdb) bt
#0 xorgGlxServerInit (pcbl=0x5555557915c0 <vndInitCallbackListPtr>, param=0x0, ext=0x555557c14eb0) at ../xlibre-server-9999/Xext/glx/glxext.c:515
#1 0x00005555555b135c in _CallCallbacks (pcbl=pcbl@entry=0x5555557915c0 <vndInitCallbackListPtr>, call_data=call_data@entry=0x555557c14eb0) at ../xlibre-server-9999/dix/dixutils.c:692
#2 0x00005555556abf8b in CallCallbacks (pcbl=0x5555557915c0 <vndInitCallbackListPtr>, call_data=0x555557c14eb0) at ../xlibre-server-9999/include/callback.h:79
#3 GlxExtensionInit () at ../xlibre-server-9999/Xext/glx/vndext.c:244
#4 0x0000555555571a2d in InitExtensions (argc=argc@entry=2, argv=argv@entry=0x7fffffffda68) at ../xlibre-server-9999/mi/miinitext.c:264
#5 0x00005555555aff55 in dix_main (argc=2, argv=0x7fffffffda68, envp=<optimized out>) at ../xlibre-server-9999/dix/main.c:199
#6 0x00007ffff75223fb in ?? () from /usr/lib64/libc.so.6
#7 0x00007ffff75224ab in __libc_start_main () from /usr/lib64/libc.so.6
#8 0x0000555555571595 in _start ()
(gdb) c
Continuing.
Breakpoint 2.4, xorgGlxServerInit (pcbl=<optimized out>, param=<optimized out>, ext=<optimized out>) at ../xlibre-server-9999/Xext/glx/glxext.c:527
527 DIX_FOR_EACH_SCREEN({
(gdb) bt
#0 xorgGlxServerInit (pcbl=<optimized out>, param=<optimized out>, ext=<optimized out>) at ../xlibre-server-9999/Xext/glx/glxext.c:527
#1 xorgGlxServerInit (pcbl=<optimized out>, param=<optimized out>, ext=<optimized out>) at ../xlibre-server-9999/Xext/glx/glxext.c:514
#2 0x00005555555b135c in _CallCallbacks (pcbl=pcbl@entry=0x5555557915c0 <vndInitCallbackListPtr>, call_data=call_data@entry=0x555557c14eb0) at ../xlibre-server-9999/dix/dixutils.c:692
#3 0x00005555556abf8b in CallCallbacks (pcbl=0x5555557915c0 <vndInitCallbackListPtr>, call_data=0x555557c14eb0) at ../xlibre-server-9999/include/callback.h:79
#4 GlxExtensionInit () at ../xlibre-server-9999/Xext/glx/vndext.c:244
#5 0x0000555555571a2d in InitExtensions (argc=argc@entry=2, argv=argv@entry=0x7fffffffda68) at ../xlibre-server-9999/mi/miinitext.c:264
#6 0x00005555555aff55 in dix_main (argc=2, argv=0x7fffffffda68, envp=<optimized out>) at ../xlibre-server-9999/dix/main.c:199
#7 0x00007ffff75223fb in ?? () from /usr/lib64/libc.so.6
#8 0x00007ffff75224ab in __libc_start_main () from /usr/lib64/libc.so.6
#9 0x0000555555571595 in _start ()
(gdb) c
Didn't investigate deep , it looks |
|
@stefan11111 This is linking problem? Breakpoint 1, glamor_egl_screen_init (screen=0x555555b18770, glamor_ctx=0x555555b1ee58) at ../xlibre-server-9999/glamor/glamor_egl.c:1692
1740 if (!vendor_initialized) {
(gdb)
1741 GlxPushProvider(&glamor_provider);
(gdb) p __glXProviderStack
$1 = (__GLXprovider *) 0x7ffff7327090 <__glXDRI2Provider>
(gdb) info symbol __glXProviderStack
__glXDRI2Provider in section .data of /usr/lib64/xorg/modules/xlibre-25/extensions/libglx.so
(gdb) s
GlxPushProvider (provider=0x7ffff6feb160 <glamor_provider>) at ../xlibre-server-9999/Xext/glx/glxext.c:284
284 {
(gdb) p __glXProviderStack
$2 = (__GLXprovider *) 0x7ffff6feb650 <__glXDRISWRastProvider>
(gdb) info symbol __glXProviderStack
__glXDRISWRastProvider in section .data of /usr/lib64/xorg/modules/xlibre-25/libglamoregl.so
notice how |
Not 100% sure if it impacts kdrive
Backport dashboard
release/25.2release/25.1release/25.0The
xorgGlxCreateVendor()call is present inglamor_egl.con all three release lines, so the one-line removal applies cleanly to each. Release-line merges are manual/maintainer-only.