Bug 448853 - When removing the cable of the connected phone, KDE hangs
Summary: When removing the cable of the connected phone, KDE hangs
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-performance (show other bugs)
Version: git-stable-Plasma/5.24
Platform: Manjaro Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-20 20:40 UTC by devakant.j
Modified: 2022-04-16 19:12 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
status bar (15.04 KB, image/png)
2022-01-21 04:55 UTC, devakant.j
Details
battery and brightness (12.26 KB, image/png)
2022-01-24 19:01 UTC, devakant.j
Details
output file begin (90.20 KB, text/plain)
2022-01-25 17:21 UTC, devakant.j
Details
output file end (95.50 KB, text/plain)
2022-01-25 17:24 UTC, devakant.j
Details

Note You need to log in before you can comment on or make changes to this bug.
Description devakant.j 2022-01-20 20:40:39 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Connect the phone via cable (In my case iphone 7)
2. The lightning bolt widget icon will change to a battery icon.
3. Disconnect the phone from the cable

OBSERVED RESULT
session where the kde plasma freezes. Only stop via task manager and restart via terminal helps

EXPECTED RESULT

When the cable is disconnected, the icon should return to its original value.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2022-01-21 00:27:03 UTC
What freezes? Everything? Just the panel and the desktop? Windows too? Can you drag windows? What do you mean by "Freezes"? Can you still move the cursor? Do things still happen when you click on them?

What widget are you talking about that has a lightning bolt icon which changes to a battery icon?

That kind of phone are you connecting?
Comment 2 devakant.j 2022-01-21 04:55:40 UTC
Created attachment 145692 [details]
status bar

freezes KDE Plasma, but other open applications continue to work. That is, the launcher and the status bar becomes completely unresponsive to actions.
Widget: battery and brightness
Telephone: Apple iphone 7, Unfortunately, I don’t have another phone, I can’t check it for example on android.
Comment 3 Nate Graham 2022-01-21 16:42:41 UTC
Thanks. Cannot reproduce with an old iPhone I dug up.
Comment 4 devakant.j 2022-01-22 09:12:20 UTC
Strange. I tried to record a video from the screen so that you could see the actions. But when the phone is disconnected, the plasma process is restarted and everything works fine again. And without recording the screen hangs. Although I had a suspicion, perhaps the problem is not so much with the plasma itself, but with manjaro. Because to install the beta plasma, I had to climb over to an unstable branch. Is there an opportunity to try it on an unstable branch too?
Comment 5 Nate Graham 2022-01-24 16:44:05 UTC
Sure, go ahead.
Comment 6 devakant.j 2022-01-24 19:01:08 UTC
Created attachment 145876 [details]
battery and brightness
Comment 7 devakant.j 2022-01-24 19:02:11 UTC
(In reply to Nate Graham from comment #5)
> Sure, go ahead.

So. Yesterday I rolled back from the unstable manjaro branch and the kde beta to the previous version. And today, manjaro updates are already stable. 
I installed the beta kde plasma 5.24. And I no longer observe problems with hanging. But two others appeared: 
1) The battery widget icon and brightness do not change when the device is turned on or off.
2) After disconnecting the device, kde plasma restarts on its own, which, although sad, is not as critical as it used to be at first.
Comment 8 ratijas 2022-01-25 11:17:03 UTC
Can you check out before and after the crash (hang/restart) if there's anything useful in dmesg (kernel log) and plasmashell output (run it from a terminal like konsole)?

Also take a look at recent coredumpctl entries. The most interesting is `coredumpctl gdb <PID>` and in gdb type in `bt<Enter>` (without backticks, stands for "backtrace"). Note that in some cases coredumpctl needs to be run as sudo.
Comment 9 devakant.j 2022-01-25 17:20:15 UTC
(In reply to ratijas from comment #8)
> Can you check out before and after the crash (hang/restart) if there's
> anything useful in dmesg (kernel log) and plasmashell output (run it from a
> terminal like konsole)?
> 
> Also take a look at recent coredumpctl entries. The most interesting is
> `coredumpctl gdb <PID>` and in gdb type in `bt<Enter>` (without backticks,
> stands for "backtrace"). Note that in some cases coredumpctl needs to be run
> as sudo.

I recorded two files before the crash: output file begin and after failure: outputfile_end. And by 'coredumpctl gdb <PID>` I don't quite understand what kind of process is needed. Specifically, I don't see a separate widget..
Comment 10 devakant.j 2022-01-25 17:21:05 UTC
Created attachment 145930 [details]
output file begin
Comment 11 devakant.j 2022-01-25 17:24:48 UTC
Created attachment 145931 [details]
output file end
Comment 12 ratijas 2022-01-25 17:30:38 UTC
> And by 'coredumpctl gdb <PID>` I don't quite understand what kind of process is needed. Specifically, I don't see a separate widget..

All applets normally live within the a plasmashell process. You can restart Plasma yourself in a terminal via either «plasmashell --replace» or (preferably, due to bugs in --replace) «killall plasmashell && plasmashell». Don't be scared just because it prints out a loooot of [[mostly harmless]] warnings.

Either way, just running «coredumpctl» lists all recent crashes top-to-bottom. Scroll down, and you'll likely recognize what you need. If there's more than one entry at a time, that's also an interesting info, since they are probably related.
Comment 13 devakant.j 2022-04-15 13:06:02 UTC
The problem is no longer reproducible. The task can be closed. Thx
Comment 14 Nate Graham 2022-04-16 19:12:49 UTC
Ok, thanks!