Bug 1768193

Summary: dcopserver doesn't launch
Product: [Fedora] Fedora Reporter: Pierre Juhen <pierre.juhen>
Component: kdelibs3Assignee: Kevin Kofler <kevin>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 31CC: goeran, gtwilliams, jreznik, kevin, rozzo, smparrish, than
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: kdelibs3-3.5.10-105.fc32 kdelibs3-3.5.10-105.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-22 08:10:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pierre Juhen 2019-11-03 10:30:55 UTC
Description of problem:
ksensors doesn't work anymore.
Dcopserver refuses to start in user mode

Version-Release number of selected component (if applicable) 
kdelibs3-3.5.10-101.fc31.x86_64

How reproducible:
launch dcopserver on a terminal. You will get 

ICE Connection rejected!

DCOPClient::attachInternal. Attach failed Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
ICE Connection rejected!

DCOPClient::attachInternal. Attach failed Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
DCOPServer self-test failed.


Additional info:

Works as root : "sudo ksensors &" display a new ksensors on screen 

.DCOPserver_pierre__0 appears in /root

Comment 1 Kevin Kofler 2019-11-03 13:07:28 UTC
Your use of sudo for KDE 3 applications screwed up the socket permissions in your home directory. Try deleting the .DCOP* and .ICE* sockets/files in your home directory and then running ksensors again. And next time do not run GUI applications under sudo, use kdesu instead.

Comment 2 Pierre Juhen 2019-11-03 18:22:07 UTC
Hi Kevin,

sorry, but I had only one .ICE* (owners and group myself) and no .DCOP*

I removed the .ICEauthauthority, but it didn'change anything. 

It's not linked to selinux.

It seems linked to the Fedora 31 migration.

Comment 3 Garry T. Williams 2020-05-10 17:33:50 UTC
I believe this started at f31 upgrade, too (without any attempt to run GUI apps as root).

I have been unable to find a way to start dcopserver.

.xsession_errors:
/usr/bin/iceauth:  creating new authority file /run/user/1000/ICEauthority
DCOPClient::attachInternal. Attach failed Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
ICE Connection rejected!

From command line:
$ dcopserver&         
[1] 8584
garry@tfr$ ICE Connection rejected!

DCOPClient::attachInternal. Attach failed Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
ICE Connection rejected!

DCOPClient::attachInternal. Attach failed Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
DCOPServer self-test failed

I created a new user; logged out; logged in as new user and examined new user's .xsession-errors to find exactly the same errors being noted.

I used to be able to run ksensors, but not any more due to this error.

Still not fixed in f32.

Comment 4 rossano 2020-05-14 22:26:11 UTC
I have upgraded from F30 to F31 few days ago.
When I try to view an attached file in kmail I get the same error.
I also created a new user but I always get the same error.
Sorry for my bad english

Comment 5 Kevin Kofler 2020-05-14 22:28:53 UTC
What is the type of the attached file? This error should normally occur, if at all, only with legacy kdelibs3 applications. So I wonder with what application KMail is trying to open the file.

Comment 6 rossano 2020-05-14 22:35:53 UTC
The type of files are images (most jpg) and pdf.
The programs are gwenview and okular.
With F30 this did not happen.

Comment 7 rossano 2020-05-14 22:40:30 UTC
... and I haven't DCOP* and .ICE* sockets/files in my home directory

Comment 8 rossano 2020-05-15 07:51:16 UTC
Sorry, one important thing: after the error message, okular or gwenview show the files.
I also tried with ksensors and I get the same error as  Pierre Juhen.
It is possible to upload some screenshots? If yes how is it possible?

Comment 9 Garry T. Williams 2020-06-06 15:53:41 UTC
Found it!

If I unset XDG_RUNTIME_DIR, I can start ksensors (or dcopserver, etc.).
Otherwise I get the "ICE Connection rejected!" error.

Comment 10 Kevin Kofler 2020-06-17 22:00:55 UTC
Reporting this to upstream is useless, kdelibs3 is no longer supported upstream.

It is clear that something must have changed recently, because XDG_RUNTIME_DIR has always been set (it was already set on F29, at least) and dcopserver worked fine.

Do you have SELinux enabled? If so, do you see an AVC error from SELinux? And can you try temporarily setting it to permissive (sudo setenforce 0)? (Or even disabling it entirely, though that requires a reboot, and if you wish to reenable it later, another reboot followed by a lengthy file system relabeling.)

Comment 11 Pierre Juhen 2020-06-18 04:59:43 UTC
Yes, I have selinux enabled.

Rebooting with selinux=0 doesn't change anything.

On my system :

[pierre@pierre ~]$ echo $XDG_RUNTIME_DIR
/run/user/1000

[pierre@pierre ~]$ ls -laZ /run/user/1000
total 4
drwx------. 8 pierre pierre system_u:object_r:user_tmp_t:s0        300 18 juin  06:54 .
drwxr-xr-x. 3 root   root   system_u:object_r:user_tmp_t:s0         60 18 juin  06:52 ..
srw-rw-rw-. 1 pierre pierre unconfined_u:object_r:user_tmp_t:s0      0 18 juin  06:52 bus
drwx------. 2 pierre pierre unconfined_u:object_r:config_home_t:s0  60 18 juin  06:52 dconf
drwx------. 2 pierre pierre unconfined_u:object_r:user_tmp_t:s0     40 18 juin  06:52 gvfs
-rw-------. 1 pierre pierre unconfined_u:object_r:user_tmp_t:s0      0 18 juin  06:54 ICEauthority
d---------. 3 pierre pierre system_u:object_r:user_tmp_t:s0        160 18 juin  06:52 inaccessible
srw-------. 1 pierre pierre unconfined_u:object_r:user_tmp_t:s0      0 18 juin  06:52 kdeinit5__0
drwx------. 2 pierre pierre unconfined_u:object_r:user_tmp_t:s0     60 18 juin  06:52 keyring
srwxrwxr-x. 1 pierre pierre unconfined_u:object_r:user_tmp_t:s0      0 18 juin  06:52 klauncherDmVcEa.1.slave-socket
-rw-rw-r--. 1 pierre pierre unconfined_u:object_r:user_tmp_t:s0     67 18 juin  06:52 KSMserver__0
srwxr-xr-x. 1 pierre pierre system_u:object_r:user_tmp_t:s0          0 18 juin  06:52 kwallet5.socket
srw-rw-rw-. 1 pierre pierre unconfined_u:object_r:user_tmp_t:s0      0 18 juin  06:52 pipewire-0
drwx------. 2 pierre pierre unconfined_u:object_r:user_tmp_t:s0     80 18 juin  06:52 pulse
drwxr-xr-x. 4 pierre pierre unconfined_u:object_r:user_tmp_t:s0    120 18 juin  06:52 systemd

Regards,

Comment 12 Kevin Kofler 2020-06-18 10:08:43 UTC
It looks like this was broken by this libICE change:
https://gitlab.freedesktop.org/xorg/lib/libice/-/commit/b484311c929a1b64966d89da92fafce7263006e1

Does this:
export ICEAUTHORITY="$HOME/.ICEauthority"
ksensors
help as a workaround?

DCOP has its own copy of authutil.c, which does not have this change, and so it does not find the file written by iceauth, which uses the system libICE with this change.

Comment 15 Kevin Kofler 2020-06-18 10:23:40 UTC
This affects libICE 1.0.10, hence Fedora 31 and upwards.

Comment 16 Kevin Kofler 2020-06-18 10:29:36 UTC
We may also need this in kdebase3:
http://mirror.git.trinitydesktop.org/cgit/tdebase/commit/?id=ed93cf0e084d52ca58c8a966fa9506af4484a8a9
though we do not ship the KDE 3 ksmserver executable, so it might not actually be needed.

Comment 17 Kevin Kofler 2020-06-18 12:15:27 UTC
I am sorry that I have not acted earlier on this. Unfortunately, the bug had several characteristics that made it look like a configuration error:
* Only one person had reported it, and nobody else had confirmed it for several months.
* The symptoms happened to match the ones of a frequent configuration error, where the ICEauthority file ended up owned by root due to the use of su/sudo, leading to dcopserver failing the same way.
* The suggested workaround actually used sudo, making it look even more like the above.
* The bug is not caused by a change in kdelibs3 itself (there wasn't any), but in libICE. As a result, the exact same kdelibs3 works fine with an older libICE (and I was not actually running F31 yet myself).

By the way, there must be an additional bug as per comment #4, because KMail should not be running anything depending on DCOP.

Comment 18 Kevin Kofler 2020-06-18 12:17:50 UTC
The additional bug (comment #4) seems to be yet another case of some KF5 Framework attempting to run a kdelibs3 binary from /usr/bin instead of the binary from /usr/libexec/kf5 it is supposed to run.

Comment 19 Pierre Juhen 2020-06-18 12:26:30 UTC
It looks like this was broken by this libICE change:
https://gitlab.freedesktop.org/xorg/lib/libice/-/commit/b484311c929a1b64966d89da92fafce7263006e1

Does this:
export ICEAUTHORITY="$HOME/.ICEauthority"
ksensors
help as a workaround?

DCOP has its own copy of authutil.c, which does not have this change, and so it does not find the file written by iceauth, which uses the system libICE with this change.


-------------------

Hi,

this workaround works 

Regards,

Comment 20 Kevin Kofler 2020-06-18 12:40:24 UTC
My guess is that comment #4 is a bug similar to bug #1512418, but with some other executable, possibly kioexec.

Comment 21 Kevin Kofler 2020-06-18 12:41:02 UTC
> this workaround works

Great.

I am building kdelibs3 and kdebase3 updates that should fix this permanently.

Comment 22 Kevin Kofler 2020-06-18 13:03:32 UTC
The bug from comment #4 is now filed as bug #1848491. That bug needs to be fixed in kf5-kio.

Comment 23 Kevin Kofler 2020-06-18 13:21:01 UTC
So, actually, the KDE 3 ksmserver should not be relevant, so I am not going to update kdebase3. kdelibs3 updates are now build, I am filing them in Bodhi.

Comment 24 Fedora Update System 2020-06-18 13:24:18 UTC
FEDORA-2020-e7b4dbd0cd has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-e7b4dbd0cd

Comment 25 Fedora Update System 2020-06-18 13:24:18 UTC
FEDORA-2020-0ad31a5893 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-0ad31a5893

Comment 26 Kevin Kofler 2020-06-18 13:35:45 UTC
For the record, this is the fix (backported from Trinity tdelibs):
https://src.fedoraproject.org/rpms/kdelibs3/blob/master/f/kdelibs-3.5.10-libice-1.0.10.patch

Comment 27 Fedora Update System 2020-06-19 16:15:50 UTC
FEDORA-2020-e7b4dbd0cd has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-e7b4dbd0cd`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-e7b4dbd0cd

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 28 Fedora Update System 2020-06-19 21:55:22 UTC
FEDORA-2020-0ad31a5893 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-0ad31a5893`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-0ad31a5893

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 29 Fedora Update System 2020-06-22 08:10:10 UTC
FEDORA-2020-0ad31a5893 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 30 Fedora Update System 2020-06-27 03:07:24 UTC
FEDORA-2020-e7b4dbd0cd has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.