Bug 234498 - BluezDevil crash, invalid D-Bus path ""
Summary: BluezDevil crash, invalid D-Bus path ""
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: bluetooth (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR crash
Target Milestone: ---
Assignee: Alex Fiestas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-16 01:25 UTC by Christoph Feck
Modified: 2010-10-02 12:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed patch (609 bytes, patch)
2010-04-16 12:50 UTC, Eduardo Robles Elvira
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2010-04-16 01:25:34 UTC
Version:            (using Devel)
Installed from:    Compiled sources

I am trying BluezDevil currently in kdereview, but whenever KDE is started, I get a crash inside kded.

The crash may be related to newer Qt (4.7 branch) and D-Bus (1.2.16)

Prior to the crash the following debug messages are visible:

QDBusObjectPath: invalid path ""
process 3842: arguments to dbus_message_new_method_call() were incorrect, assertion "_dbus_check_is_valid_path (path)" failed in file dbus-message.c line 1078.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace

Program received signal SIGABRT, Aborted.

GDB backtrace:

(gdb) bt
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb63b60cf in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0xb63b79e7 in abort () at abort.c:88
#3  0xb5afb6f5 in _dbus_abort () at dbus-sysdeps.c:88
#4  0xb5af6da1 in _dbus_warn_check_failed (format=
    0xb5b04f00 "arguments to %s() were incorrect, assertion \"%s\" failed in file %s line %d.\nThis is normally a bug in some application using the D-Bus library.\n") at dbus-internals.c:283
#5  0xb5aea79c in dbus_message_new_method_call (destination=0x8126f80 "org.bluez", path=0xb6a8d3a8 "", interface=0x8126ef8 "org.freedesktop.DBus.Introspectable", method=0x8126ec0 "Introspect")
    at dbus-message.c:1075
#6  0xb6abc629 in q_dbus_message_new_method_call (bus_name=0x8126f80 "org.bluez", path=0xb6a8d3a8 "", interface=0x8126ef8 "org.freedesktop.DBus.Introspectable", method=0x8126ec0 "Introspect")
    at /local/git/Qt/qt/src/dbus/qdbus_symbols_p.h:262
#7  0xb6abeb7c in QDBusMessagePrivate::toDBusMessage (message=..., error=0xbfffde14) at /local/git/Qt/qt/src/dbus/qdbusmessage.cpp:131
#8  0xb6ab6371 in QDBusConnectionPrivate::sendWithReply (this=0x81206f8, message=..., sendMode=1, timeout=-1) at /local/git/Qt/qt/src/dbus/qdbusintegrator.cpp:1796
#9  0xb6ab7069 in QDBusConnectionPrivate::findMetaObject (this=0x81206f8, service=..., path=..., interface=..., error=...) at /local/git/Qt/qt/src/dbus/qdbusintegrator.cpp:2272
#10 0xb6ac695f in QDBusInterfacePrivate::QDBusInterfacePrivate (this=0x8126d00, serv=..., p=..., iface=..., con=...) at /local/git/Qt/qt/src/dbus/qdbusinterface.cpp:156
#11 0xb6ac6a5f in QDBusInterface::QDBusInterface (this=0x811e9c0, service=..., path=..., interface=..., connection=..., parent=0x0) at /local/git/Qt/qt/src/dbus/qdbusinterface.cpp:219
#12 0xb42ecb83 in BluezBluetoothInterface::BluezBluetoothInterface(QString const&) () from /local/KDE4/trunk/lib/kde4/solid_bluez.so
#13 0xb42ea027 in BluezBluetoothManager::createInterface(QString const&) () from /local/KDE4/trunk/lib/kde4/solid_bluez.so
#14 0xb43b183c in Solid::Control::BluetoothManagerPrivate::findRegisteredBluetoothInterface(QString const&) const () from /local/kde4/lib/libsolidcontrol.so.4
#15 0xb43b1bfc in Solid::Control::BluetoothManager::findBluetoothInterface(QString const&) const () from /local/kde4/lib/libsolidcontrol.so.4
#16 0xb43b0124 in Solid::Control::BluetoothInterface::BluetoothInterface(QString const&) () from /local/kde4/lib/libsolidcontrol.so.4
#17 0xb5a41fcd in BlueDevilDaemon::onlineMode() () from /local/KDE4/trunk/lib/kde4/kded_bluedevil.so
#18 0xb5a426b0 in BlueDevilDaemon::BlueDevilDaemon(QObject*, QList<QVariant> const&) () from /local/KDE4/trunk/lib/kde4/kded_bluedevil.so
#19 0xb5a42d98 in QObject* KPluginFactory::createInstance<BlueDevilDaemon, QObject>(QWidget*, QObject*, QList<QVariant> const&) () from /local/KDE4/trunk/lib/kde4/kded_bluedevil.so
#20 0xb6cfae03 in KPluginFactory::create(char const*, QWidget*, QObject*, QList<QVariant> const&, QString const&) () from /local/kde4/lib/libkdecore.so.5
#21 0xb7fd4750 in Kded::loadModule(KSharedPtr<KService> const&, bool) () from /local/kde4/lib/libkdeinit4_kded4.so
#22 0xb7fd5fe2 in Kded::initModules() () from /local/kde4/lib/libkdeinit4_kded4.so
#23 0xb7fdad9d in KDEDApplication::newInstance() () from /local/kde4/lib/libkdeinit4_kded4.so
#24 0xb7b9088c in KUniqueApplication::Private::_k_newInstanceNoFork() () from /local/kde4/lib/libkdeui.so.5
#25 0xb7b90900 in KUniqueApplication::qt_metacall(QMetaObject::Call, int, void**) () from /local/kde4/lib/libkdeui.so.5
#26 0xb695fbca in QMetaObject::metacall (object=0xbffff030, cl=3842, idx=-1210781713, argv=0x80d1788) at /local/git/Qt/qt/src/corelib/kernel/qmetaobject.cpp:237
#27 0xb696afb6 in QMetaCallEvent::placeMetaCall (this=0x80c7240, object=0xbffff030) at /local/git/Qt/qt/src/corelib/kernel/qobject.cpp:553
#28 0xb696c1fe in QObject::event (this=0xbffff030, e=0x80c7240) at /local/git/Qt/qt/src/corelib/kernel/qobject.cpp:1234
#29 0xb6959d1b in QCoreApplication::event (this=0xbffff030, e=0x80c7240) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1533
#30 0xb6e85556 in QApplication::event (this=0xbffff030, e=0x80c7240) at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:2394
#31 0xb6e819ec in QApplicationPrivate::notify_helper (this=0x8077f38, receiver=0xbffff030, e=0x80c7240) at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:4341
#32 0xb6e87a5e in QApplication::notify (this=0xbffff030, receiver=0xbffff030, e=0x80c7240) at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:3745
#33 0xb7b8a4a6 in KApplication::notify(QObject*, QEvent*) () from /local/kde4/lib/libkdeui.so.5
#34 0xb6959e7b in QCoreApplication::notifyInternal (this=0xbffff030, receiver=0xbffff030, event=0x80c7240) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:704
#35 0xb695e0d4 in sendEvent (event=<value optimized out>, receiver=<value optimized out>) at ../../include/QtCore/../../../../git/Qt/qt/src/corelib/kernel/qcoreapplication.h:215
#36 QCoreApplicationPrivate::sendPostedEvents (event=<value optimized out>, receiver=<value optimized out>) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1345
#37 0xb695e24d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:1238
#38 0xb698801f in sendPostedEvents () at ../../include/QtCore/../../../../git/Qt/qt/src/corelib/kernel/qcoreapplication.h:220
#39 postEventSourceDispatch () at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:276
#40 0xb5fcf87e in g_main_dispatch (context=<value optimized out>) at gmain.c:1960
#41 IA__g_main_context_dispatch (context=<value optimized out>) at gmain.c:2513
#42 0xb5fd35b8 in g_main_context_iterate (context=0x807a300, block=<value optimized out>, dispatch=1, self=0x8078118) at gmain.c:2591
#43 0xb5fd375e in IA__g_main_context_iteration (context=0x807a300, may_block=1) at gmain.c:2654
#44 0xb6987b15 in QEventDispatcherGlib::processEvents (this=0x80780d0, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventdispatcher_glib.cpp:412
#45 0xb6f40355 in QGuiEventDispatcherGlib::processEvents (this=0x80780d0, flags=...) at /local/git/Qt/qt/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#46 0xb6958959 in QEventLoop::processEvents (this=0xbfffef84, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:149
#47 0xb6958daa in QEventLoop::exec (this=0xbfffef84, flags=...) at /local/git/Qt/qt/src/corelib/kernel/qeventloop.cpp:201
#48 0xb695e30f in QCoreApplication::exec () at /local/git/Qt/qt/src/corelib/kernel/qcoreapplication.cpp:981
#49 0xb6e809b7 in QApplication::exec () at /local/git/Qt/qt/src/gui/kernel/qapplication.cpp:3620
#50 0xb7fd86f9 in kdemain () from /local/kde4/lib/libkdeinit4_kded4.so
#51 0x0804873b in main ()
(gdb) quit
Comment 1 Eduardo Robles Elvira 2010-04-16 12:50:41 UTC
Created attachment 42819 [details]
Proposed patch

I've not been able to reproduce the bug in my computer. Please, confirm me that you have a bluetooth adapter in your computer (which probably is the case, because online() function is being called). If so, the problem is probably that you have a bluetooth adapter but it's not configured as being the default one - which shouldn't be crashing (I've tested that usecase in my PC but it doesn't seem to crash like yours).

I've created the attached patch that will let us know, please apply it in kdereview/bluedevil/src/daemon/kded and tell me what happens.
Comment 2 Christoph Feck 2010-04-16 17:15:40 UTC
I replaced "isNull" with "isEmpty", and no longer got a crash, thanks.

If the default interface/path is read from some configuration file, it is probably wise to apply some more sanity checks to ensure no invalid path is passed to D-Bus functions. Maybe Qt has some isValid() functions ...

Additional note: I did not configure anything, but just started with an empty .kde when I got the crash. I also don't know if my computer has bluetooth devices, how can I check? lspci does not list it.
Comment 3 Eduardo Robles Elvira 2010-04-28 16:15:07 UTC
SVN commit 1120164 by edulix:

BUG:234498
CCMAIL:alex@eyeos.org



 M  +14 -2     BlueDevilDaemon.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1120164
Comment 4 Christoph Feck 2010-05-03 20:48:14 UTC
Unfortunately, the proposed patch and the committed patch differ, and I (still) get the following crash after updating to kdereview r1122275.

QDBusObjectPath: invalid path ""
[New Thread 0xb41c8b70 (LWP 7855)]
QDBusObjectPath: invalid path ""
process 7850: arguments to dbus_message_new_method_call() were incorrect, assertion "_dbus_check_is_valid_path (path)" failed in file dbus-message.c line 1078.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb41c8b70 (LWP 7855)]
0xffffe424 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb64080cf in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0xb64099e7 in abort () at abort.c:88
#3  0xb5a6e6f5 in _dbus_abort () at dbus-sysdeps.c:88
#4  0xb5a69da1 in _dbus_warn_check_failed (format=
    0xb5a77f00 "arguments to %s() were incorrect, assertion \"%s\" failed in file %s line %d.\nThis is normally a bug in some application using the D-Bus library.\n") at dbus-internals.c:283
#5  0xb5a5d79c in dbus_message_new_method_call (destination=0x8185020 "org.bluez", path=0xb6acf3a8 "", interface=0x8187270 "org.freedesktop.DBus.Introspectable", method=0x81850d8 "Introspect")
    at dbus-message.c:1075
#6  0xb6afb676 in q_dbus_message_new_method_call (method=0x81850d8 "Introspect", interface=0x8187270 "org.freedesktop.DBus.Introspectable", path=0xb6acf3a8 "", bus_name=0x8185020 "org.bluez")
    at /local/git/Qt/qt/src/dbus/qdbus_symbols_p.h:264
#7  QDBusMessagePrivate::toDBusMessage (method=0x81850d8 "Introspect", interface=0x8187270 "org.freedesktop.DBus.Introspectable", path=0xb6acf3a8 "", bus_name=0x8185020 "org.bluez")
    at /local/git/Qt/qt/src/dbus/qdbusmessage.cpp:133
#8  0xb6af36d1 in QDBusConnectionPrivate::sendWithReply (this=0x8160850, message=..., sendMode=1, timeout=-1) at /local/git/Qt/qt/src/dbus/qdbusintegrator.cpp:1801
#9  0xb6af45aa in QDBusConnectionPrivate::findMetaObject (this=0x8160850, service=..., path=..., interface=..., error=...) at /local/git/Qt/qt/src/dbus/qdbusintegrator.cpp:2277
#10 0xb6b0521f in QDBusInterfacePrivate::QDBusInterfacePrivate (this=0x8186e98, serv=..., p=..., iface=..., con=...) at /local/git/Qt/qt/src/dbus/qdbusinterface.cpp:158
#11 0xb6b0535f in QDBusInterface::QDBusInterface (this=0x81854c8, service=..., path=..., interface=..., connection=..., parent=0x0) at /local/git/Qt/qt/src/dbus/qdbusinterface.cpp:220
#12 0xb41d7073 in BluezBluetoothInterfacePrivate::BluezBluetoothInterfacePrivate (this=0x81854c8, objPath=...) at /local/svn/kde/trunk/KDE/kdebase/workspace/solid/bluez/bluez-bluetoothinterface.cpp:41
#13 0xb41d3dc8 in BluezBluetoothInterface::BluezBluetoothInterface (this=0x8186dc0, objectPath=...) at /local/svn/kde/trunk/KDE/kdebase/workspace/solid/bluez/bluez-bluetoothinterface.cpp:53
#14 0xb41d1ba1 in BluezBluetoothManager::createInterface (this=0x8180eb8, ubi=...) at /local/svn/kde/trunk/KDE/kdebase/workspace/solid/bluez/bluez-bluetoothmanager.cpp:130
#15 0xb43179d1 in Solid::Control::BluetoothManagerPrivate::findRegisteredBluetoothInterface (this=0x81802a8, ubi=...)
    at /local/svn/kde/trunk/KDE/kdebase/workspace/libs/solid/control/bluetoothmanager.cpp:364
#16 0xb43172a0 in Solid::Control::BluetoothManager::findBluetoothInterface (this=0x817f640, ubi=...) at /local/svn/kde/trunk/KDE/kdebase/workspace/libs/solid/control/bluetoothmanager.cpp:155
#17 0xb43133e5 in Solid::Control::BluetoothInterface::BluetoothInterface (this=0x8186be8, ubi=...) at /local/svn/kde/trunk/KDE/kdebase/workspace/libs/solid/control/bluetoothinterface.cpp:69
#18 0xb41ecb5e in AgentListenerWorker::AgentListenerWorker (this=0x8185bc0, parent=0x817c890) at /local/svn/kde/trunk/kdereview/bluedevil/src/daemon/kded/agentlistenerworker.cpp:37
#19 0xb41ec9ea in AgentListener::run (this=0x8183258) at /local/svn/kde/trunk/kdereview/bluedevil/src/daemon/kded/agentlistener.cpp:36
#20 0xb68a95e9 in QThreadPrivate::start (arg=0x8183258) at /local/git/Qt/qt/src/corelib/thread/qthread_unix.cpp:266
#21 0xb681a6e5 in start_thread (arg=0x0) at pthread_create.c:297
#22 0xb681a600 in ?? () at pthread_create.c:216 from /lib/libpthread.so.0
(gdb) quit
Comment 5 Christoph Feck 2010-08-03 12:23:29 UTC
BlueDevil is no longer in kdereview. I will check if the version from git still has the issue.