[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [amarok] [Bug 317952] New: crash on insertion of usb wireless keyboard receiver, recursion in
From:       James Hogan <james () albanarts ! com>
Date:       2013-04-06 22:36:35
Message-ID: bug-317952-17878 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=317952

            Bug ID: 317952
           Summary: crash on insertion of usb wireless keyboard receiver,
                    recursion in
                    Solid::Backends::UPower::UPowerDevice::{product,descri
                    ption} smashes stack
    Classification: Unclassified
           Product: amarok
           Version: 2.7.0
          Platform: Fedora RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: critical
          Priority: NOR
         Component: general
          Assignee: amarok-bugs-dist@kde.org
          Reporter: james@albanarts.com

Inserting a Logitech k400 Wireless Touch Keyboard USB receiver causes Amarok to
immediately crash.

gdb post mortem:
* A seg fault is triggered by a stack push instruction with stack pointer on a
page boundary.
* backtrace has 116153 frames, the majority of which are alternating between
Solid::Backends::UPower::UPowerDevice::product and
Solid::Backends::UPower::UPowerDevice::description

I'm assuming it's an amarok bug due to misuse of solid since I didn't see
anything else crash and the recursion seems quite blatant, however I haven't
looked deeply so could well be wrong.

Reproducible: Always

Steps to Reproduce:
1. Start Amarok
2. Insert  Logitech K400 Wireless Touch Keyboard USB  receiver
Actual Results:  
Amarok immediately crashes without showing kde crash dialog (presumably due to
lack of usable stack for handling signal).

Expected Results:  
nothing noticeable as far as I know

$ amarok --version
Qt: 4.8.4
KDE Development Platform: 4.10.1
Amarok: 2.7.0

gdb backtrace:
#0  0x0000003f9607f454 in __GI___libc_malloc (bytes=42) at malloc.c:2914
#1  0x00000038d5ec0775 in QString::QString (this=0x7fff09eaa0b0, size=5) at
tools/qstring.cpp:1141
#2  0x00000038d5faee91 in QUtf8::convertToUnicode (chars=<optimized out>,
len=<optimized out>, state=0x0) at codecs/qutfcodec.cpp:183
#3  0x00000038d5faf251 in QUtf8Codec::convertToUnicode (this=<optimized out>,
chars=<optimized out>, len=<optimized out>, state=<optimized out>)
    at codecs/qutfcodec.cpp:532
#4  0x00000038d5ec653d in toUnicode (state=0x0, length=<optimized out>,
in=<optimized out>, this=0x188a680)
    at ../../src/corelib/codecs/qtextcodec.h:116
#5  QString::fromAscii_helper (str=<optimized out>, size=<optimized out>) at
tools/qstring.cpp:3880
#6  0x0000003998c9ee8d in QString (ch=0x3998cc34d2 "Type", this=0x7fff09eaa0d0)
at /usr/include/QtCore/qstring.h:419
#7  Solid::Backends::UPower::UPowerDevice::queryDeviceInterface
(this=0x3009e70, type=@0x7fff09eaa11c: Solid::DeviceInterface::AcAdapter)
    at
/usr/src/debug/kdelibs-4.10.1/solid/solid/backends/upower/upowerdevice.cpp:80
#8  0x0000003998c9ed68 in Solid::Backends::UPower::UPowerDevice::description
(this=0x3009e70)
    at
/usr/src/debug/kdelibs-4.10.1/solid/solid/backends/upower/upowerdevice.cpp:101
#9  0x0000003998c9eba8 in Solid::Backends::UPower::UPowerDevice::product
(this=0x3009e70)
    at
/usr/src/debug/kdelibs-4.10.1/solid/solid/backends/upower/upowerdevice.cpp:149
#10 0x0000003998c9ed9c in Solid::Backends::UPower::UPowerDevice::description
(this=0x3009e70)
    at
/usr/src/debug/kdelibs-4.10.1/solid/solid/backends/upower/upowerdevice.cpp:106
<long snip>
#116118 0x0000003998c9ed9c in
Solid::Backends::UPower::UPowerDevice::description (this=0x3009e70)
    at
/usr/src/debug/kdelibs-4.10.1/solid/solid/backends/upower/upowerdevice.cpp:106
#116119 0x0000003998c9eba8 in Solid::Backends::UPower::UPowerDevice::product
(this=0x3009e70)
    at
/usr/src/debug/kdelibs-4.10.1/solid/solid/backends/upower/upowerdevice.cpp:149
#116120 0x0000003998c9ed9c in
Solid::Backends::UPower::UPowerDevice::description (this=0x3009e70)
    at
/usr/src/debug/kdelibs-4.10.1/solid/solid/backends/upower/upowerdevice.cpp:106
#116121 0x0000003998c9eba8 in Solid::Backends::UPower::UPowerDevice::product
(this=0x3009e70)
    at
/usr/src/debug/kdelibs-4.10.1/solid/solid/backends/upower/upowerdevice.cpp:149
#116122 0x0000003998c9ed9c in
Solid::Backends::UPower::UPowerDevice::description (this=0x3009e70)
    at
/usr/src/debug/kdelibs-4.10.1/solid/solid/backends/upower/upowerdevice.cpp:106
#116123 0x0000003998c9eba8 in Solid::Backends::UPower::UPowerDevice::product
(this=0x3009e70)
    at
/usr/src/debug/kdelibs-4.10.1/solid/solid/backends/upower/upowerdevice.cpp:149
#116124 0x0000003998c424f6 in Solid::Device::product (this=<optimized out>) at
/usr/src/debug/kdelibs-4.10.1/solid/solid/device.cpp:133
#116125 0x00007f915505859f in MediaDeviceCache::slotAddSolidDevice(QString
const&) () from /lib64/libamaroklib.so.1
#116126 0x00000038d5f8cdef in QMetaObject::activate (sender=0x1d890c0,
m=<optimized out>, local_signal_index=<optimized out>, argv=
    0x7fff0a6a3cf0) at kernel/qobject.cpp:3539
#116127 0x0000003998c435d2 in Solid::DeviceNotifier::deviceAdded
(this=this@entry=0x1d890c0, _t1=...)
    at
/usr/src/debug/kdelibs-4.10.1/x86_64-redhat-linux-gnu/solid/solid/devicenotifier.moc:100
#116128 0x0000003998c4460b in Solid::DeviceManagerPrivate::_k_deviceAdded
(this=0x1d890c0, udi=...)
    at /usr/src/debug/kdelibs-4.10.1/solid/solid/devicemanager.cpp:189
#116129 0x00000038d5f8cdef in QMetaObject::activate (sender=0x1d8bd90,
m=<optimized out>, local_signal_index=<optimized out>, argv=
    0x7fff0a6a3ed0) at kernel/qobject.cpp:3539
#116130 0x0000003998c589c2 in Solid::Ifaces::DeviceManager::deviceAdded
(this=<optimized out>, _t1=...)
    at
/usr/src/debug/kdelibs-4.10.1/x86_64-redhat-linux-gnu/solid/solid/ifaces/devicemanager.moc:100
#116131 0x00000038d5f8cdef in QMetaObject::activate (sender=0x1d8bda8,
m=<optimized out>, local_signal_index=<optimized out>, argv=
    0x7fff0a6a4270) at kernel/qobject.cpp:3539
#116132 0x00000038d7e37691 in QDBusInterfacePrivate::metacall (this=0x1d90370,
c=<optimized out>, id=2, argv=0x7fff0a6a4270)
    at qdbusinterface.cpp:278
#116133 0x00000038d7e230b3 in QDBusConnectionPrivate::deliverCall
(this=0x1d8beb0, object=0x1d8bda8, msg=..., metaTypes=..., slotIdx=7)
    at qdbusintegrator.cpp:951
#116134 0x00000038d5f8c2ce in QObject::event (this=0x1d8bda8, e=<optimized
out>) at kernel/qobject.cpp:1194
#116135 0x00000038d65ca5ac in QApplicationPrivate::notify_helper
(this=this@entry=0x18f8140, receiver=receiver@entry=0x1d8bda8, e=e@entry=
    0x309a1b0) at kernel/qapplication.cpp:4562
#116136 0x00000038d65cea2a in QApplication::notify (this=0x7fff0a6a6fd0,
receiver=0x1d8bda8, e=0x309a1b0) at kernel/qapplication.cpp:4423
#116137 0x00000039978473b6 in KApplication::notify (this=0x7fff0a6a6fd0,
receiver=0x1d8bda8, event=0x309a1b0)
    at /usr/src/debug/kdelibs-4.10.1/kdeui/kernel/kapplication.cpp:311
#116138 0x00000038d5f779ce in QCoreApplication::notifyInternal
(this=0x7fff0a6a6fd0, receiver=receiver@entry=0x1d8bda8, event=event@entry=
    0x309a1b0) at kernel/qcoreapplication.cpp:946
#116139 0x00000038d5f7b481 in sendEvent (event=0x309a1b0, receiver=0x1d8bda8)
at kernel/qcoreapplication.h:231
#116140 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0,
data=0x178e7d0) at kernel/qcoreapplication.cpp:1570
#116141 0x00000038d5fa5e63 in sendPostedEvents () at
kernel/qcoreapplication.h:236
#116142 postEventSourceDispatch (s=0x1906870) at
kernel/qeventdispatcher_glib.cpp:279
#116143 0x0000003f98047825 in g_main_context_dispatch () from
/lib64/libglib-2.0.so.0
#116144 0x0000003f98047b58 in ?? () from /lib64/libglib-2.0.so.0
#116145 0x0000003f98047c14 in g_main_context_iteration () from
/lib64/libglib-2.0.so.0
#116146 0x00000038d5fa5ff6 in QEventDispatcherGlib::processEvents
(this=0x178fd10, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#116147 0x00000038d666a5ee in QGuiEventDispatcherGlib::processEvents
(this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#116148 0x00000038d5f7671f in QEventLoop::processEvents
(this=this@entry=0x7fff0a6a4bf0, flags=...) at kernel/qeventloop.cpp:149
#116149 0x00000038d5f769a8 in QEventLoop::exec (this=0x7fff0a6a4bf0, flags=...)
at kernel/qeventloop.cpp:204
#116150 0x00000038d5f7b798 in QCoreApplication::exec () at
kernel/qcoreapplication.cpp:1218
#116151 0x00000000004090ba in ?? ()
#116152 0x0000003f96021735 in __libc_start_main (main=0x402310, argc=2,
ubp_av=0x7fff0a6a7138, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fff0a6a7128) at libc-start.c:226
#116153 0x000000000040bb8d in _start ()

(gdb) disas
Dump of assembler code for function __GI___libc_malloc:
   0x0000003f9607f450 <+0>:     push   %rbp
   0x0000003f9607f451 <+1>:     mov    %rdi,%rbp
=> 0x0000003f9607f454 <+4>:     push   %rbx

(gdb) p $rsp
$3 = (void *) 0x7fff09eaa000

(gdb) frame 10
#10 0x0000003998c9ed9c in Solid::Backends::UPower::UPowerDevice::description
(this=0x3009e70)
    at
/usr/src/debug/kdelibs-4.10.1/solid/solid/backends/upower/upowerdevice.cpp:106
106             return product();
(gdb) l
101         if (queryDeviceInterface(Solid::DeviceInterface::AcAdapter))
102             return QObject::tr("A/C Adapter");
103         else if (queryDeviceInterface(Solid::DeviceInterface::Battery))
104             return QObject::tr("%1 Battery", "%1 is battery
technology").arg(batteryTechnology());
105         else
106             return product();
107     }
108
109     QString UPowerDevice::batteryTechnology() const
110     {
(gdb) down
#9  0x0000003998c9eba8 in Solid::Backends::UPower::UPowerDevice::product
(this=0x3009e70)
    at
/usr/src/debug/kdelibs-4.10.1/solid/solid/backends/upower/upowerdevice.cpp:149
149             result = description();
(gdb) l
144     QString UPowerDevice::product() const
145     {
146         QString result = prop("Model").toString();
147
148         if (result.isEmpty()) {
149             result = description();
150         }
151
152         return result;
153     }

-- 
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic