LibreOffice-4.2.2 frequently but intermittently fails to start on Slackware Linux with the following error:
XDM authorization key matches an existing client!
/opt/libreoffice4.2/program/soffice.bin X11 error: Can't open display:
The startup failure happens about 65% of the time; the other 35% of the time it starts and runs correctly. The problem did not occur with LibreOffice-4.1.4 on the same system.
This happens when using XDM as the login manager, and only when XDM-AUTHORIZATION-1 authentication is enabled (as it is by default with xdm). I can disable XDM-AUTHORIZATION-1 and enable only MIT-MAGIC-COOKIE-1 by placing the following into /etc/X11/xdm/xdm-config:
Then the problem goes away, and LibreOffice-4.2.2 always starts correctly.
Possibly the same exact issue was reported with Firefox, about 10 years ago, as documented here: https://bugzilla.mozilla.org/show_bug.cgi?id=246313
My understanding is that the problem is caused by a race condition between child and parent processes opening a connection to the X server (hence the intermittent nature), and/or the weakness in XDM-AUTHORIZATION-1 generation of unique tokens.
I confirm this for 4.2.6-secfix_Linux_x86-64 (August 30, 2014) and 4.3.3_Linux_x86-64 (November 4, 2014) AND XDM+WindowMaker (built from October git commits).
4.2.6 worked before without fails (so it stopped working recently), 4.3.3 was just installed.
...184.108.40.206 for x86_64 works as usual.
Interesting bug. I'll check w/the devs for further input.
(In reply to Yury from comment #1)
> I confirm this for 4.2.6-secfix_Linux_x86-64 (August 30, 2014) and
> 4.3.3_Linux_x86-64 (November 4, 2014) AND XDM+WindowMaker (built from
> October git commits).
> 4.2.6 worked before without fails (so it stopped working recently), 4.3.3
> was just installed.
(In reply to Yury from comment #2)
> ...220.127.116.11 for x86_64 works as usual.
Well if 3.6 is still working, that sounds like it could be a regression.
Yury: How consistently can you cause this failure? Perhaps we can track-down which specific commit is the culprit here. Have you ever used the bibisect tool?
Bug author follow-up. Now using Libreoffice-4.3.2, and it fails about 75% of the time if I let XDM do XDM-AUTHORIZATION-1.
By comparing strace logs, I can see the failure occurs when a single thread (which I think runs "soffice.bin --splash-pipe=5") opens 2 connections to the X server within 1 second (specifically, when time(NULL) returns the same value both times.) With the same PID and timestamp, it gets the same XDM-AUTHORIZATION-1 key, and the X server rejects the second one. When the two connection tries have time() values 1 second apart, it works. Therefore it should fail more often on a faster system.
I have no idea if this will help anyone.
By the way, if I disable the Libreoffice splash screen, it still fails.
Dear Bug Submitter,
This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INVALID
due to lack of needed information.
For more information about our NEEDINFO policy please read the
wiki located here:
If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.
Thank you for helping us make LibreOffice even better for everyone!
This NEEDINFO Message was generated on: 2015-06-08
Changing status from NEEDINFO back to UNCONFIRMED in response to automated
email (see comment #6 above). I don't know who moved it to NEEDINFO or why
since nobody seems to be asking me for INFO.
(In reply to lb2048 from comment #7)
Looks like the last test you reported was back in November. Are you still seeing the same XDM error with our latest builds?
Status -> NEEDINFO
(For the very latest, see daily builds of master and our upcoming 5.0 here:
Yury: Are you still seeing the same bug as well?
I can confirm that the problem exists in libreoffice-4.3.7 (current "still" release) and does not occur with libreoffice-4.4.3 (current "fresh" release). That is, I can easily duplicate the problem (if I re-enable XDM-AUTHORIZATION-1) with 4.3.7, and am unable to duplicate it at all with 4.4.3. So as far as I am concerned this is resolved.
Do you want me to change the bug report to resolved, or are you waiting to hear from Yuri as well?
Changing to Resolved - Fixed because this seems to have been fixed in 4.4.x
Let's change to WFM as we don't know the exact fix.
Migrating Whiteboard tags to Keywords: (needAdvice possibleRegression)
'needsConfirmationAdvice' is only used for unconfirmed bugs. Removing it from this bug.