Bug 1073996

Summary: libxcb1, Display socket connection issue causes infinite retries
Product: [openSUSE] openSUSE Tumbleweed Reporter: patrick shanahan <paka>
Component: X.OrgAssignee: Michal Srb <msrb>
Status: RESOLVED FIXED QA Contact: Fabian Vogt <fvogt>
Severity: Major    
Priority: P5 - None CC: fniepelt, hguo, msrb, paka
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description patrick shanahan 2017-12-22 13:34:24 UTC
python app backintime when running from cron starts xdpyinfo instance when never finishes causing 100% cpu use

determined by Fabian Vogt
Comment 1 Fabian Vogt 2017-12-22 13:44:16 UTC
strace revealed that it tries to connect infinitely to the X11 socket, which results in "No protocol specified".
GDB shows that get_authptr never incremented the value of *stage, which results in a retry loop without termination.

So it seems like some failure paths cause *stage to not get incremented.
Comment 2 Fabian Niepelt 2018-01-02 17:54:16 UTC
Hello,

Pulseaudio seems to suffer from the same issue.

See bug #1074361

Greetings
Fabian
Comment 3 Takashi Iwai 2018-01-03 07:51:57 UTC
*** Bug 1074361 has been marked as a duplicate of this bug. ***
Comment 4 patrick shanahan 2018-01-03 15:12:18 UTC
now also affecting Leap 42.2, but also hangs the backup (backintime).
Comment 5 Michal Srb 2018-01-05 10:18:58 UTC
A fix for this issue was submitted in OBS:
https://build.opensuse.org/request/show/559388

However it does not work fully. The app still goes into infinite loop if:
* the DISPLAY is set to non-local address (e.g. 192.168.1.1:0) and exists
* the client is refused with its cookie
* the XAUTHLOCALHOSTNAME is not set

The patch needs to be modified differently.
Comment 6 Michal Srb 2018-01-05 11:51:44 UTC
Updated patch submitted into Factory:
https://build.opensuse.org/request/show/561849

Into OpenSUSE:
https://build.opensuse.org/request/show/561857

SLE does not use that patch.
Comment 7 patrick shanahan 2018-01-05 12:30:35 UTC
(In reply to patrick shanahan from comment #4)
> now also affecting Leap 42.2, but also hangs the backup (backintime).

temporary work-a-round that "seems" to help:
  cron job: kill -9 $(pidof xdpyinfo)
Comment 8 patrick shanahan 2018-01-06 14:01:47 UTC
(In reply to Michal Srb from comment #6)
> Updated patch submitted into Factory:
> https://build.opensuse.org/request/show/561849
> 
> Into OpenSUSE:
> https://build.opensuse.org/request/show/561857
> 
> SLE does not use that patch.

Tumbleweed package is upgraded into:
  https://download.opensuse.org/repositories/X11:/XOrg/openSUSE_Tumbleweed/

but needs to replace/upgrade package libxcb1-1.12-2.1.x86_64 in:
  http://download.opensuse.org/tumbleweed/repo/oss/
Comment 9 Michal Srb 2018-01-08 08:49:06 UTC
(In reply to patrick shanahan from comment #8)
> Tumbleweed package is upgraded into:
>   https://download.opensuse.org/repositories/X11:/XOrg/openSUSE_Tumbleweed/
> 
> but needs to replace/upgrade package libxcb1-1.12-2.1.x86_64 in:
>   http://download.opensuse.org/tumbleweed/repo/oss/

The fix is now in devel project (X11:XOrg) and submitted to Factory, currently waiting in openSUSE:Factory:Staging:B project. Eventually it will be accepted to Factory and later picked for Tumbleweed.

If there is any issue during this process, I will resolve it, but otherwise there is nothing that needs to be done. If you need the fixed package now, pick it from the devel project. It will eventually propagate into the Tumbleweed repository.
Comment 10 Swamp Workflow Management 2018-01-09 08:30:06 UTC
This is an autogenerated message for OBS integration:
This bug (1073996) was mentioned in
https://build.opensuse.org/request/show/562772 42.2+42.3 / libxcb
Comment 11 Michal Srb 2018-01-09 10:05:48 UTC
*** Bug 1075157 has been marked as a duplicate of this bug. ***
Comment 12 Swamp Workflow Management 2018-01-15 14:13:08 UTC
openSUSE-RU-2018:0091-1: An update that has one recommended fix can now be installed.

Category: recommended (important)
Bug References: 1073996
CVE References: 
Sources used:
openSUSE Leap 42.3 (src):    libxcb-1.11.1-9.1
openSUSE Leap 42.2 (src):    libxcb-1.11.1-3.7.1
Comment 13 patrick shanahan 2018-01-15 14:26:43 UTC
fwiw: libxcb1-1.12-59.1.x86_64

has solved my problems on 3 Tumbleweeds and a 42.2 server since 06 Jan

tks