Bug 386859 - KF5 KIO runs /usr/bin/kioslave instead of /usr/libexec/kf5/kioslave, crashing the kdelibs3 kioslave
Summary: KF5 KIO runs /usr/bin/kioslave instead of /usr/libexec/kf5/kioslave, crashing...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.40.0
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-13 16:09 UTC by Kevin Kofler
Modified: 2019-08-25 12:20 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Kofler 2017-11-13 16:09:31 UTC
This was originally reported downstream at Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1512418

This code in KF5 KIO:
https://cgit.kde.org/kio.git/tree/src/core/slave.cpp?id=04147e26fa2c03584856693dddf7117d20f2ae6f#n507
introduced by this 2015 commit:
https://cgit.kde.org/kio.git/commit/src/core/slave.cpp?id=e2a4517f099d809bd53c6a10769ebfddc0f28a8b
makes KIO find the /usr/bin/kioslave executable if it exists (and prefer it to the correct /usr/libexec/kf5/kioslave). Unfortunately, that is the executable installed by the kdelibs3 compatibility package. As a result, the command line that is run:
/usr/bin/kioslave /usr/lib64/qt5/plugins/kf5/kio/file.so file
obviously triggers a crash from mixed Qt/KDE libraries. (It is impossible to run a KF5 KIO slave with the kdelibs3 kioslave binary.)

The:
            << QCoreApplication::applicationDirPath() // then look where our application binary is located
line must be removed from the search path to prevent the crash.
Comment 1 Kevin Kofler 2017-11-13 16:13:46 UTC
According to the downstream report, this can be reproduced by killing all running kio_file instances, then either trying to save a file with Google Chrome/Chromium or manually running a kdialog command, e.g.:
kdialog --title=Save File --getsavefilename /home/tmp/Downloads/fedora_infinity_140x140.png application/octet-stream image/png

(Unfortunately, the downstream bug is open only to Fedora contributors because it was filed using ABRT, which defaults to including a lot of potentially sensitive data and making the report private, but everything important was said above.)
Comment 2 Nate Graham 2017-11-13 17:06:29 UTC
Thanks for the detailed and specific bug report, Kevin. Would you be able to submit a patch for this at phabricator.kde.org?
Comment 3 Kevin Kofler 2017-11-14 02:43:42 UTC
https://phabricator.kde.org/D8810
Comment 4 Nate Graham 2017-11-14 03:00:11 UTC
Great, thanks!
Comment 5 Christoph Cullmann 2019-08-25 12:20:29 UTC
Git commit ce148291392c048f660c990a27b320b4a518e28d by Christoph Cullmann.
Committed on 25/08/2019 at 12:20.
Pushed by cullmann into branch 'master'.

rename internal 'kioslave' helper executable to 'kioslave5'

renaming allows to avoid clash with 'kioslave' exe from KDE4

Differential Revision: https://phabricator.kde.org/D8810

M  +2    -2    src/core/slave.cpp
M  +4    -4    src/kioslave/CMakeLists.txt
M  +3    -3    src/kioslave/kioslave.cpp

https://commits.kde.org/kio/ce148291392c048f660c990a27b320b4a518e28d