Bug 473612 - Inserting drive with FAT32 partition causes panel to visually freeze for multiple seconds
Summary: Inserting drive with FAT32 partition causes panel to visually freeze for mult...
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: DataEngines (show other bugs)
Version: 5.27.7
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-21 20:55 UTC by dofficialgman
Modified: 2023-09-06 16:49 UTC (History)
2 users (show)

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


Attachments
bt (58.81 KB, text/plain)
2023-08-30 23:40 UTC, dofficialgman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dofficialgman 2023-08-21 20:55:30 UTC
SUMMARY
When inserting a drive with a large FAT32 partition with many files, `fsck.vfat` gets called and the entire desktop environment freezes until the time it takes for `fsck.vfat` to finish running on that partition. This can be upwards of 10 seconds where the only input a user can make is move the mouse. The taskbar is unresponsive, applications cannot be closed, etc.

STEPS TO REPRODUCE
1. insert drive with FAT32 partition with many files
2. observe the desktop environment freeze until `fsck.vfat` finishes (you can see it for example in HTOP)

OBSERVED RESULT
Entire desktop freezes until `fsck.vfat` finishes

EXPECTED RESULT
Desktop environment does not freeze and checking the partition with `fsck.vfat` happens asyncronously.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 23.10
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-08-22 20:57:22 UTC
What specifically freezes and what can still be interacted with? Can you move the pointer, for example? Can you click on anything? Can you Alt+Tab? After the freeze ends, have any changes been made? e.g. if you clicked on a window to raise it and nothing happened during the freeze, does the window get raised after the freeze ends?

Also, are you using X11 or Wayland?
Comment 2 dofficialgman 2023-08-22 21:11:16 UTC
The issue happens on both Wayland and X11 (though manifests slightly differently, I will go into the details of each).

I use a hidden taskbar. This detail is important in the differences in X11 and Wayland.

On Both:
- I am able to move my cursor/pointer.
- I can click between already opened windows an they are raised/lowered and are fully interactable.
- I can alt tab between windows

On Wayland:
- I can move the mouse down and unhide the taskbar. Hovering the mouse over any icon does not show the tooltip or highlight. Clicking on any icon does not open the application until AFTER the freeze (so all actions are queued up).

On X11:
- Moving the mouse down does not unhide the taskbar. I haven't tested with the taskbar already available to see if the actions queue up in X11 as it is not my primary choice of backend.
Comment 3 Nate Graham 2023-08-23 15:40:58 UTC
Thanks. So it sounds like what's happening is that the Panel and its widgets are *visually* freezing, but not *functionally* freezing? And that additionally on X11 the panel doesn't autohide while the issue is happening?

Do you by any chance have an NVIDIA GPU?
Comment 4 dofficialgman 2023-08-23 16:28:12 UTC
This is with an AMD RX 570 on MESA drivers.
Comment 5 dofficialgman 2023-08-23 16:29:11 UTC
Same issue on another device with Intel GPU on MESA graphics, so I doubt it has anything to do with the GPU used.
Comment 6 Nate Graham 2023-08-25 18:25:48 UTC
Ok, thanks.
Comment 7 Vlad Zahorodnii 2023-08-30 12:18:37 UTC
Can you select icons on the desktop when the panel is frozen? 

Can you also get the backtrace of plasmashell process when the panel is visually frozen?

    gdb -- plasmashell --replace

type "c"

then when panel is frozen, press Ctrl-C and then type "bt" and post the output here.

So far it points to plasmashell process freezing because of a blocking call or something
Comment 8 dofficialgman 2023-08-30 12:45:28 UTC
(In reply to Vlad Zahorodnii from comment #7)
> Can you select icons on the desktop when the panel is frozen? 

Selecting icons on the desktop is the same as ones in the taskbar, they don't open until after the freeze.

>     gdb -- plasmashell --replace

improperly formatted command but that is OK I know what you were trying to write

> type "c"
> 
> then when panel is frozen, press Ctrl-C and then type "bt" and post the
> output here.
> 
> So far it points to plasmashell process freezing because of a blocking call
> or something

[New Thread 0x7fff3dffb6c0 (LWP 4474)]                                                                                                                      
^C
Thread 1 "plasmashell" received signal SIGINT, Interrupt.
0x00007ffff4e94076 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x55555be587d0)
    at ./nptl/futex-internal.c:57
Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/futex-internal.c.                                                          
57      ./nptl/futex-internal.c: No such file or directory.
(gdb) bt
#0  0x00007ffff4e94076 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x55555be587d0)
    at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x55555be587d0) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64
    (futex_word=futex_word@entry=0x55555be587d0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0)
    at ./nptl/futex-internal.c:139
#3  0x00007ffff4e969fe in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55555be58780, cond=0x55555be587a8) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x55555be587a8, mutex=0x55555be58780) at ./nptl/pthread_cond_wait.c:627
#5  0x00007ffff56e0cab in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff6524e73 in ??? () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007ffff64e000a in ??? () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#8  0x00007ffff64ca0e3 in QDBusConnection::call(QDBusMessage const&, QDBus::CallMode, int) const () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#9  0x00007ffff7b67b0a in ??? () at /lib/x86_64-linux-gnu/libKF5Solid.so.5
#10 0x00007ffff7b68118 in ??? () at /lib/x86_64-linux-gnu/libKF5Solid.so.5
#11 0x00007ffff7b68540 in ??? () at /lib/x86_64-linux-gnu/libKF5Solid.so.5
#12 0x00007ffff7b5e739 in ??? () at /lib/x86_64-linux-gnu/libKF5Solid.so.5
#13 0x00007ffff7b5e893 in ??? () at /lib/x86_64-linux-gnu/libKF5Solid.so.5
#14 0x00007ffff7b60c5e in ??? () at /lib/x86_64-linux-gnu/libKF5Solid.so.5
#15 0x00007ffff7b60e14 in ??? () at /lib/x86_64-linux-gnu/libKF5Solid.so.5
#16 0x00007ffff590602d in ??? () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ffff7b6dd94 in ??? () at /lib/x86_64-linux-gnu/libKF5Solid.so.5
#18 0x00007ffff7b705b3 in ??? () at /lib/x86_64-linux-gnu/libKF5Solid.so.5
#19 0x00007ffff64d72bb in ??? () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#20 0x00007ffff58f99a0 in QObject::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ffff676bc82 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff58cc7a8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007ffff58cfeb1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007ffff59286f7 in ??? () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007ffff43f9b8c in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007ffff44551af in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007ffff43f7d80 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007ffff5927daa in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007ffff58cb15b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00007ffff58d3904 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x000055555557ea14 in ??? ()
#32 0x00007ffff4e280d0 in __libc_start_call_main (main=main@entry=0x55555557db30, argc=argc@entry=2, argv=argv@entry=0x7fffffffdc28)
--Type <RET> for more, q to quit, c to continue without paging--c
    at ../sysdeps/nptl/libc_start_call_main.h:58
#33 0x00007ffff4e28189 in __libc_start_main_impl
    (main=0x55555557db30, argc=2, argv=0x7fffffffdc28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdc18)
    at ../csu/libc-start.c:360
#34 0x000055555557eb35 in ??? ()
Comment 9 Nate Graham 2023-08-30 16:28:14 UTC
Thanks. Looks like it's doing *something* in Solid. It would be great if you could repeat that after installing debug symbols for the Solid framework.
Comment 10 dofficialgman 2023-08-30 20:28:31 UTC
(In reply to Nate Graham from comment #9)
> Thanks. Looks like it's doing *something* in Solid. It would be great if you
> could repeat that after installing debug symbols for the Solid framework.

Interesting. Since I am running Ubuntu mantic, I should not need to install debug symbols anymore since GDB is supposed to automatically install them for me https://wiki.ubuntu.com/Debug%20Symbol%20Packages . Indeed I was prompted when first running and it did download them with debuginfod. I guess the heuristic didn't catch this as required.

I will try later after having manually installed the `libkf5solid5-dbgsym` package
Comment 11 dofficialgman 2023-08-30 20:30:06 UTC
> I will try later after having manually installed the `libkf5solid5-dbgsym`
> package

and `libkf5solid-bin-dbgsym` since idk which one the required symbols will come from
Comment 12 dofficialgman 2023-08-30 23:40:48 UTC
Created attachment 161292 [details]
bt

backtrace as requested with the debug symbols installed
Comment 13 Nate Graham 2023-08-31 18:33:12 UTC
Thanks!

#0  0x00007ffff4e94076 in __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7fffb8068f30)
    at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7fffb8068f30) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64
    (futex_word=futex_word@entry=0x7fffb8068f30, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0)
    at ./nptl/futex-internal.c:139
#3  0x00007ffff4e969fe in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fffb8068ee0, cond=0x7fffb8068f08) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7fffb8068f08, mutex=0x7fffb8068ee0) at ./nptl/pthread_cond_wait.c:627
#5  0x00007ffff56e0cab in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff6524e73 in ??? () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007ffff64e000a in ??? () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#8  0x00007ffff64ca0e3 in QDBusConnection::call(QDBusMessage const&, QDBus::CallMode, int) const () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#9  0x00007ffff7b67b0a in Solid::Backends::UDisks2::DeviceBackend::allProperties (this=this@entry=0x555557803400)
    at /usr/src/solid-5.109.0-0ubuntu1/src/solid/devices/backends/udisks2/udisksdevicebackend.cpp:135
#10 0x00007ffff7b68118 in Solid::Backends::UDisks2::DeviceBackend::checkCache (this=this@entry=0x555557803400, key=...)
    at /usr/src/solid-5.109.0-0ubuntu1/src/solid/devices/backends/udisks2/udisksdevicebackend.cpp:172
#11 0x00007ffff7b68540 in Solid::Backends::UDisks2::DeviceBackend::prop (this=0x555557803400, key=...)
    at /usr/src/solid-5.109.0-0ubuntu1/src/solid/devices/backends/udisks2/udisksdevicebackend.cpp:114
#12 0x00007ffff7b5e739 in Solid::Backends::UDisks2::Device::prop (this=this@entry=0x7fffffffd270, key=...)
    at /usr/src/solid-5.109.0-0ubuntu1/src/solid/devices/backends/udisks2/udisksdevice.cpp:118
#13 0x00007ffff7b5e893 in Solid::Backends::UDisks2::Device::drivePath (this=this@entry=0x7fffffffd270)
    at /usr/src/solid-5.109.0-0ubuntu1/src/solid/devices/backends/udisks2/udisksdevice.cpp:884
#14 0x00007ffff7b60c5e in Solid::Backends::UDisks2::Device::mightBeOpticalDisc (this=this@entry=0x7fffffffd270)
    at /usr/src/solid-5.109.0-0ubuntu1/src/solid/devices/backends/udisks2/udisksdevice.cpp:833
#15 0x00007ffff7b60e14 in Solid::Backends::UDisks2::Manager::slotInterfacesAdded
    (interfaces_and_properties=..., object_path=<optimized out>, this=0x555556463870)
    at /usr/src/solid-5.109.0-0ubuntu1/src/solid/devices/backends/udisks2/udisksmanager.cpp:191
#16 Solid::Backends::UDisks2::Manager::qt_static_metacall (_o=0x555556463870, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
    at /usr/src/solid-5.109.0-0ubuntu1/obj-x86_64-linux-gnu/src/solid/KF5Solid_autogen/include/moc_udisksmanager.cpp:90
#17 0x00007ffff590602d in ??? () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007ffff7b6dd94 in OrgFreedesktopDBusObjectManagerInterface::InterfacesAdded (_t2=<optimized out>, _t1=<optimized out>, this=0x555556463888)
    at /usr/src/solid-5.109.0-0ubuntu1/obj-x86_64-linux-gnu/src/solid/KF5Solid_autogen/include/moc_manager.cpp:179
#19 OrgFreedesktopDBusObjectManagerInterface::qt_static_metacall
    (_o=_o@entry=0x555556463888, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=0, _a=_a@entry=0x7fffffffd510)
    at /usr/src/solid-5.109.0-0ubuntu1/obj-x86_64-linux-gnu/src/solid/KF5Solid_autogen/include/moc_manager.cpp:93
#20 0x00007ffff7b705b3 in OrgFreedesktopDBusObjectManagerInterface::qt_metacall
--Type <RET> for more, q to quit, c to continue without paging--c
    (this=0x555556463888, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffffd510)
    at /usr/src/solid-5.109.0-0ubuntu1/obj-x86_64-linux-gnu/src/solid/KF5Solid_autogen/include/moc_manager.cpp:168

So I guess the issue is either in Solid itself, or in the Solid Plasma DataEngine.