Bug 344891 - Device viewer crashed when looking at the USB tree and unplugging a device
Summary: Device viewer crashed when looking at the USB tree and unplugging a device
Status: RESOLVED FIXED
Alias: None
Product: kinfocenter
Classification: Applications
Component: USB Devices (show other bugs)
Version: 4.11.10
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: David Hubner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-06 05:25 UTC by tommy.trussell
Modified: 2020-01-17 17:33 UTC (History)
1 user (show)

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


Attachments
screenshot 14.04.5 before plugging in mouse (307.81 KB, image/png)
2018-12-02 22:57 UTC, tommy.trussell
Details
screenshot 14.04.5 AFTER plugging in mouse (363.37 KB, image/png)
2018-12-02 22:59 UTC, tommy.trussell
Details
screenshot 18.04.1 before plugging in mouse (261.59 KB, image/png)
2018-12-02 23:01 UTC, tommy.trussell
Details
screenshot 18.04.1 AFTER plugging in mouse (335.44 KB, image/png)
2018-12-02 23:02 UTC, tommy.trussell
Details
screenshot 18.10 before plugging in mouse (291.30 KB, image/png)
2018-12-02 23:04 UTC, tommy.trussell
Details
screenshot 18.10 AFTER plugging in mouse (368.38 KB, image/png)
2018-12-02 23:05 UTC, tommy.trussell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tommy.trussell 2015-03-06 05:25:13 UTC
I was looking at the devices showing on this laptop (Lenovo E540 model 20C6008QUS) to try to figure out why the battery doesn't charge/discharge as expected, and noticed the USB device tree looked weird. (All the built in devices looked "daisy-chained" instead of connecting to the hub, and the external mouse was inserted between them.) I unplugged the mouse to verify it was the one I was looking for and the application crashed.

Reproducible: Couldn't Reproduce

Steps to Reproduce:
0. "Regular" Ubuntu 14.04.2 system, fairly freshly installed to a new-ish laptop, yesterday installed multiple desktops (kubuntu-desktop, lubuntu-desktop, xubuntu-desktop) to look at power management tools in each. This crash was late in the day but after having booted into Ubuntu after looking at similar features on a new Fedora KDE live image (on a USB stick).

1. Opened USB device tree, saw that it looked odd. Mouse in middle of tree "daisy chained" between two built-in devices on this laptop. (I believe the one above was an Unknown wireless device and the one below was an integrated fingerprint reader.)

2. Unplugged mouse to see how tree changed


Actual Results:  
Crash.

automatic bug reporter had me download symbols then register then couldn't successfully file the bug. (It said I should log in first.) SO I'm pasting the report below.

Expected Results:  
It hasn't crashed on subsequent attempts, though the device tree still looks odd. On later attempts when I open the USB panel with the mouse plugged in, it is alone, subordinate to the EHCI Host Controller (1) and the Unknown hub. Then when I remove the mouse, its position becomes an unknown wireless device and the camera appears subordinate to the Unknown wireless device and the hub. When I plug the mouse back in, the other devices on EHCI Controller (1) go away. The integrated fingerprint reader hasn't reappeared in the USB tree.

Application: kinfocenter (4.11.11)
KDE Platform Version: 4.13.3
Qt Version: 4.8.6
Operating System: Linux 3.13.0-46-generic x86_64
Distribution: Ubuntu 14.04.2 LTS

-- Information about the crash:
- What I was doing when the application crashed:

I was looking at the depiction of the USB device tree and unplugged the mouse to see where the tree changed. Application crashed.

(By the way all the devices on my laptop appear in Device Viewer as "daisy chained" in the tree instead of separate nodes, each connecting to the hub. That doesn't look right to me. The mouse I unplugged was in the middle, between a built-in wireless device and a built-in fingerprint reader.)

-- Backtrace:
Application: KDE Info Center (kinfocenter), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f66a2d5e7c0 (LWP 3534))]

Thread 3 (Thread 0x7f6690d55700 (LWP 3535)):
#0  0x00007fff9634f704 in ?? ()
#1  0x00007f6690d54c30 in ?? ()
#2  0x00007f66a023492d in __GI___clock_gettime (clock_id=<optimized out>, tp=<optimized out>) at ../sysdeps/unix/clock_gettime.c:115
#3  0x00007f66a1577ad7 in do_gettime (frac=0x7f6690d54b70, sec=0x7f6690d54b68) at tools/qelapsedtimer_unix.cpp:127
#4  qt_gettime () at tools/qelapsedtimer_unix.cpp:144
#5  0x00007f66a1653f05 in updateCurrentTime (this=0x7f668c003130) at kernel/qeventdispatcher_unix.cpp:354
#6  QTimerInfoList::timerWait (this=0x7f668c003130, tm=...) at kernel/qeventdispatcher_unix.cpp:460
#7  0x00007f66a165267c in timerSourcePrepareHelper (src=<optimized out>, timeout=0x7f6690d54c24) at kernel/qeventdispatcher_glib.cpp:143
#8  0x00007f66a1652725 in timerSourcePrepare (source=<optimized out>, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:176
#9  0x00007f669c5ab68d in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007f669c5abf03 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007f669c5ac0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007f66a16527be in QEventDispatcherGlib::processEvents (this=0x7f668c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#13 0x00007f66a16240af in QEventLoop::processEvents (this=this@entry=0x7f6690d54de0, flags=...) at kernel/qeventloop.cpp:149
#14 0x00007f66a16243a5 in QEventLoop::exec (this=this@entry=0x7f6690d54de0, flags=...) at kernel/qeventloop.cpp:204
#15 0x00007f66a1520c5f in QThread::exec (this=this@entry=0x1755d30) at thread/qthread.cpp:537
#16 0x00007f66a1605823 in QInotifyFileSystemWatcherEngine::run (this=0x1755d30) at io/qfilesystemwatcher_inotify.cpp:265
#17 0x00007f66a152332f in QThreadPrivate::start (arg=0x1755d30) at thread/qthread_unix.cpp:349
#18 0x00007f669ce92182 in start_thread (arg=0x7f6690d55700) at pthread_create.c:312
#19 0x00007f66a022647d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f668b156700 (LWP 3536)):
#0  0x00007f669c5ed61d in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f669c5ed9a9 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f669c5ab680 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f669c5abf03 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f669c5ac0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f66a16527be in QEventDispatcherGlib::processEvents (this=0x7f66840008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#6  0x00007f66a16240af in QEventLoop::processEvents (this=this@entry=0x7f668b155de0, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007f66a16243a5 in QEventLoop::exec (this=this@entry=0x7f668b155de0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007f66a1520c5f in QThread::exec (this=this@entry=0x1b2c7a0) at thread/qthread.cpp:537
#9  0x00007f66a1605823 in QInotifyFileSystemWatcherEngine::run (this=0x1b2c7a0) at io/qfilesystemwatcher_inotify.cpp:265
#10 0x00007f66a152332f in QThreadPrivate::start (arg=0x1b2c7a0) at thread/qthread_unix.cpp:349
#11 0x00007f669ce92182 in start_thread (arg=0x7f668b156700) at pthread_create.c:312
#12 0x00007f66a022647d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f66a2d5e7c0 (LWP 3534)):
[KCrash Handler]
#6  data (this=0x790073002f6b28) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:135
#7  qGetPtrHelper<QScopedPointer<QObjectData> > (p=...) at ../../include/QtCore/../../src/corelib/global/qglobal.h:2467
#8  d_func (this=0x790073002f6b20) at itemviews/qtreewidget.h:370
#9  QTreeWidget::setItemExpanded (this=0x790073002f6b20, item=item@entry=0x240a880, expand=expand@entry=true) at itemviews/qtreewidget.cpp:3142
#10 0x00007f6680522115 in setExpanded (aexpand=true, this=<optimized out>) at /usr/include/qt4/QtGui/qtreewidget.h:409
#11 USBViewer::refresh (this=0x1890f30) at ../../../../kinfocenter/Modules/usbview/kcmusb.cpp:148
#12 0x00007f66a163987a in QMetaObject::activate (sender=0x1e674b0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3539
#13 0x00007f66a163da31 in QObject::event (this=0x1e674b0, e=<optimized out>) at kernel/qobject.cpp:1156
#14 0x00007f66a09bee2c in QApplicationPrivate::notify_helper (this=this@entry=0x125dfb0, receiver=receiver@entry=0x1e674b0, e=e@entry=0x7fff96257140) at kernel/qapplication.cpp:4567
#15 0x00007f66a09c54a0 in QApplication::notify (this=this@entry=0x7fff962574b0, receiver=receiver@entry=0x1e674b0, e=e@entry=0x7fff96257140) at kernel/qapplication.cpp:4353
#16 0x00007f66a206fd1a in KApplication::notify (this=0x7fff962574b0, receiver=0x1e674b0, event=0x7fff96257140) at ../../kdeui/kernel/kapplication.cpp:311
#17 0x00007f66a16254dd in QCoreApplication::notifyInternal (this=0x7fff962574b0, receiver=0x1e674b0, event=0x7fff96257140) at kernel/qcoreapplication.cpp:953
#18 0x00007f66a1655323 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#19 QTimerInfoList::activateTimers (this=0x1265b10) at kernel/qeventdispatcher_unix.cpp:621
#20 0x00007f66a16525f1 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:193
#21 0x00007f669c5abe04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007f669c5ac048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007f669c5ac0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f66a16527a1 in QEventDispatcherGlib::processEvents (this=0x123c9a0, flags=...) at kernel/qeventdispatcher_glib.cpp:434
#25 0x00007f66a0a60bb6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#26 0x00007f66a16240af in QEventLoop::processEvents (this=this@entry=0x7fff962573b0, flags=...) at kernel/qeventloop.cpp:149
#27 0x00007f66a16243a5 in QEventLoop::exec (this=this@entry=0x7fff962573b0, flags=...) at kernel/qeventloop.cpp:204
#28 0x00007f66a1629b79 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#29 0x00007f66a09bd37c in QApplication::exec () at kernel/qapplication.cpp:3828
#30 0x000000000040ee5a in main (argc=1, argv=0x7fff962575e8) at ../../kinfocenter/main.cpp:62

Report to https://bugs.kde.org/
Comment 1 Andrew Crouthamel 2018-10-31 03:54:53 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 2 Bug Janitor Service 2018-11-15 10:51:45 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 tommy.trussell 2018-11-19 18:02:45 UTC
My apologies for the delay in updates. I haven't tried KDE on this Lenovo Thinkpad E540 in years; Over the weekend I installed kubuntu-desktop on this system. Generally it operates well, but of course it's mixed in with the other desktops I have installed now.

Yes I still see strange rendering of the USB device tree in kinfocenter. Fortunately I have not yet experienced a crash.

I just created ISOs of the last several versions of Kubuntu. They show the behavior I noted and I think I could take some screenshots.
Comment 4 tommy.trussell 2018-12-02 22:55:39 UTC
I just booted from 3 live isos, keeping the setup the same between them. The versions I tried were 
Kubuntu 14.04.5 (the most recent version of the OS I reported on), 
Kubuntu 18.04.1 (the most recent LTS version I could find) and 
Kubuntu 18.10 (the most recent release)

For each one I ran lsusb and lsusb -t and opened kinfocenter and clicked on Devices --> USB to show the USB Tree.

(I'm still attempting to attach the PNGs so please bear with me. I'll add a bit more commentary.)
Comment 5 tommy.trussell 2018-12-02 22:57:48 UTC
Created attachment 116634 [details]
screenshot 14.04.5 before plugging in mouse

Here is the screenshot before plugging in the mouse
Comment 6 tommy.trussell 2018-12-02 22:59:33 UTC
Created attachment 116635 [details]
screenshot 14.04.5 AFTER plugging in mouse

Here is the screenshot after plugging in the mouse. Notice that the kinfocenter device tree REPLACED an "unknown" device (which happens to be the fingerprint sensor) with the mouse.
Comment 7 tommy.trussell 2018-12-02 23:01:24 UTC
Created attachment 116636 [details]
screenshot 18.04.1 before plugging in mouse

18.04.1 before plugging in mouse. Note that the fingerprint sensor appears on the device tree with something unknown below it
Comment 8 tommy.trussell 2018-12-02 23:02:55 UTC
Created attachment 116637 [details]
screenshot 18.04.1 AFTER plugging in mouse

After plugging in the mouse, it replaces the "unknown" device, but it's somehow SUBORDINATE in the tree to the fingerprint reader.
Comment 9 tommy.trussell 2018-12-02 23:04:22 UTC
Created attachment 116638 [details]
screenshot 18.10 before plugging in mouse

In the latest version of Kubuntu, the kinfocenter tree looks better than before. There's no spurious "unknown" device
Comment 10 tommy.trussell 2018-12-02 23:05:52 UTC
Created attachment 116639 [details]
screenshot 18.10 AFTER plugging in mouse

The mouse shows up in the kinfocenter tree, but this time it's "unknown" and again it's inexplicably SUBORDINATE to the fingerprint reader in the tree.
Comment 11 tommy.trussell 2018-12-02 23:09:08 UTC
Note also in the last couple of versions of Kubuntu, when you plug in a device while kinfocenter is open, it kicks up a couple of errors

UdevQt: unhandled device action "bind"


FORTUNATELY I have not been able to replicate the crash that engendered this bug report years ago. Unfortunately I'm still seeing some strange rendering of the USB Tree in kinfocenter
Comment 12 Harald Sitter 2020-01-17 17:33:06 UTC
Seeing as the crash is no longer appearing I'm closing this bug. Feel free to file new bugs about the UI issues.