Sporadically hangs unmounting drive
While unmounting a drive, possibly after surprise removal, the unmount command hung, but so did bsdisks.
bsdisks:
Thread 1 (LWP 100479 of process 41665):
#0 _ppoll () at _ppoll.S:3
#1 0x0000000800e7e1ac in __thr_ppoll (pfd=0x7fffffffd360, nfds=4, timeout=0x0, newsigmask=0x0) at /usr/src/lib/libthr/thread/thr_syscalls.c:358
#2 0x000000080089759d in qt_safe_poll(pollfd*, unsigned int, timespec const*) () from /usr/local/lib/qt5/libQt5Core.so.5
#3 0x00000008007c93ea in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#4 0x00000008007c2e5d in QProcess::waitForFinished(int) () from /usr/local/lib/qt5/libQt5Core.so.5
#5 0x00000000002562cb in BlockFilesystem::Unmount (this=0x8019f7430, options=...) at blockfilesystem.cpp:253
#6 0x0000000000231839 in Block::Unmount (this=0x8019f2800, options=...) at bsdisks_autogen/EWIEGA46WW/../../block.h:178
#7 0x000000000022d808 in Block::qt_static_metacall (_o=0x8019f2800, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fffffffd8d0) at bsdisks_autogen/EWIEGA46WW/moc_block.cpp:135
#8 0x000000080084de10 in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const () from /usr/local/lib/qt5/libQt5Core.so.5
#9 0x000000080084d49e in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) () from /usr/local/lib/qt5/libQt5Core.so.5
#10 0x000000000024bbf9 in QMetaObject::invokeMethod (obj=0x8019f2800, member=0x209352 "Unmount", val0=..., val1=..., val2=..., val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...) at /usr/local/include/qt5/QtCore/qobjectdefs.h:460
#11 0x0000000000247ac7 in FilesystemAdaptor::Unmount (this=0x8019ef840, options=...) at adaptors.cpp:780
#12 0x000000000022b074 in FilesystemAdaptor::qt_static_metacall (_o=0x8019ef840, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fffffffe290) at bsdisks_autogen/EWIEGA46WW/moc_adaptors.cpp:2000
#13 0x000000000022b28d in FilesystemAdaptor::qt_metacall (this=0x8019ef840, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fffffffe290) at bsdisks_autogen/EWIEGA46WW/moc_adaptors.cpp:2049
#14 0x00000008002f1e1d in ?? () from /usr/local/lib/qt5/libQt5DBus.so.5
#15 0x00000008002f26f0 in ?? () from /usr/local/lib/qt5/libQt5DBus.so.5
#16 0x00000008002f9a0d in ?? () from /usr/local/lib/qt5/libQt5DBus.so.5
#17 0x00000008002f9c8d in ?? () from /usr/local/lib/qt5/libQt5DBus.so.5
#18 0x000000080086ddcd in QObject::event(QEvent*) () from /usr/local/lib/qt5/libQt5Core.so.5
#19 0x000000080084261d in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Core.so.5
#20 0x0000000800842220 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/local/lib/qt5/libQt5Core.so.5
#21 0x00000008008432b9 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/local/lib/qt5/libQt5Core.so.5
#22 0x000000080089bec8 in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#23 0x0000000801697a7e in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.0
#24 0x0000000801697e24 in ?? () from /usr/local/lib/libglib-2.0.so.0
#25 0x0000000801697ee6 in g_main_context_iteration () from /usr/local/lib/libglib-2.0.so.0
#26 0x000000080089b900 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/local/lib/qt5/libQt5Core.so.5
#27 0x000000080083e467 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/local/lib/qt5/libQt5Core.so.5
#28 0x00000008008428be in QCoreApplication::exec() () from /usr/local/lib/qt5/libQt5Core.so.5
#29 0x000000000023b845 in main (argc=3, argv=0x7fffffffecf8) at main.cpp:159
As for the hung unmount command:
Couldn't attach gdb due to "ptrace: Device busy."
# ps dax
41665 - I 0:00.19 |-- /usr/local/bin/bsdisks --no-debug --syslog-output
74656 - D 0:00.00 | `-- /sbin/umount /media/TOSHIBA_TransMemory_8D7A69E642A1CE50FD40C35F_s1
# procstat files 74656
PID COMM FD T V FLAGS REF OFFSET PRO NAME
74656 umount text v r r------- - - - /sbin/umount
74656 umount cwd v d r------- - - - /
74656 umount root v d r------- - - - /
74656 umount 0 p - rw------ 1 0 - -
74656 umount 1 p - rw------ 1 0 - -
74656 umount 2 p - rw------ 1 0 - -
74656 umount 12 s - rw------ 3 0 UD? /var/run/devd.seqpacket.pipe
# procstat threads 74656
PID TID COMM TDNAME CPU PRI STATE WCHAN
74656 102096 umount - -1 120 sleep mntref
# procstat kstack 74656
PID TID COMM TDNAME KSTACK
74656 102096 umount - mi_switch sleepq_wait _sleep vfs_mount_destroy dounmount sys_unmount amd64_syscall fast_syscall_common
It is not possible to kill that unmount process, not even with "kill -9".