Bugzilla – Bug 1221078
xorg programs (xset, xterm etc) running as root cause an infinite loop waiting for authentication when XAUTHORITY and XAUTHLOCALHOSTNAME are not set.
Last modified: 2024-03-06 15:40:26 UTC
I noticed a lot of zypper dup sessions hanging at the post scripts stage causing the cpu to spike with the process 'xset fp rehash'. User fvogt on irc helped me troubleshoot the issue which ended up being triggered by my using doas instead of su/sudo. While su/sudo seem to be setting the display/xauth related environment sufficiently, doas did not. Testing the working 'su' session by unsetting XAUTHORITY and XAUTHLOCALHOSTNAME causes those sessions to fail exactly the same way as well. When running xset or xterm I get the error message "Authorization required, but no authorization protocol specified" looping indefinetely. The program does not complete or exit with an error, causing the CPU spike mentioned at the beginning. I don't know if it makes a difference but I am actually running Wayland (KDE Plasma) not Xorg and have not tested the same parameters on Xorg.
https://build.opensuse.org/package/rdiff/X11:XOrg/libxcb?linkrev=base&rev=67 caused a regression by moving the "*stage = 2" assignment inside the if by accident. Fixed with https://build.opensuse.org/request/show/1155610
Ouch. Shit happens. :-( Thanks for spotting this, Fabian!
Fix works for me. Thanks a lot.
*** Bug 1219962 has been marked as a duplicate of this bug. ***