[4.5.0.16] Closing terminal while viewing journalctl leaves "more" process consuming CPU

REPRODUCIBILITY: 100%
OS VERSION: 4.5.0.16
HARDWARE: Xperia 10 II
UI LANGUAGE: Finnish, not relevant
REGRESSION: Yes, haven’t noticed this in 4.4 versions for instance

DESCRIPTION:

It seems that when viewing journalctl using the Terminal application, one can get processes to hang on when closing the Terminal from UI. Especially on this particular case program / process “more” is left running and consuming CPU quite significantly. I’m not sure whether this is related to only journalctl.

PRECONDITIONS:

Terminal application is required which presumably (?) requires enabling development tools or similar. Requires setting the root password for devel-su.

STEPS TO REPRODUCE:

  1. Open terminal application
  2. Run devel-su
  3. Run journalctl
  4. Close the terminal while still running journalctl
  5. View processes and notice the “more”

EXPECTED RESULT:

I suspect that killing / closing the terminal application should also kill all the other processes that it had started. No processes or programs opened by the Terminal app should be left running in the background when closing the application.

ACTUAL RESULT:

Process / program called “more” is left running in the background consuming CPU. Only way to get rid off it is to either manually kill the process or reboot.

MODIFICATIONS:

None

ADDITIONAL INFORMATION:

Example of having several “more” processes when viewing on Lighthouse application. On this case I was repeatedly able to reproduce the bug and every time new “more” process was introduced.

2 Likes

From brief tests, I can confirm there were no more processes hanging in 4.4.

2 Likes

Maybe changing the pager application can serve as a workaround.

And: which is the more program? Busybox or util-linux?

Currently my work around is to exit journalctl before closing the Terminal app itself. I’m not familiar how one changes the pager application and I’m probably not too interested in doing that anyway.

For the latter question I don’t have any answer if it even was targeted to me in the first place. I have no modifications so they are Sailfish provided defaults.

Having not found this thread earlier, I also reported this issue here:

Please note that it is NOT limited to just journalctl as reported here, but to EVERY command using more for its output, e.g. systemctl and many others. Even though I am aware of this issue, it happens quite often that I simply forget (or just don’t notice that more is used for output) and close the Terminal without first terminating the command first, and end up with a discharged battery a few hours later.

Even worse, it is not limited to just “more”. Other commands are also left running this way, e.g. top. It’s just that they don’t eat 100% CPU but e.g. the top process eats some 0.5 - 1% (or at least SO FAR I haven’t seen it going higher than that). But they also stay there and eat power and take CPU time and memory.

P.S. One more note: it doesn’t take being root, it also affects commands launched as defaultuser, e.g. the aforementioned systemctl.

2 Likes

As your report describes the situation more correctly, I’ll close this one as a duplicate. Let’s continue investigation and discussion on your report.