Bug 369569

Summary: Crash in KIO::AccessManager when request from libkgapi is made
Product: [Frameworks and Libraries] frameworks-kio Reporter: Bhushan Shah <bhush94>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kdelibs-bugs
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Bhushan Shah 2016-09-30 11:42:32 UTC
Libkgapi uses KIO::AcessManager for KDE Proxy integration, and Plasma
mobile uses the kaccounts module, which is loaded in kaccounts kded
module to import contacts using libkgapi.

This however crashes the kded on the mobile when relavant code path is
triggered. See backtrace attached. If I change libkgapi to use
QNetworkAccessManager, things works completely fine. Also, even if
libkgapi is using KIO::AccessManager and I use example code from
libkgapi which is "similar" to be used by kaccount module, it doesn't
crash, so I am not sure if is bug in libkgapi, kio, or kded? or even qt?

#0  0xac72042a in asn1_string_canon (in=<optimized out>, out=0x26f3f8) at x_name.c:477
#1  x509_name_canon (a=0x26f3a8) at x_name.c:372
#2  0xac720750 in x509_name_ex_d2i (val=0x22800c, in=0xbeffe1e4, len=<optimized out>, it=<optimized out>, tag=-1, aclass=0, 
    opt=0 '\000', ctx=0xbeffe434) at x_name.c:226
#3  0xac724ea6 in ASN1_item_ex_d2i (pval=<optimized out>, in=in@entry=0xbeffe1e4, len=842, it=0xac79f334 <X509_NAME_it>, 
    tag=tag@entry=-1, aclass=0, opt=opt@entry=0 '\000', ctx=ctx@entry=0xbeffe434) at tasn_dec.c:244
#4  0xac7254a4 in asn1_template_noexp_d2i (val=0x22800c, in=0xbeffe2b4, len=842, tt=0xac79f418 <X509_CINF_seq_tt+60>, 
    opt=opt@entry=0 '\000', ctx=ctx@entry=0xbeffe434) at tasn_dec.c:694
#5  0xac72564c in asn1_template_ex_d2i (val=val@entry=0x22800c, in=in@entry=0xbeffe2b4, inlen=<optimized out>, 
    tt=tt@entry=0xac79f418 <X509_CINF_seq_tt+60>, opt=0 '\000', ctx=ctx@entry=0xbeffe434) at tasn_dec.c:582
#6  0xac724fb8 in ASN1_item_ex_d2i (pval=0x251f30, in=in@entry=0xbeffe31c, len=842, it=0xac79c664 <X509_CINF_it>, tag=16, 
    tag@entry=-1, aclass=<optimized out>, opt=opt@entry=0 '\000', ctx=ctx@entry=0xbeffe434) at tasn_dec.c:445
#7  0xac7254a4 in asn1_template_noexp_d2i (val=0x251f30, in=0xbeffe3ec, len=1152, tt=0xac79f3a0 <X509_seq_tt>, opt=opt@entry=0 '\000', 
    ctx=ctx@entry=0xbeffe434) at tasn_dec.c:694
#8  0xac72564c in asn1_template_ex_d2i (val=val@entry=0x251f30, in=in@entry=0xbeffe3ec, inlen=<optimized out>, 
    tt=tt@entry=0xac79f3a0 <X509_seq_tt>, opt=0 '\000', ctx=ctx@entry=0xbeffe434) at tasn_dec.c:582
#9  0xac724fb8 in ASN1_item_ex_d2i (pval=pval@entry=0xbeffe430, in=0xbeffe47c, len=1152, it=0xac79c630 <X509_it>, tag=16, 
    tag@entry=-1, aclass=<optimized out>, aclass@entry=0, opt=opt@entry=0 '\000', ctx=ctx@entry=0xbeffe434) at tasn_dec.c:445
#10 0xac7252fa in ASN1_item_d2i (pval=0xbeffe430, in=<optimized out>, len=<optimized out>, it=<optimized out>) at tasn_dec.c:146
#11 0xb3358172 in QSslCertificatePrivate::certificatesFromPem (pem=..., count=count@entry=-1) at ssl/qsslcertificate_openssl.cpp:677
#12 0xb334500e in QSslCertificate::fromData (data=..., format=format@entry=QSsl::Pem) at ssl/qsslcertificate.cpp:556
#13 0xb3107f22 in KIO::Integration::sslConfigFromMetaData (metadata=..., sslconfig=...)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/src/widgets/accessmanager.cpp:493
#14 0xb310e076 in KDEPrivate::AccessManagerReply::setHeaderFromMetaData (this=this@entry=0x241028, _metaData=...)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/src/widgets/accessmanagerreply_p.cpp:182
#15 0xb310ffaa in KDEPrivate::AccessManagerReply::setHeaderFromMetaData (_metaData=..., this=0x241028)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/src/widgets/accessmanagerreply_p.cpp:304
#16 KDEPrivate::AccessManagerReply::readHttpResponseHeaders (this=this@entry=0x241028, job=job@entry=0x232868)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/src/widgets/accessmanagerreply_p.cpp:314
#17 0xb311009c in KDEPrivate::AccessManagerReply::slotMimeType (this=0x241028, kioJob=0x232868, mimeType=...)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/src/widgets/accessmanagerreply_p.cpp:407
#18 0xb645075c in QMetaObject::activate (sender=sender@entry=0x232868, signalOffset=<optimized out>, 
    local_signal_index=local_signal_index@entry=4, argv=argv@entry=0xbeffe6f8) at kernel/qobject.cpp:3740
#19 0xb6450c26 in QMetaObject::activate (sender=sender@entry=0x232868, m=<optimized out>, 
    local_signal_index=local_signal_index@entry=4, argv=argv@entry=0xbeffe6f8) at kernel/qobject.cpp:3602
#20 0xb2f99fc8 in KIO::TransferJob::mimetype (this=this@entry=0x232868, _t1=_t1@entry=0x232868, _t2=...)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/obj-arm-linux-gnueabihf/src/core/moc_transferjob.cpp:338
#21 0xb2f9a096 in KIO::TransferJob::slotMimetype (this=0x232868, type=...)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/src/core/transferjob.cpp:265
#22 0xb2f9b204 in KIO::TransferJob::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=0xbeffe84c)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/obj-arm-linux-gnueabihf/src/core/moc_transferjob.cpp:158
#23 0xb645075c in QMetaObject::activate (sender=sender@entry=0x24ad18, signalOffset=<optimized out>, 
    local_signal_index=local_signal_index@entry=19, argv=argv@entry=0xbeffe84c) at kernel/qobject.cpp:3740
#24 0xb6450c26 in QMetaObject::activate (sender=sender@entry=0x24ad18, m=<optimized out>, 
    local_signal_index=local_signal_index@entry=19, argv=argv@entry=0xbeffe84c) at kernel/qobject.cpp:3602
#25 0xb2f74be2 in KIO::SlaveInterface::mimeType (this=this@entry=0x24ad18, _t1=...)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/obj-arm-linux-gnueabihf/src/core/moc_slaveinterface.cpp:526
#26 0xb2f76828 in KIO::SlaveInterface::dispatch (this=0x24ad18, _cmd=21, rawdata=...)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/src/core/slaveinterface.cpp:252
#27 0xb2f74cec in KIO::SlaveInterface::dispatch (this=0x24ad18)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/src/core/slaveinterface.cpp:89
#28 0xb2f77e26 in KIO::Slave::gotInput (this=0x24ad18)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/src/core/slave.cpp:398
#29 0xb2fe0934 in KIO::Slave::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/obj-arm-linux-gnueabihf/src/core/moc_slave.cpp:87
#30 0xb645075c in QMetaObject::activate (sender=0x24bf38, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, 
    argv=argv@entry=0x0) at kernel/qobject.cpp:3740
#31 0xb6450c26 in QMetaObject::activate (sender=<optimized out>, m=<optimized out>, local_signal_index=local_signal_index@entry=0, 
    argv=argv@entry=0x0) at kernel/qobject.cpp:3602
#32 0xb2f2aba6 in KIO::Connection::readyRead (this=<optimized out>)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/obj-arm-linux-gnueabihf/src/core/moc_connection_p.cpp:142
#33 KIO::ConnectionPrivate::dequeue (this=0x24bab8)
    at /var/lib/jenkins-slave/mci/workspace/xenial_unstable_frameworks_kio_bin_armhf/build/src/core/connection.cpp:45
#34 0xb645108c in QObject::event (this=<optimized out>, e=0x251e70) at kernel/qobject.cpp:1263
#35 0xb6baa532 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x24bf38, e=0x251e70)
    at kernel/qapplication.cpp:3799
#36 0xb6bafd64 in QApplication::notify (this=0xbeffef44, receiver=0x24bf38, e=0x251e70) at kernel/qapplication.cpp:3556
#37 0xb6431d6a in QCoreApplication::notifyInternal2 (receiver=0x24bf38, event=event@entry=0x251e70) at kernel/qcoreapplication.cpp:988
#38 0xb64338de in QCoreApplication::sendEvent (event=0x251e70, receiver=<optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#39 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x2e968)
    at kernel/qcoreapplication.cpp:1649
#40 0xb6433ba6 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0)
    at kernel/qcoreapplication.cpp:1503
#41 0xb646e0e4 in postEventSourceDispatch (s=0x7b050) at kernel/qeventdispatcher_glib.cpp:276
#42 0xb5a4e1b4 in g_main_context_dispatch () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
#43 0xb5a4e35a in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Comment 1 Justin Zobel 2022-10-24 00:46:39 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 2 Bug Janitor Service 2022-11-08 05:10:59 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 Bug Janitor Service 2022-11-23 05:17:29 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now 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

Thank you for helping us make KDE software even better for everyone!