Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 841662 - x11-base/xorg-server segfault in DRI2Authenticate
Summary: x11-base/xorg-server segfault in DRI2Authenticate
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-29 10:51 UTC by Joakim Tjernlund
Modified: 2023-05-23 06:32 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (file_841662.txt,8.81 KB, text/plain)
2022-04-30 17:10 UTC, Joakim Tjernlund
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Tjernlund 2022-04-29 10:51:38 UTC
Last few days we started to see this SEGV during login:
[    35.257] (EE)                                                                                                         
[    35.257] (EE) Backtrace:                                                                                              
[    35.257] (EE) 0: /usr/bin/X (xorg_backtrace+0x5b) [0x56145d5b41eb]                                                    
[    35.257] (EE) 1: /usr/bin/X (0x56145d47a000+0x13de55) [0x56145d5b7e55]                                                
[    35.257] (EE) 2: /lib64/libc.so.6 (0x7fa38481e000+0x3d770) [0x7fa38485b770]                                           
[    35.257] (EE) 3: /usr/bin/X (DRI2Authenticate+0x28) [0x56145d632d78]                                                  
[    35.257] (EE) 4: /usr/bin/X (0x56145d47a000+0x1b9ae2) [0x56145d633ae2]                                                
[    35.257] (EE) 5: /usr/bin/X (0x56145d47a000+0x72c25) [0x56145d4ecc25]                                                 
[    35.257] (EE) 6: /usr/bin/X (0x56145d47a000+0x76934) [0x56145d4f0934]                                                 
[    35.257] (EE) 7: /lib64/libc.so.6 (0x7fa38481e000+0x2919a) [0x7fa38484719a]                                           
[    35.257] (EE) 8: /lib64/libc.so.6 (__libc_start_main+0x78) [0x7fa384847248]                                           
[    35.257] (EE) 9: /usr/bin/X (_start+0x21) [0x56145d4b4a91]                                                            
[    35.257] (EE)                                                                                                         
[    35.257] (EE) Segmentation fault at address 0x1                                                                       
[    35.257] (EE)   
                   
on different machines and GPUs, in both MATE and KDE
We have not updated anything significant but gcc 9 to 11

Rebuilt several Xorg pkgs:, xorg-serv, all X drivers, libX11 etc. but 
didn't help. Any clues welcome.
Comment 1 Mike Gilbert gentoo-dev 2022-04-29 17:29:24 UTC
Please enable debug symbols for the x11-base/xorg-server package. You should then be able to obtain a more useful backtrace.

Also, always provide emerge --info.
Comment 2 Joakim Tjernlund 2022-04-30 17:09:55 UTC
BT from gdb
(gdb) bt
#0  DRI2Authenticate (client=client@entry=0x5588c132b270, pScreen=0x5588c0700770, magic=1)
    at /var/tmp/portage/x11-base/xorg-server-21.1.3-r1/xorg-server-21.1.3/hw/xfree86/dri2/dri2.c:1368
#1  0x00005588bfce2ae2 in ProcDRI2Authenticate (client=0x5588c132b270)
    at /var/tmp/portage/x11-base/xorg-server-21.1.3-r1/xorg-server-21.1.3/hw/xfree86/dri2/dri2ext.c:156
#2  ProcDRI2Dispatch (client=0x5588c132b270)
    at /var/tmp/portage/x11-base/xorg-server-21.1.3-r1/xorg-server-21.1.3/hw/xfree86/dri2/dri2ext.c:609
#3  0x00005588bfb9bc25 in Dispatch ()
    at /var/tmp/portage/x11-base/xorg-server-21.1.3-r1/xorg-server-21.1.3/dix/dispatch.c:550
#4  0x00005588bfb9f934 in dix_main (argc=14, argv=0x7fffad3bbdb8, envp=<optimized out>)
    at /var/tmp/portage/x11-base/xorg-server-21.1.3-r1/xorg-server-21.1.3/dix/main.c:272
#5  0x00007fcaaffde19a in __libc_start_call_main (main=main@entry=0x5588bfb63a60 <main>, argc=argc@entry=14, 
    argv=argv@entry=0x7fffad3bbdb8) at ../sysdeps/nptl/libc_start_call_main.h:58
#6  0x00007fcaaffde248 in __libc_start_main_impl (main=0x5588bfb63a60 <main>, argc=14, argv=0x7fffad3bbdb8, 
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffad3bbda8)
    at ../csu/libc-start.c:409
#7  0x00005588bfb63a91 in _start ()
Comment 3 Joakim Tjernlund 2022-04-30 17:10:49 UTC
Created attachment 775698 [details]
emerge --info
Comment 4 Joakim Tjernlund 2022-04-30 17:12:04 UTC
print dri2_client
$1 = (DRI2ClientPtr) 0x1

1 is not a good ptr value
Comment 5 Joakim Tjernlund 2022-04-30 17:26:00 UTC
Also reported upstream: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1340
Comment 6 Alexander Puchmayr 2023-05-22 13:11:57 UTC
Seems like I have the same problem here on at least two different machines, the stack trace looks exactly like the one shown in this thread.

x11-base/xorg-server-21.1.7 dies with segfault when opening the remote console of a virtual machine connected to via virt-manager. 

Does not happen on all machines, but when it happens, it happens reproducibly. All machines, affected and non-affected, are built from same portage snapshot. 

I can reproduce this via:

1. Have a virtual machine on a remote host, managed by libvirt. Graphics interface in VM is set to QXL and spice server
2. On admin-Terminal, open virt-manager and open the console for the VM
3. Crash. Thrown out of X, need to re-login

app-emulation/virt-manager-4.0.0 [gtk]
net-misc/spice-gtk-0.41-r1

(gdb) bt
#0  0x00007fb2f3f195cc in ?? () from /lib64/libc.so.6
#1  0x00007fb2f3ecd0e2 in raise () from /lib64/libc.so.6
#2  0x00007fb2f3eb7473 in abort () from /lib64/libc.so.6
#3  0x000055b0df2500dc in OsAbort ()
#4  0x000055b0df2557f5 in ?? ()
#5  0x000055b0df2567c6 in FatalError ()
#6  0x000055b0df24d5d9 in ?? ()
#7  <signal handler called>
#8  0x000055b0df2c86a8 in DRI2Authenticate ()
#9  0x000055b0df2c9412 in ?? ()
#10 0x000055b0df181c55 in ?? ()
#11 0x000055b0df185964 in ?? ()
#12 0x00007fb2f3eb820c in ?? () from /lib64/libc.so.6
#13 0x00007fb2f3eb82bc in __libc_start_main () from /lib64/libc.so.6
#14 0x000055b0df149ac1 in _start ()
Comment 7 Joakim Tjernlund 2023-05-22 13:30:16 UTC
I think my problem went away with x11-drivers/xf86-video-qxl-0.1.6

Perhaps you need to rebuild this pkg to avoid any ABI issues ?
Comment 8 Joakim Tjernlund 2023-05-22 13:37:41 UTC
net-misc/spice-gtk-0.41-r1 is old
There is net-misc/spice-gtk-0.42
Comment 9 Alexander Puchmayr 2023-05-22 13:45:54 UTC
x11-drivers/xf86-video-qxl is a driver module for Xorg. This is not involved in the problem:

The server(VM), to which I want to connect to, is in a text-console mode only installation, Xorg not even installed. libvirt/qemu is emulating a virtual QXL based graphics card.

The clients which are crashing, is (1) a native amd-radeon driver and the (2) a virtualbox based desktop system running the vmware driver.
Comment 10 Alexander Puchmayr 2023-05-23 06:32:05 UTC
Upgraded spice-gtk to net-misc/spice-gtk-0.42, but same problem. As soon as I open the virtmanager-console for a VM crash.