Package: release.debian.org Severity: normal User: [email protected] Usertags: unblock
Hi, I want to upload a NMU of plasma-workspace to unstable fixing an issue where processing stopped in ksplashqml on some environments(e.g. Japanese environment), proposed patch attached. unblock plasma-workspace/5.8.6-2.1. -- System Information: Debian Release: 9.0 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: armhf, armel, sh4, powerpc Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=ja_JP.utf8, LC_CTYPE=ja_JP.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
diff -Nru plasma-workspace-5.8.6/debian/changelog plasma-workspace-5.8.6/debian/changelog --- plasma-workspace-5.8.6/debian/changelog 2017-03-16 03:45:10.000000000 +0900 +++ plasma-workspace-5.8.6/debian/changelog 2017-06-02 22:17:22.000000000 +0900 @@ -1,3 +1,12 @@ +plasma-workspace (4:5.8.6-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix problem where processing stopped in ksplashqml on some environments. + (Closes: #862558) + Add patches/replace-fds.patch. + + -- Nobuhiro Iwamatsu <[email protected]> Fri, 02 Jun 2017 22:17:22 +0900 + plasma-workspace (4:5.8.6-2) unstable; urgency=medium * Release to unstable diff -Nru plasma-workspace-5.8.6/debian/patches/replace-fds.patch plasma-workspace-5.8.6/debian/patches/replace-fds.patch --- plasma-workspace-5.8.6/debian/patches/replace-fds.patch 1970-01-01 09:00:00.000000000 +0900 +++ plasma-workspace-5.8.6/debian/patches/replace-fds.patch 2017-06-02 22:17:22.000000000 +0900 @@ -0,0 +1,122 @@ +Description: Not close stdin,stdout,stderr, and redirects stdin,stdout,stderr to /dev/null + This fix a bug in ksplashqml. An upstream commit + https://cgit.kde.org/plasma-workspace.git/commit/?id=56d2c15b9acb9c4b57398b281685807c3191f622 + has caused this problem. + + x-session-manag,133,kdetest /usr/bin/x-session-manager + +-(ksplashqml,232) + +-ssh-agent,191 /usr/bin/im-launch x-session-manager + +-uim-toolbar,220 + | +-{llvmpipe-0},235 + | +-{llvmpipe-1},236 + | +-{llvmpipe-2},237 + | `-{llvmpipe-3},238 + `-uim-xim,219 + ksplashqml,233,kdetest Breeze --pid + +-mozc_server,239 + | +-{IPCServer},244 + | +-{QueueTimer},240 + | +-{QueueTimer},243 + | `-{WatchDog},242 + +-uim-candwin-qt5,245 -v + | +-{QDBusConnection},249 + | `-{QXcbEventReader},248 + |-{QDBusConnection},255 + |-{QQmlThread},254 + |-{QXcbEventReader},234 + |-{llvmpipe-0},250 + |-{llvmpipe-1},251 + |-{llvmpipe-2},252 + `-{llvmpipe-3},253 + + # strace -f -p 133 + strace: Process 133 attached + read(3, ^Cstrace: Process 133 detached + <detached ...> + + It looks like the parent process (133), x-session-manager (startkde + script), is waiting for the stdout of the ksplashqml process (232), + but which is now defunct. Its child process(es) may be writing to the + same fd. + + # ls -l /proc/133/fd/3 + lr-x------ 1 kdetest kdetest 64 May 31 05:13 /proc/133/fd/3 -> pipe:[88694] + + The direct child of the ksplashqml process (233), the splash screen daemon, + closes the file descriptor at ksplash/ksplashqml/main.cpp:97. + + # ls -l /proc/233/fd/1 + ls: cannot access '/proc/233/fd/1': No such file or directory + + One of the children of the process (239), mozc_server, is holding the fd: + + # ls -l /proc/239/fd/1 + l-wx------ 1 kdetest kdetest 64 May 31 05:14 /proc/239/fd/1 -> pipe:[88694] + + So the startkde process has finished reading the pid number string from + the now-defunct process, but is still waiting for another write(s) until + the (shared) fd has been closed. + + This mozc_server process has been started during uim-qt5 + (a QPlatformInputContext) startup in the SplashApp + initialization phase at ksplash/ksplashqml/main.cpp:92. + + Due to the upstream commit the splash screen daemon does not close file + descriptors before the SplashApp initialization, thus its subprocess + shares the fds. + + The commit log states Wayland initialization of this daemon needs the + channels. While it may require open file descriptors 0, 1 or 2, + no one should expect the process to talk to the parent through the + descriptors, since the splash screen is a daemon. + + An attached patch reverts the commit and redirects the file descriptors + to /dev/null. +Forwarded: https://bugs.kde.org/show_bug.cgi?id=380495 +Bug-Debian: https://bugs.debian.org/862558 +Author: YOSHINO Yoshihito <[email protected]> +Last-Update: 2017-06-02 + +--- plasma-workspace-5.8.6.orig/ksplash/ksplashqml/main.cpp ++++ plasma-workspace-5.8.6/ksplash/ksplashqml/main.cpp +@@ -24,6 +24,9 @@ + #include <QTextStream> + + #include <iostream> ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <fcntl.h> + #include <unistd.h> + + void logMessageHandler(QtMsgType type, const char *msg) +@@ -83,6 +86,16 @@ int main(int argc, char **argv) + + return 0; + } ++ ++ int devNull = open("/dev/null", O_RDWR); ++ if (devNull == -1) { ++ return -1; ++ } ++ // replace stdin,stdout,stderr, otherwise startkde will block ++ dup2(devNull, 0); ++ dup2(devNull, 1); ++ dup2(devNull, 2); ++ close(devNull); + } + + //enable to send log output to /tmp/ksplash +@@ -91,13 +104,6 @@ int main(int argc, char **argv) + QQuickWindow::setDefaultAlphaBuffer(true); + SplashApp app(argc, argv); + +- if (!test && !nofork) { +- // close stdin,stdout,stderr, otherwise startkde will block +- close(0); +- close(1); +- close(2); +- } +- + return app.exec(); + } + diff -Nru plasma-workspace-5.8.6/debian/patches/series plasma-workspace-5.8.6/debian/patches/series --- plasma-workspace-5.8.6/debian/patches/series 2017-03-16 03:45:10.000000000 +0900 +++ plasma-workspace-5.8.6/debian/patches/series 2017-06-02 22:17:08.000000000 +0900 @@ -1,3 +1,4 @@ kubuntu_startkde-qtpath.diff disable_incompatible_tests add_sddm_debian_breeze.patch +replace-fds.patch

