Bug 256712

Summary: kded4 crash after authorization [KIO::AuthInfo::~AuthInfo, KPasswdServer::findAuthInfoItem]
Product: [Frameworks and Libraries] kio Reporter: ricky
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: crash CC: adawit, ahartmetz, bugs, cfeck, joel.porquet, kde, null, rdieter, thomas, toralf.foerster, westsideseattlite, wonko, zeekec
Priority: NOR    
Version: 4.5   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 4.7.4
Attachments: DrKonqui crash info
New crash information added by DrKonqi

Description ricky 2010-11-12 16:08:07 UTC
Application: kded4 ($Id: kded.cpp 1156841 2010-07-29 19:59:05Z zander $)
KDE Platform Version: 4.5.2 (KDE 4.5.2)
Qt Version: 4.6.3
Operating System: Linux 2.6.34.7-61.fc13.i686 i686
Distribution: "Fedora release 13 (Goddard)"

-- Information about the crash:
- What I was doing when the application crashed:
Reading mail and using kdevelop. Not enough time using upgraded system to see why this is happening yet

-- Backtrace:
Application: KDE Daemon (kded4), signal: Segmentation fault
[KCrash Handler]
#7  QMap<QString, ExtraField>::freeData (this=0x9c7f778, x=0x9cc0148) at /usr/include/QtCore/qmap.h:620
#8  0x07c79dae in ~QMap (this=0x9c89b70, __in_chrg=<value optimized out>) at /usr/include/QtCore/qmap.h:167
#9  ~AuthInfoPrivate (this=0x9c89b70, __in_chrg=<value optimized out>) at /usr/src/debug/kdelibs-4.5.2/kio/kio/authinfo.cpp:101
#10 KIO::AuthInfo::~AuthInfo (this=0x9c89b70, __in_chrg=<value optimized out>) at /usr/src/debug/kdelibs-4.5.2/kio/kio/authinfo.cpp:128
#11 0x08444cd0 in ~AuthInfoContainer (this=0x9c82b88, key=..., info=...) at /usr/src/debug/kdebase-runtime-4.5.2/kpasswdserver/kpasswdserver.h:81
#12 KPasswdServer::findAuthInfoItem (this=0x9c82b88, key=..., info=...) at /usr/src/debug/kdebase-runtime-4.5.2/kpasswdserver/kpasswdserver.cpp:749
#13 0x084499ef in KPasswdServer::checkAuthInfoAsync (this=0x9c82b88, info=..., windowId=0, usertime=0) at /usr/src/debug/kdebase-runtime-4.5.2/kpasswdserver/kpasswdserver.cpp:306
#14 0x0844bcb9 in KPasswdServerAdaptor::checkAuthInfoAsync (this=0x9c53150, info=..., windowId=0, usertime=0)
    at /usr/src/debug/kdebase-runtime-4.5.2/i686-redhat-linux-gnu/kpasswdserver/kpasswdserveradaptor.cpp:57
#15 0x0844c1d0 in KPasswdServerAdaptor::qt_metacall (this=0x9c53150, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0xbff65abc)
    at /usr/src/debug/kdebase-runtime-4.5.2/i686-redhat-linux-gnu/kpasswdserver/kpasswdserveradaptor.moc:151
#16 0x003b728c in QDBusConnectionPrivate::deliverCall (this=0x9b9dba8, object=0x9c53150, msg=..., metaTypes=..., slotIdx=9) at qdbusintegrator.cpp:904
#17 0x003b85ad in QDBusConnectionPrivate::activateCall (this=0x9b9dba8, object=0x9c53150, flags=497, msg=...) at qdbusintegrator.cpp:816
#18 0x003b8fd1 in QDBusConnectionPrivate::activateObject (this=0x9b9dba8, node=..., msg=..., pathStartPos=22) at qdbusintegrator.cpp:1364
#19 0x003b925b in QDBusActivateObjectEvent::placeMetaCall (this=0x9c8b650) at qdbusintegrator.cpp:1477
#20 0x0665409e in QObject::event (this=0x9c82b88, e=0x9c8b650) at kernel/qobject.cpp:1248
#21 0x06ea377c in QApplicationPrivate::notify_helper (this=0x9ba4e70, receiver=0x9c82b88, e=0x9c8b650) at kernel/qapplication.cpp:4306
#22 0x06eaa1d6 in QApplication::notify (this=0xbff664e0, receiver=0x9c82b88, e=0x9c8b650) at kernel/qapplication.cpp:3710
#23 0x07988f7b in KApplication::notify (this=0xbff664e0, receiver=0x9c82b88, event=0x9c8b650) at /usr/src/debug/kdelibs-4.5.2/kdeui/kernel/kapplication.cpp:310
#24 0x06644133 in QCoreApplication::notifyInternal (this=0xbff664e0, receiver=0x9c82b88, event=0x9c8b650) at kernel/qcoreapplication.cpp:726
#25 0x066465bc in sendEvent (receiver=0x0, event_type=0, data=0x9b85870) at kernel/qcoreapplication.h:215
#26 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9b85870) at kernel/qcoreapplication.cpp:1367
#27 0x0664673e in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1260
#28 0x0666c950 in sendPostedEvents (s=0x9ba7310) at kernel/qcoreapplication.h:220
#29 postEventSourceDispatch (s=0x9ba7310) at kernel/qeventdispatcher_glib.cpp:276
#30 0x009f0525 in g_main_dispatch (context=0x9ba7290) at gmain.c:1960
#31 IA__g_main_context_dispatch (context=0x9ba7290) at gmain.c:2513
#32 0x009f4268 in g_main_context_iterate (context=0x63d490, block=1, dispatch=1, self=0x9ba50e0) at gmain.c:2591
#33 0x009f4449 in IA__g_main_context_iteration (context=0x9ba7290, may_block=1) at gmain.c:2654
#34 0x0666c446 in QEventDispatcherGlib::processEvents (this=0x9b85370, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#35 0x06f52336 in QGuiEventDispatcherGlib::processEvents (this=0x9b85370, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#36 0x0664280a in QEventLoop::processEvents (this=0xbff66434, flags=...) at kernel/qeventloop.cpp:149
#37 0x06642b4a in QEventLoop::exec (this=0xbff66434, flags=...) at kernel/qeventloop.cpp:201
#38 0x06646807 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1003
#39 0x06ea3828 in QApplication::exec () at kernel/qapplication.cpp:3585
#40 0x002b616b in kdemain (argc=1, argv=0xbff66704) at /usr/src/debug/kdelibs-4.5.2/kded/kded.cpp:894
#41 0x080486bc in main (argc=1, argv=0xbff66704) at /usr/src/debug/kdelibs-4.5.2/i686-redhat-linux-gnu/kded/kded4_dummy.cpp:3

Reported using DrKonqi
Comment 1 Christoph Feck 2010-11-15 15:13:50 UTC
Hm, wait ... this is KIO:Auth, not KAuth.
Comment 2 Christoph Feck 2010-11-15 15:23:52 UTC
bug 251061 looks related.
Comment 3 Christoph Feck 2010-11-19 18:24:14 UTC
*** Bug 257342 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Feck 2010-11-19 18:24:49 UTC
Bug 256712 has valuable information about the cause of this bug.
Comment 5 Christoph Feck 2010-11-19 18:25:32 UTC
Pardon, I mean bug 257342 has valuable information.
Comment 6 Erik Zeek 2010-11-19 21:39:16 UTC
A quick correction on my comments in bug 257342.

The assignment operator shouldn't be the problem.  It's copying a member of the pimpl, not the pointer itself.  Sorry.

The copy constructor shouldn't be the problem either.  It uses the assignment operator to actually perform the copy.
Comment 7 Erik Zeek 2010-11-19 22:15:53 UTC
Not sure if this will help, but here's a run with valgrind.

valgrind --malloc-fill=0xaa --free-fill=0xbb kded4 --dograb --nocrashhandler --nofork
==12002== Memcheck, a memory error detector
==12002== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==12002== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==12002== Command: kded4 --dograb --nocrashhandler --nofork
==12002== 
--12002-- WARNING: Serious error when reading debug info
--12002-- When reading debug info from /usr/lib64/libstreams.so.0.7.2:
--12002-- DWARF line info appears to be corrupt - the section is too small
Fetched layout groups from X server:    layouts: ("us")         variants: ("") 
Fetched keyboard model from X server: "dellsk8135" 
Fetched layout groups from X server:    layouts: ("us")         variants: ("") 
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
Invalid D-BUS member name 'idle-hint' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection
Invalid D-BUS member name 'is-local' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection
Invalid D-BUS member name 'x11-display-device' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection
Invalid D-BUS member name 'x11-display' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection
Invalid D-BUS member name 'display-device' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection
Invalid D-BUS member name 'remote-host-name' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection
Invalid D-BUS member name 'session-type' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection
Invalid D-BUS member name 'unix-user' found in interface 'org.freedesktop.ConsoleKit.Session' while parsing introspection
==12002== Conditional jump or move depends on uninitialised value(s)
==12002==    at 0x3A5DCDE04C: ASN1_STRING_set (in /lib64/libcrypto.so.1.0.0a)
==12002==    by 0x3A5DCCBC0C: ASN1_mbstring_ncopy (in /lib64/libcrypto.so.1.0.0a)
==12002==    by 0x3A5DCCBE03: ASN1_mbstring_copy (in /lib64/libcrypto.so.1.0.0a)
==12002==    by 0x3A5DCCBFB0: ASN1_STRING_to_UTF8 (in /lib64/libcrypto.so.1.0.0a)
==12002==    by 0x3A5DCCE12F: ??? (in /lib64/libcrypto.so.1.0.0a)
==12002==    by 0x3A5DCCE686: ??? (in /lib64/libcrypto.so.1.0.0a)
==12002==    by 0x3A5DCD4C52: ASN1_item_ex_d2i (in /lib64/libcrypto.so.1.0.0a)
==12002==    by 0x3A5DCD5768: ??? (in /lib64/libcrypto.so.1.0.0a)
==12002==    by 0x3A5DCD5A6B: ??? (in /lib64/libcrypto.so.1.0.0a)
==12002==    by 0x3A5DCD5199: ASN1_item_ex_d2i (in /lib64/libcrypto.so.1.0.0a)
==12002==    by 0x3A5DCD5768: ??? (in /lib64/libcrypto.so.1.0.0a)
==12002==    by 0x3A5DCD5A6B: ??? (in /lib64/libcrypto.so.1.0.0a)
==12002== 
==12002== Invalid read of size 4
==12002==    at 0x13F92E83: KPasswdServer::findAuthInfoItem(QString const&, KIO::AuthInfo const&) (kpasswdserver.cpp:746)
==12002==    by 0x13F97453: KPasswdServer::checkAuthInfoAsync(KIO::AuthInfo, long long, long long) (kpasswdserver.cpp:306)
==12002==    by 0x13F99121: KPasswdServerAdaptor::checkAuthInfoAsync(KIO::AuthInfo, long long, long long) (kpasswdserveradaptor.cpp:57)
==12002==    by 0x13F99442: KPasswdServerAdaptor::qt_metacall(QMetaObject::Call, int, void**) (kpasswdserveradaptor.moc:151)
==12002==    by 0x3A69021EB5: QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QList<int> const&, int) (qdbusintegrator.cpp:904)
==12002==    by 0x3A6902312A: QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (qdbusintegrator.cpp:816)
==12002==    by 0x3A69023B9C: QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (qdbusintegrator.cpp:1364)
==12002==    by 0x3A69023E37: QDBusActivateObjectEvent::placeMetaCall(QObject*) (qdbusintegrator.cpp:1477)
==12002==    by 0x3A60962F30: QObject::event(QEvent*) (qobject.cpp:1248)
==12002==    by 0x3A617AB39B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4306)
==12002==    by 0x3A617B165A: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4189)
==12002==    by 0x394EC1D165: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:310)
==12002==  Address 0x12efee58 is 104 bytes inside a block of size 144 free'd
==12002==    at 0x4A04A84: operator delete(void*) (vg_replace_malloc.c:346)
==12002==    by 0x13F92FB0: KPasswdServer::findAuthInfoItem(QString const&, KIO::AuthInfo const&) (kpasswdserver.cpp:749)
==12002==    by 0x13F97453: KPasswdServer::checkAuthInfoAsync(KIO::AuthInfo, long long, long long) (kpasswdserver.cpp:306)
==12002==    by 0x13F99121: KPasswdServerAdaptor::checkAuthInfoAsync(KIO::AuthInfo, long long, long long) (kpasswdserveradaptor.cpp:57)
==12002==    by 0x13F99442: KPasswdServerAdaptor::qt_metacall(QMetaObject::Call, int, void**) (kpasswdserveradaptor.moc:151)
==12002==    by 0x3A69021EB5: QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QList<int> const&, int) (qdbusintegrator.cpp:904)
==12002==    by 0x3A6902312A: QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (qdbusintegrator.cpp:816)
==12002==    by 0x3A69023B9C: QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (qdbusintegrator.cpp:1364)
==12002==    by 0x3A69023E37: QDBusActivateObjectEvent::placeMetaCall(QObject*) (qdbusintegrator.cpp:1477)
==12002==    by 0x3A60962F30: QObject::event(QEvent*) (qobject.cpp:1248)
==12002==    by 0x3A617AB39B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4306)
==12002==    by 0x3A617B165A: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4189)
==12002== 
==12002== Invalid read of size 8
==12002==    at 0x13F92E9C: KPasswdServer::findAuthInfoItem(QString const&, KIO::AuthInfo const&) (qstring.h:714)
==12002==    by 0x13F97453: KPasswdServer::checkAuthInfoAsync(KIO::AuthInfo, long long, long long) (kpasswdserver.cpp:306)
==12002==    by 0x13F99121: KPasswdServerAdaptor::checkAuthInfoAsync(KIO::AuthInfo, long long, long long) (kpasswdserveradaptor.cpp:57)
==12002==    by 0x13F99442: KPasswdServerAdaptor::qt_metacall(QMetaObject::Call, int, void**) (kpasswdserveradaptor.moc:151)
==12002==    by 0x3A69021EB5: QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QList<int> const&, int) (qdbusintegrator.cpp:904)
==12002==    by 0x3A6902312A: QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (qdbusintegrator.cpp:816)
==12002==    by 0x3A69023B9C: QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (qdbusintegrator.cpp:1364)
==12002==    by 0x3A69023E37: QDBusActivateObjectEvent::placeMetaCall(QObject*) (qdbusintegrator.cpp:1477)
==12002==    by 0x3A60962F30: QObject::event(QEvent*) (qobject.cpp:1248)
==12002==    by 0x3A617AB39B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4306)
==12002==    by 0x3A617B165A: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4189)
==12002==    by 0x394EC1D165: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:310)
==12002==  Address 0x12efee50 is 96 bytes inside a block of size 144 free'd
==12002==    at 0x4A04A84: operator delete(void*) (vg_replace_malloc.c:346)
==12002==    by 0x13F92FB0: KPasswdServer::findAuthInfoItem(QString const&, KIO::AuthInfo const&) (kpasswdserver.cpp:749)
==12002==    by 0x13F97453: KPasswdServer::checkAuthInfoAsync(KIO::AuthInfo, long long, long long) (kpasswdserver.cpp:306)
==12002==    by 0x13F99121: KPasswdServerAdaptor::checkAuthInfoAsync(KIO::AuthInfo, long long, long long) (kpasswdserveradaptor.cpp:57)
==12002==    by 0x13F99442: KPasswdServerAdaptor::qt_metacall(QMetaObject::Call, int, void**) (kpasswdserveradaptor.moc:151)
==12002==    by 0x3A69021EB5: QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QList<int> const&, int) (qdbusintegrator.cpp:904)
==12002==    by 0x3A6902312A: QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (qdbusintegrator.cpp:816)
==12002==    by 0x3A69023B9C: QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (qdbusintegrator.cpp:1364)
==12002==    by 0x3A69023E37: QDBusActivateObjectEvent::placeMetaCall(QObject*) (qdbusintegrator.cpp:1477)
==12002==    by 0x3A60962F30: QObject::event(QEvent*) (qobject.cpp:1248)
==12002==    by 0x3A617AB39B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4306)
==12002==    by 0x3A617B165A: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4189)
==12002== 
==12002== Invalid read of size 4
==12002==    at 0x13F92EA5: KPasswdServer::findAuthInfoItem(QString const&, KIO::AuthInfo const&) (qatomic_x86_64.h:121)
==12002==    by 0x13F97453: KPasswdServer::checkAuthInfoAsync(KIO::AuthInfo, long long, long long) (kpasswdserver.cpp:306)
==12002==    by 0x13F99121: KPasswdServerAdaptor::checkAuthInfoAsync(KIO::AuthInfo, long long, long long) (kpasswdserveradaptor.cpp:57)
==12002==    by 0x13F99442: KPasswdServerAdaptor::qt_metacall(QMetaObject::Call, int, void**) (kpasswdserveradaptor.moc:151)
==12002==    by 0x3A69021EB5: QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QList<int> const&, int) (qdbusintegrator.cpp:904)
==12002==    by 0x3A6902312A: QDBusConnectionPrivate::activateCall(QObject*, int, QDBusMessage const&) (qdbusintegrator.cpp:816)
==12002==    by 0x3A69023B9C: QDBusConnectionPrivate::activateObject(QDBusConnectionPrivate::ObjectTreeNode&, QDBusMessage const&, int) (qdbusintegrator.cpp:1364)
==12002==    by 0x3A69023E37: QDBusActivateObjectEvent::placeMetaCall(QObject*) (qdbusintegrator.cpp:1477)
==12002==    by 0x3A60962F30: QObject::event(QEvent*) (qobject.cpp:1248)
==12002==    by 0x3A617AB39B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4306)
==12002==    by 0x3A617B165A: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:4189)
==12002==    by 0x394EC1D165: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:310)
==12002==  Address 0xbbbbbbbbbbbbbbbb is not stack'd, malloc'd or (recently) free'd
==12002== 
KCrash: Attempting to start /usr/bin/kded4 from kdeinit
sock_file=/home/eczeek/.kde/socket-jorj.sandia.gov/kdeinit4__0
KCrash: Application 'kded4' crashing...
==12002== 
==12002== HEAP SUMMARY:
==12002==     in use at exit: 4,304,991 bytes in 70,224 blocks
==12002==   total heap usage: 687,382 allocs, 617,158 frees, 105,715,258 bytes allocated
==12002== 
==12002== LEAK SUMMARY:
==12002==    definitely lost: 80 bytes in 2 blocks
==12002==    indirectly lost: 84 bytes in 1 blocks
==12002==      possibly lost: 2,503,294 bytes in 38,052 blocks
==12002==    still reachable: 1,801,533 bytes in 32,169 blocks
==12002==         suppressed: 0 bytes in 0 blocks
==12002== Rerun with --leak-check=full to see details of leaked memory
==12002== 
==12002== For counts of detected and suppressed errors, rerun with: -v
==12002== Use --track-origins=yes to see where uninitialised values come from
==12002== ERROR SUMMARY: 163 errors from 4 contexts (suppressed: 9 from 7)
Killed
Comment 8 Christoph Feck 2010-11-21 01:44:20 UTC
*** Bug 242480 has been marked as a duplicate of this bug. ***
Comment 9 Christoph Feck 2010-11-21 02:39:53 UTC
See also bug 192525 and bug 198396. Appearantly, kpasswdserver still has problems with multiple concurrently running password requests.
Comment 10 Christoph Feck 2011-04-24 18:59:26 UTC
*** Bug 271254 has been marked as a duplicate of this bug. ***
Comment 11 Dawit Alemayehu 2011-04-24 19:31:20 UTC
Probably the cause of this crash is the fact that the ExtraField does not provide an implementation of a copy constructor and an assignment operator as required by any class that is stored in a Qt container class.
Comment 12 Dawit Alemayehu 2011-04-24 19:51:35 UTC
Git commit 5bc40921e72dd26e2228145b03591a9feb675666 by Dawit Alemayehu.
Committed on 24/04/2011 at 19:41.
Pushed by adawit into branch 'KDE/4.6'.

Implemented the required copy constructor and assignment operator for ExtraFields since it used
in a Qt container (QMap).

CCBUG: 256712
CCBUG: 198396

M  +22   -8    kio/kio/authinfo.cpp     
M  +3    -2    kio/kio/authinfo.h     

http://commits.kde.org/kdelibs/5bc40921e72dd26e2228145b03591a9feb675666
Comment 13 Dawit Alemayehu 2011-04-24 19:53:02 UTC
Git commit dd869f1ac4ab1734f5f30cdfbb806c855890c042 by Dawit Alemayehu.
Committed on 24/04/2011 at 19:41.
Pushed by adawit into branch 'master'.

Implemented the required copy constructor and assignment operator for ExtraFields since it used
in a Qt container (QMap).

CCBUG: 256712
CCBUG: 198396

  (cherry picked from commit 7e3b712fd7584df70eaa4e247658fd91a1fdf9eb)

M  +22   -8    kio/kio/authinfo.cpp     
M  +3    -2    kio/kio/authinfo.h     

http://commits.kde.org/kdelibs/dd869f1ac4ab1734f5f30cdfbb806c855890c042
Comment 14 Christoph Feck 2011-05-04 16:31:05 UTC
Thanks Dawit for looking at the issue. If you have some time, could you also check the crash at bug 248004? I added a duplicate, and the reporter of that is eager to help getting it fixed, but I have no idea what additional information to request.
Comment 15 Dawit Alemayehu 2011-05-11 05:50:05 UTC
*** Bug 251061 has been marked as a duplicate of this bug. ***
Comment 16 Dawit Alemayehu 2011-05-11 05:50:20 UTC
*** Bug 248004 has been marked as a duplicate of this bug. ***
Comment 17 Andreas Hartmetz 2011-05-11 15:50:43 UTC
I don't see how dd869f1ac4ab1734f5f30cdfbb806c855890c042 changes anything.
The compiler isn't that stupid that it memcpy()s objects unless you copy the member variables by hand in a hand-written copy constructor and assignment operator. You usually only have to write those by hand if some member variables are pointers or references.
Comment 18 Dawit Alemayehu 2011-05-11 17:51:47 UTC
(In reply to comment #17)
> I don't see how dd869f1ac4ab1734f5f30cdfbb806c855890c042 changes anything.
> The compiler isn't that stupid that it memcpy()s objects unless you copy the
> member variables by hand in a hand-written copy constructor and assignment
> operator. You usually only have to write those by hand if some member variables
> are pointers or references.

I know. I was attempting to do a process of elimination just in case. That is why I did not close the bug. By the same token, however unlikely it may be, having blind faith on the compiler is really no different either. Anyhow, I have already identified the real culprit that causes this bug and a fix will be coming forth once I finish testing it.
Comment 19 Andreas Hartmetz 2011-05-11 19:18:51 UTC
Changing things just in case is called shotgun debugging and it's not a good thing to do. The assumption that the compiler is broken (not conforming to the standard - you can read the standard to check!) is usually wrong.
Comment 20 Dawit Alemayehu 2011-05-11 19:52:10 UTC
(In reply to comment #19)
> Changing things just in case is called shotgun debugging and it's not a good
> thing to do. The assumption that the compiler is broken (not conforming to the
> standard - you can read the standard to check!) is usually wrong.

Okay let us drop the useless banter on a bug report, shall we ? The patch did not change anything. You even said it yourself. Explicitly adding a copy ctor and assignment operator in this case does nothing since we do not have any pointers or references ; so at best what I did was a waste of my own time and at worst is a useless fix. The bug report is not closed and the fix is still pending...
Comment 21 Dawit Alemayehu 2011-05-29 22:36:42 UTC
Git commit d529303c797ef702a497baac412953b1dc584218 by Dawit Alemayehu.
Committed on 13/05/2011 at 18:12.
Pushed by adawit into branch 'master'.

When adding a new auth item, remove all matching items instead of just one in
case duplicates exist. If duplicates are allowed to exist, then their removal
in other functions (inside of a for loop) will cause the now infamous
KIO::AuthInfo dtor crash.

CCBUG: 256712

M  +1    -1    kpasswdserver/kpasswdserver.cpp     

http://commits.kde.org/kde-runtime/d529303c797ef702a497baac412953b1dc584218
Comment 22 Christoph Feck 2011-06-16 15:35:03 UTC
*** Bug 275788 has been marked as a duplicate of this bug. ***
Comment 23 Thomas Tanghus 2011-06-17 10:49:12 UTC
Created attachment 61075 [details]
DrKonqui crash info

Happened while saving a ToDo item.
Setup same as in Bug #275788
Comment 24 Rolf Eike Beer 2011-07-16 11:23:06 UTC
Created attachment 61915 [details]
New crash information added by DrKonqi

kded4 ($Id$) on KDE Platform 4.6.4 (4.6.4) using Qt 4.7.3

I clicked around the testcases on http://greenbytes.de/tech/tc/httpauth/ . The crash happened when running the simplebasicrealmsqc test.

-- Backtrace (Reduced):
#11 0x00007f1fa84f6679 in KIO::AuthInfo::~AuthInfo() () from /usr/lib64/libkio.so.5
#12 0x00007f1f89f9be63 in ~AuthInfoContainer (this=<value optimized out>, key=<value optimized out>, info=...) at /usr/src/debug/kdebase-runtime-4.6.4/kpasswdserver/kpasswdserver.h:81
#13 KPasswdServer::findAuthInfoItem (this=<value optimized out>, key=<value optimized out>, info=...) at /usr/src/debug/kdebase-runtime-4.6.4/kpasswdserver/kpasswdserver.cpp:750
#14 0x00007f1f89f9c024 in KPasswdServer::checkAuthInfoAsync (this=0x9a97d0, info=..., windowId=106954904, usertime=<value optimized out>) at /usr/src/debug/kdebase-runtime-4.6.4/kpasswdserver/kpasswdserver.cpp:306
#15 0x00007f1f89fa0af2 in KPasswdServerAdaptor::checkAuthInfoAsync (this=0xa7ca20, info=<value optimized out>, windowId=106954904, usertime=5161326) at /usr/src/debug/kdebase-runtime-4.6.4/build/kpasswdserver/kpasswdserveradaptor.cpp:57
Comment 25 Rolf Eike Beer 2011-07-16 11:23:46 UTC
My crash is from openSUSE RPMs.
Comment 26 Christoph Feck 2011-07-28 12:00:54 UTC
*** Bug 278689 has been marked as a duplicate of this bug. ***
Comment 27 Dawit Alemayehu 2011-07-28 20:57:01 UTC
Git commit 95eb80d76df674e19994197ce0c1c96abbc2c87f by Dawit Alemayehu.
Committed on 28/07/2011 at 22:52.
Pushed by adawit into branch 'master'.

Fix logic error that causes a single authentication item to be potentially
stored multiple times and cause a hard to debug crash.

CCBUG:256712

M  +12   -11   kpasswdserver/kpasswdserver.cpp

http://commits.kde.org/kde-runtime/95eb80d76df674e19994197ce0c1c96abbc2c87f
Comment 28 Toralf Förster 2011-08-09 16:37:41 UTC
I'm just wondering whether this backtrace is useful too :

gdb --core=core /usr/bin/kdeinit4
...
(gdb) bt
#0  0xb7848424 in __kernel_vsyscall ()
#1  0xb60ad872 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0xb60aefe0 in abort () at abort.c:92
#3  0xb6de25dc in qt_message_output (msgType=QtFatalMsg, 
    buf=0x89bfa10 "Fatal Error: Accessed global static 'DataEngineManagerSingleton *privateDataEngineManagerSelf()' after destruction. Defined at /var/tmp/portage/kde-base/kdelibs-4.6.5-r1/work/kdelibs-4.6.5/plasma/data"...)
    at global/qglobal.cpp:2282
#4  0xb6de279b in qt_message (msgType=<value optimized out>, 
    msg=0xb3cd6920 "Fatal Error: Accessed global static '%s *%s()' after destruction. Defined at %s:%d", 
    ap=0xbfd23184 "@\342ͳ#\342ͳ\254\341ͳW") at global/qglobal.cpp:2328
#5  0xb6de28a9 in qFatal (
    msg=0xb3cd6920 "Fatal Error: Accessed global static '%s *%s()' after destruction. Defined at %s:%d")
    at global/qglobal.cpp:2511
#6  0xb3b4a204 in operator-> ()
    at /var/tmp/portage/kde-base/kdelibs-4.6.5-r1/work/kdelibs-4.6.5/plasma/dataenginemanager.cpp:87
#7  Plasma::DataEngineManager::self ()
    at /var/tmp/portage/kde-base/kdelibs-4.6.5-r1/work/kdelibs-4.6.5/plasma/dataenginemanager.cpp:91
#8  0xae86a225 in WeatherEngine::unloadIons (this=0x8ecb448)
    at /var/tmp/portage/kde-base/plasma-workspace-4.6.5/work/plasma-workspace-4.6.5/plasma/generic/dataengines/weather/weatherengine.cpp:165
#9  0xae86a337 in WeatherEngine::~WeatherEngine (this=0x8ecb448, __in_chrg=<value optimized out>)
    at /var/tmp/portage/kde-base/plasma-workspace-4.6.5/work/plasma-workspace-4.6.5/plasma/generic/dataengines/weather/weatherengine.cpp:54
#10 0xb3b49f44 in ~DataEngineManagerPrivate (this=0x89fdef8, __in_chrg=<value optimized out>)
    at /var/tmp/portage/kde-base/kdelibs-4.6.5-r1/work/kdelibs-4.6.5/plasma/dataenginemanager.cpp:62
#11 Plasma::DataEngineManager::~DataEngineManager (this=0x89fdef8, __in_chrg=<value optimized out>)
    at /var/tmp/portage/kde-base/kdelibs-4.6.5-r1/work/kdelibs-4.6.5/plasma/dataenginemanager.cpp:102
#12 0xb3b4a0eb in ~DataEngineManagerSingleton ()
    at /var/tmp/portage/kde-base/kdelibs-4.6.5-r1/work/kdelibs-4.6.5/plasma/dataenginemanager.cpp:82
#13 destroy () at /var/tmp/portage/kde-base/kdelibs-4.6.5-r1/work/kdelibs-4.6.5/plasma/dataenginemanager.cpp:87
---Type <return> to continue, or q <return> to quit---
#14 0xb3af38db in KCleanUpGlobalStatic::~KCleanUpGlobalStatic (this=0xb3d1a1c4, __in_chrg=<value optimized out>)
    at /var/tmp/portage/kde-base/kdelibs-4.6.5-r1/work/kdelibs-4.6.5/kdecore/kernel/kglobal.h:62
#15 0xb60b0841 in __run_exit_handlers (status=1, listp=0xb61db324, run_list_atexit=true) at exit.c:78
#16 0xb60b08b0 in exit (status=1) at exit.c:100
#17 0xb6065879 in ?? () from /usr/lib/libICE.so.6
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
Comment 29 Christoph Feck 2011-08-09 16:55:33 UTC
Toralf, backtrace in comment #28 is completely unrelated, and should probably reported to Plasma developers.
Comment 30 Christoph Feck 2011-08-09 16:56:30 UTC
No, wait ... the backtrace isn't complete, it doesn't show which thread crashed.
Comment 31 Christoph Feck 2011-08-26 10:25:38 UTC
*** Bug 280815 has been marked as a duplicate of this bug. ***
Comment 32 Christoph Feck 2011-08-28 19:34:45 UTC
*** Bug 280842 has been marked as a duplicate of this bug. ***
Comment 33 Dawit Alemayehu 2011-12-12 21:25:33 UTC
Has anyone been able to reproduce this crash recently ? Say in KDE 4.7 or higher ? If not, I am going to resolve it as FIXED.
Comment 34 ancow 2011-12-12 22:16:22 UTC
I've had this a couple of times in 4.7.0 (using KUbuntu), but I've since switched to Debian which is still on 4.6.5, so I can't provide a stack trace or comment on more recent versions.
Comment 35 Thomas Tanghus 2011-12-12 22:57:43 UTC
(In reply to comment #33)
> Has anyone been able to reproduce this crash recently ? Say in KDE 4.7 or
> higher ? If not, I am going to resolve it as FIXED.

I'm at 4.7.3 and it doesn't happen here anymore - knock-on-wood ;-)
Comment 36 Dawit Alemayehu 2012-02-02 04:37:23 UTC
Closing this as FIXED. If anyone of you  can reproduce this crash with KDE 4.8.0, feel free to reopen the ticket.