Bug 1221078 - xorg programs (xset, xterm etc) running as root cause an infinite loop waiting for authentication when XAUTHORITY and XAUTHLOCALHOSTNAME are not set.
Summary: xorg programs (xset, xterm etc) running as root cause an infinite loop waiti...
Status: RESOLVED FIXED
: 1219962 (view as bug list)
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: X.Org (show other bugs)
Version: Current
Hardware: x86-64 openSUSE Tumbleweed
: P5 - None : Minor (vote)
Target Milestone: ---
Assignee: Fabian Vogt
QA Contact: Gfx Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-06 15:23 UTC by X
Modified: 2024-03-06 15:40 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description X 2024-03-06 15:23:44 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.
Comment 1 Fabian Vogt 2024-03-06 15:25:21 UTC
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
Comment 2 Stefan Dirsch 2024-03-06 15:33:31 UTC
Ouch. Shit happens. :-(

Thanks for spotting this, Fabian!
Comment 3 X 2024-03-06 15:36:49 UTC
Fix works for me. Thanks a lot.
Comment 4 Stefan Dirsch 2024-03-06 15:40:26 UTC
*** Bug 1219962 has been marked as a duplicate of this bug. ***