KAuth and KF5

Milian Wolff mail at milianw.de
Mon Jun 30 12:14:10 UTC 2014


On Monday 30 June 2014 00:05:10 šumski wrote:
> On Thursday 26 of June 2014 12:14:49 Milian Wolff wrote:
> > Hey,
> > 
> > did you run it through valgrind?
> 
> Here's what valgrind says:

Sounds like a bug in Qt to me, I have to say. Looking at the code, 
QDBusConnectionPrivate::objectDestroyed looks pretty fragile, I mean it does 
this at the end:

obj->disconnect(this);

But from the code in QDBusConnectionPrivate::disconnectSignal nothing jumps 
out as dangerous directly. The fact, that valgrind is getting confused in the 
stack trace is not helping either ;-) Could you maybe try to compile qtbase in 
debug mode and reproduce the issue, such that we get a full stacktrace without 
optimizations etc.?

Anyways, maybe Thiago (CC'ed) can give us some insight on whats going on here.

Bye

> ==30114== Invalid read of size 8
> ==30114==    at 0xDF080C1:
> QDBusConnectionPrivate::disconnectSignal(QHash<QString,
> QDBusConnectionPrivate::SignalHook>::iterator&) (qstring.h:814)
> ==30114==    by 0xDF08430: QDBusConnectionPrivate::objectDestroyed(QObject*)
> (qdbusintegrator.cpp:1227)
> ==30114==    by 0xDF4F37B:
> QDBusConnectionPrivate::qt_static_metacall(QObject*, QMetaObject::Call, int,
> void**) (moc_qdbusconnection_p.cpp:131)
> ==30114==    by 0x52F601D: QMetaObject::activate(QObject*, int, int, void**)
> (qobject.cpp:3680)
> ==30114==    by 0x52F656E: QObject::destroyed(QObject*)
> (moc_qobject.cpp:205) ==30114==    by 0x52FDA07: QObject::~QObject()
> (qobject.cpp:901)
> ==30114==    by 0xDCD5228: PolkitQt1::Authority::~Authority() (polkitqt1-
> authority.cpp:164)
> ==30114==    by 0xDCD4DE1: PolkitQt1::(anonymous
> namespace)::Q_QGS_s_globalAuthority::innerFunction()::Holder::~Holder()
> (polkitqt1-authority.cpp:40)
> ==30114==    by 0x5C62F78: __run_exit_handlers (in /lib64/libc-2.19.so)
> ==30114==    by 0x5C62FC4: exit (in /lib64/libc-2.19.so)
> ==30114==    by 0x5C4CB0B: (below main) (in /lib64/libc-2.19.so)
> ==30114==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
> ==30114==
> ==30114==
> ==30114== Process terminating with default action of signal 11 (SIGSEGV)
> ==30114==  Access not within mapped region at address 0x0
> ==30114==    at 0xDF080C1:
> QDBusConnectionPrivate::disconnectSignal(QHash<QString,
> QDBusConnectionPrivate::SignalHook>::iterator&) (qstring.h:814)
> ==30114==    by 0xDF08430: QDBusConnectionPrivate::objectDestroyed(QObject*)
> (qdbusintegrator.cpp:1227)
> ==30114==    by 0xDF4F37B:
> QDBusConnectionPrivate::qt_static_metacall(QObject*, QMetaObject::Call, int,
> void**) (moc_qdbusconnection_p.cpp:131)
> ==30114==    by 0x52F601D: QMetaObject::activate(QObject*, int, int, void**)
> (qobject.cpp:3680)
> ==30114==    by 0x52F656E: QObject::destroyed(QObject*)
> (moc_qobject.cpp:205) ==30114==    by 0x52FDA07: QObject::~QObject()
> (qobject.cpp:901)
> ==30114==    by 0xDCD5228: PolkitQt1::Authority::~Authority() (polkitqt1-
> authority.cpp:164)
> ==30114==    by 0xDCD4DE1: PolkitQt1::(anonymous
> namespace)::Q_QGS_s_globalAuthority::innerFunction()::Holder::~Holder()
> (polkitqt1-authority.cpp:40)
> ==30114==    by 0x5C62F78: __run_exit_handlers (in /lib64/libc-2.19.so)
> ==30114==    by 0x5C62FC4: exit (in /lib64/libc-2.19.so)
> ==30114==    by 0x5C4CB0B: (below main) (in /lib64/libc-2.19.so)
> 
> > On Wednesday 25 June 2014 23:17:29 Luca Beltrame wrote:
> > > šumski wrote:
> > > > http://paste.opensuse.org/view/raw/45956382
> > > 
> > > In case the pastebin link expires:
> > > 
> > > #0  QString (other=..., this=0x7fff18fa23b0) at
> > > ../../src/corelib/tools/qstring.h:814
> > > #1  dbusInterfaceString () at qdbusintegrator.cpp:87
> > > #2  QDBusConnectionPrivate::disconnectSignal (this=this at entry=0xa93640,
> > > it=...) at qdbusintegrator.cpp:2270
> > > #3  0x00007fde826414b1 in QDBusConnectionPrivate::objectDestroyed
> > > (this=0xa93640, obj=0xa6f720) at qdbusintegrator.cpp:1228
> > > #4  0x00007fde826883bc in QDBusConnectionPrivate::qt_static_metacall
> > > (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>,
> > > _a=<optimized out>)
> > > 
> > >     at .moc/moc_qdbusconnection_p.cpp:131
> > > 
> > > #5  0x00007fde83ebcd7e in QMetaObject::activate
> > > (sender=sender at entry=0xa6f720, signalOffset=<optimized out>,
> > > local_signal_index=local_signal_index at entry=0,
> > > 
> > >     argv=argv at entry=0x7fff18fa2610) at kernel/qobject.cpp:3680
> > > 
> > > #6  0x00007fde83ebd237 in QMetaObject::activate
> > > (sender=sender at entry=0xa6f720, m=m at entry=0x7fde842caf00
> > > <QObject::staticMetaObject>,
> > > 
> > >     local_signal_index=local_signal_index at entry=0,
> > > 
> > > argv=argv at entry=0x7fff18fa2610) at kernel/qobject.cpp:3546
> > > #7  0x00007fde83ebd2cf in QObject::destroyed (this=this at entry=0xa6f720,
> > > _t1=_t1 at entry=0xa6f720) at .moc/moc_qobject.cpp:205
> > > #8  0x00007fde83ec4768 in QObject::~QObject (this=0xa6f720,
> > > __in_chrg=<optimized out>) at kernel/qobject.cpp:901
> > > #9  0x00007fde7b36ae39 in PolkitQt1::Authority::~Authority
> > > (this=0xa6f720, __in_chrg=<optimized out>)
> > > 
> > >     at
> > >     /usr/src/debug/polkit-qt-1-0.103.0/core/polkitqt1-authority.cpp:164
> > > 
> > > #10 0x00007fde7b36aa62 in PolkitQt1::(anonymous
> > > namespace)::Q_QGS_s_globalAuthority::innerFunction()::Holder::~Holder()
> > > ()
> > > 
> > >     at
> > >     /usr/src/debug/polkit-qt-1-0.103.0/core/polkitqt1-authority.cpp:40
> > > 
> > > #11 0x00007fde8337df99 in __run_exit_handlers () from /lib64/libc.so.6
> > > #12 0x00007fde8337dfe5 in exit () from /lib64/libc.so.6
> > > #13 0x00007fde83367b0c in __libc_start_main () from /lib64/libc.so.6
> > > #14 0x0000000000402021 in _start () at ../sysdeps/x86_64/start.S:122

-- 
Milian Wolff
mail at milianw.de
http://milianw.de


More information about the Kde-frameworks-devel mailing list