Summary: | Freezes during login process | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Nobuhiro Iwamatsu <iwamatsu> |
Component: | generic-multiscreen | Assignee: | Aleix Pol <aleixpol> |
Status: | RESOLVED FIXED | ||
Severity: | grave | CC: | dai, grgoffe, kde, nate, plasma-bugs, postix, yy.y.ja.jp |
Priority: | NOR | ||
Version: | 5.8.6 | ||
Target Milestone: | 1.0 | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/plasma-workspace/5bc35571901c029fade2ccbcdef191cb3ce01150 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
a patch
an example app to illustrate the hang situation an example launcher script for the app to illustrate the hang situation gzip'd file containing the execution of startkde from my .xinitrc file. |
Description
Nobuhiro Iwamatsu
2017-06-03 09:07:33 UTC
Created attachment 106034 [details]
an example app to illustrate the hang situation
Created attachment 106035 [details]
an example launcher script for the app to illustrate the hang situation
Here is some additional info for more clarity:
Actually the attached patch just changes ksplashqml to simulate pre-5.3.90 behavior, where it does not emit log anywhere (because it had closed all the file descriptors). The only difference is that SplashApp's file descriptors 0, 1 and 2 are open during its initialization phase.
The ksplashqml's caller is /usr/bin/startkde (symlinked by /usr/bin/x-session-manager in a fresh Debian KDE desktop installation), at line 187:
> ksplash_pid=`ksplashqml "${ksplashrc_ksplash_theme}" --pid`
The caller hangs at this point. As in the previous comment it is reading file descriptor 3, which is apparently the stdout of the ksplashqml process, and is waiting forever, which means the pipe is not closed and is empty. The pipe's file descriptor (writer side) is shared through fork. A small main.c and small caller script attached are a minimal example of the situation.
The caller expects that ksplashqml with "--pid" option emit the pid string of its forked process and immediately exit. In reality the ksplashqml process emits the string, but its forked process also holds the pipe and does not close. Thus it hangs. The forked process must not write anything to the pipe, otherwise the caller reads it after the (expected) pid string. So in order to only fix the problem closing (replacing) stdout should suffice.
ksplashqml splash app is a qt5 QGuiApplication, which by default loads QPlatformInputContext (input method) plugins. This is why ksplashqml launches an input method system.
[01:15] <yyoshino_> d_ed: actually I do not figure out the problem on wayland in pre-5.3.90 - On my machine startplasmacompositor seems to work well both with or without this patch I'm a bit lost. Do we think this patch needed or not? --- There is another (possibly simpler?) way to solve this. We could background immediately and then replace all the kill $ksplash_pid with kquitapp5 and the DBus name. (In reply to David Edmundson from comment #4) > [01:15] <yyoshino_> d_ed: actually I do not figure out the problem on > wayland in pre-5.3.90 - On my machine startplasmacompositor seems to work > well both with or without this patch > > > I'm a bit lost. Do we think this patch needed or not? Yes, the patch is needed. Sorry I have mistyped, to clarify: On my X environment - startkde works well when the patch is applied. On my wayland envionment - startplasmacompositor works even without the patch due to another reason, but is not that good - not fully working. Because uim (an input method system I'm using) is currently broken on wayland, its daemon process crashes on startup and ksplash does not hang but the input method does not function. On my wayland environment I could not reproduce the original (pre-5.3.95) problem on wayland the commit https://cgit.kde.org/plasma-workspace.git/commit/?id=56d2c15b9acb9c4b57398b281685807c3191f622 has tried to fix. > There is another (possibly simpler?) way to solve this. We could background > immediately and then replace all the kill $ksplash_pid with kquitapp5 and > the DBus name. I would use the dbus quit interface, while I don't know at first glance why it does not work on my machine, with a following error: > Error: org.freedesktop.DBus.Error.UnknownObject > No such object path '/MainApplication' Created attachment 118832 [details]
gzip'd file containing the execution of startkde from my .xinitrc file.
Hi,
I think I have this same problem with a Fedora Core 31 (rawhide) system. The system is freshly installed and has several rounds of "normal" package upgrades.
I have my run level set to 3, a text mode login. After login I issue a startx command which uses my .xinitrc config file which contains " /usr/bin/bash -xv /usr/bin/startkde". Startkde just never ends. I have included output of this .xinitrc script.
I forgot to indicate "my" level of ksplashqml... so here it is: plasma-workspace-5.15.3-1.fc31.x86_64 >from my .xinitrc file.
Not using a Display Manager is unsupported. 90% of the time it is a user setup issue, and this is not a support forum.
Please use SDDM and reopen if you still have an issue. If that works, use "env" to compare what's different.
Hello, I am the original reporter of this bug. This bug is still applicable to recent ksplashqml. Debian-based systems bundle the attached patch and work fine. I would really appreciate it if the patch would be included upstream. Dave, Unsupported? Are you kidding me? I've been using KDE for over 10 years and have not had this problem. I have in fact tried SDDM and still have the problem. George... This problem still seems to exist. Is anyone working this bug? George... Git commit 5bc35571901c029fade2ccbcdef191cb3ce01150 by David Edmundson. Committed on 19/06/2019 at 08:49. Pushed by davidedmundson into branch 'master'. Simplify KSplash Summary: Forking and printing a PID gains nothing. The new startplasma script tracks the process used to start ksplash itself. Test Plan: Logged in, saw a splash Ran the test from systemsettings, saw a splash Reviewers: #plasma, apol Reviewed By: apol Subscribers: apol, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D21890 M +0 -30 ksplash/ksplashqml/main.cpp https://commits.kde.org/plasma-workspace/5bc35571901c029fade2ccbcdef191cb3ce01150 |