qtwebkit / qtwebkit

Code in this repository is obsolete. Use this fork: https://github.com/movableink/webkit
478 stars 133 forks source link

ASSERTION FAILED: resource->url() == url.string() in Source/WebCore/loader/cache/CachedResourceLoader.cpp(625) #1006

Open equaeghe opened 4 years ago

equaeghe commented 4 years ago

I got a segfault.

In the logs, I find:

ASSERTION FAILED: resource->url() == url.string()
Source/WebCore/loader/cache/CachedResourceLoader.cpp(625) : WebCore::CachedResourceHandle<WebCore::CachedResource> WebCore::CachedResourceLoader::requestResource(WebCore::CachedResource::Type, WebCore::CachedResourceRequest&)

Backtrace:

#0  0x00007ffa85d3799c in WTFCrash () at /usr/lib64/libQt5WebKit.so.5
#1  0x00007ffa86736865 in  () at /usr/lib64/libQt5WebKit.so.5
#2  0x00007ffa86737f90 in  () at /usr/lib64/libQt5WebKit.so.5
#3  0x00007ffa866c9b51 in  () at /usr/lib64/libQt5WebKit.so.5
#4  0x00007ffa86118ae1 in  () at /usr/lib64/libQt5WebKit.so.5
#5  0x00007ffa86118bb8 in  () at /usr/lib64/libQt5WebKit.so.5
#6  0x00007ffa8628c138 in  () at /usr/lib64/libQt5WebKit.so.5
#7  0x00007ffa8628b74e in  () at /usr/lib64/libQt5WebKit.so.5
#8  0x00007ffa875a134e in  () at /usr/lib64/libQt5WebKit.so.5
#9  0x00007ffa875a6df1 in  () at /usr/lib64/libQt5WebKit.so.5
#10 0x00007ffa86656cf9 in  () at /usr/lib64/libQt5WebKit.so.5
#11 0x00007ffa8665759b in  () at /usr/lib64/libQt5WebKit.so.5
#12 0x00007ffa8665d50e in  () at /usr/lib64/libQt5WebKit.so.5
#13 0x00007ffa86633d52 in  () at /usr/lib64/libQt5WebKit.so.5
#14 0x00007ffa86634195 in  () at /usr/lib64/libQt5WebKit.so.5
#15 0x00007ffa86635def in  () at /usr/lib64/libQt5WebKit.so.5
#16 0x00007ffa86225ef1 in  () at /usr/lib64/libQt5WebKit.so.5
#17 0x00007ffa8668faf8 in WebCore::DocumentLoader::commitData(char const*, unsigned long) () at /usr/lib64/libQt5WebKit.so.5
#18 0x00007ffa8521fd06 in  () at /usr/lib64/libQt5WebKit.so.5
#19 0x00007ffa8668e59e in  () at /usr/lib64/libQt5WebKit.so.5
#20 0x00007ffa8671f085 in  () at /usr/lib64/libQt5WebKit.so.5
#21 0x00007ffa86720765 in  () at /usr/lib64/libQt5WebKit.so.5
#22 0x00007ffa866fd99c in  () at /usr/lib64/libQt5WebKit.so.5
#23 0x00007ffa866fdca5 in  () at /usr/lib64/libQt5WebKit.so.5
#24 0x00007ffa866f313a in  () at /usr/lib64/libQt5WebKit.so.5
#25 0x00007ffa86a69056 in  () at /usr/lib64/libQt5WebKit.so.5
#26 0x00007ffa86a687c9 in  () at /usr/lib64/libQt5WebKit.so.5
#27 0x00007ffa86a6ad50 in  () at /usr/lib64/libQt5WebKit.so.5
#28 0x00007ffa86a6b1f0 in  () at /usr/lib64/libQt5WebKit.so.5
#29 0x00007ffa84230624 in doActivate<false>(QObject*, int, void**) (sender=0x5600e8e2a860, signal_index=3, argv=0x7ffc390e24b0)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:395
#30 0x00007ffa8422afef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=sender@entry=0x5600e8e2a860, m=m@entry=0x7ffa844c4360 <QIODevice::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/src/corelib/kernel/qobject.cpp:3930
#31 0x00007ffa8414a880 in QIODevice::readyRead() (this=this@entry=0x5600e8e2a860) at .moc/moc_qiodevice.cpp:190
#32 0x00005600e6ed9f24 in Imap::Network::MsgPartNetworkReply::slotMyDataChanged() (this=0x5600e8e2a860)
    at /var/tmp/portage/mail-client/trojita-99999/work/trojita-99999/src/Imap/Network/MsgPartNetworkReply.cpp:111
#33 0x00007ffa842305f2 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffc390e26a0, r=0x5600e8e2a860, this=0x5600e9679550)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#34 doActivate<false>(QObject*, int, void**) (sender=0x5600e97e7e60, signal_index=3, argv=0x7ffc390e26a0)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/src/corelib/kernel/qobject.cpp:3870
#35 0x00007ffa8422afef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=sender@entry=0x5600e97e7e60, m=m@entry=0x7ffa844c6080 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffc390e26a0)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/src/corelib/kernel/qobject.cpp:3930
#36 0x00007ffa841ad67c in QAbstractItemModel::dataChanged(QModelIndex const&, QModelIndex const&, QVector<int> const&) (this=this@entry=0x5600e97e7e60, _t1=..., _t2=..., _t3=...)
    at .moc/moc_qabstractitemmodel.cpp:557
#37 0x00005600e6e69202 in Cryptography::MessageModel::mapDataChanged(QModelIndex const&, QModelIndex const&) (this=0x5600e97e7e60, topLeft=..., bottomRight=...)
    at /usr/include/qt5/QtCore/qabstractitemmodel.h:383
#38 0x00007ffa842305f2 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffc390e2870, r=0x5600e97e7e60, this=0x5600e975a160)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#39 doActivate<false>(QObject*, int, void**) (sender=0x5600e91336a0, signal_index=3, argv=0x7ffc390e2870)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/src/corelib/kernel/qobject.cpp:3870
#40 0x00007ffa8422afef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
    (sender=sender@entry=0x5600e91336a0, m=m@entry=0x7ffa844c6080 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffc390e2870)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/src/corelib/kernel/qobject.cpp:3930
#41 0x00007ffa841ad67c in QAbstractItemModel::dataChanged(QModelIndex const&, QModelIndex const&, QVector<int> const&) (this=this@entry=0x5600e91336a0, _t1=..., _t2=..., _t3=...)
    at .moc/moc_qabstractitemmodel.cpp:557
#42 0x00005600e6f06f31 in Imap::Mailbox::Model::genericHandleFetch(Imap::Mailbox::TreeItemMailbox*, Imap::Responses::Fetch const*) (this=0x5600e91336a0, mailbox=0x5600e96fc070, resp=resp@entry=
    0x5600e9727080) at /usr/include/qt5/QtCore/qarraydata.h:257
#43 0x00005600e6f54224 in Imap::Mailbox::KeepMailboxOpenTask::handleFetch(Imap::Responses::Fetch const*) (this=0x5600e97d9560, resp=0x5600e9727080)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/include/g++-v9/bits/atomic_base.h:413
#44 0x00005600e6f0d404 in Imap::Mailbox::Model::responseReceived(QMap<Imap::Parser*, Imap::Mailbox::ParserState>::iterator) (this=0x5600e91336a0, it=...)
    at /usr/include/qt5/QtCore/qsharedpointer_impl.h:306
#45 0x00007ffa84228d9d in QObject::event(QEvent*) (this=0x5600e91336a0, e=0x5600e975b180)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/src/corelib/kernel/qobject.cpp:1339
#46 0x00007ffa895d4d0f in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x5600e8d56ee0, receiver=receiver@entry=0x5600e91336a0, e=e@entry=0x5600e975b180)
    at /var/tmp/portage/dev-qt/qtwidgets-5.14.2/work/qtbase-everywhere-src-5.14.2/src/widgets/kernel/qapplication.cpp:3685
#47 0x00007ffa895dde60 in QApplication::notify(QObject*, QEvent*) (this=0x7ffc390e3130, receiver=0x5600e91336a0, e=0x5600e975b180)
    at /var/tmp/portage/dev-qt/qtwidgets-5.14.2/work/qtbase-everywhere-src-5.14.2/src/widgets/kernel/qapplication.cpp:3431
#48 0x00007ffa841fd67f in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x5600e91336a0, event=0x5600e975b180)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/src/corelib/kernel/qcoreapplication.cpp:1075
#49 0x00007ffa84200122 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x5600e8d4f080)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/src/corelib/kernel/qcoreapplication.cpp:1815
#50 0x00007ffa84251e83 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x5600e8dc0aa0)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/src/corelib/kernel/qeventdispatcher_glib.cpp:277
#51 0x00007ffa8244ac3d in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#52 0x00007ffa8244aeb8 in  () at /usr/lib64/libglib-2.0.so.0
#53 0x00007ffa8244af4f in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#54 0x00007ffa84251c30 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5600e8dd1d30, flags=...)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/src/corelib/kernel/qeventdispatcher_glib.cpp:423
#55 0x00007ffa841fc52b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffc390e2fc0, flags=..., flags@entry=...)
    at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/include/QtCore/../../src/corelib/global/qflags.h:136
#56 0x00007ffa84204352 in QCoreApplication::exec() () at /var/tmp/portage/dev-qt/qtcore-5.14.2/work/qtbase-everywhere-src-5.14.2/include/QtCore/../../src/corelib/global/qflags.h:118
#57 0x00005600e6dab351 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/mail-client/trojita-99999/work/trojita-99999/src/Gui/main.cpp:205
annulen commented 4 years ago

If you are getting this error, this means it's debug build. Seems like -DCMAKE_BUILD_TYPE=Release was removed from ebuild, which is causing this.

equaeghe commented 4 years ago

If you are getting this error, this means it's debug build. Seems like -DCMAKE_BUILD_TYPE=Release was removed from ebuild, which is causing this.

OK, so the ebuild should be modified to make sure it's a Release build. Won't the difference triggering the assert cause trouble even without the assert being there?

annulen commented 4 years ago

Most likely it will work fine. You can check it easily - just copy ebuild in local overlay, fix it, and try reproducing your case once again

annulen commented 4 years ago

It could shed some light if you somehow got those urls printed by running trojita with QT_WEBKIT_LOG=ResourceLoading environment variable (before rebuilding)

equaeghe commented 4 years ago

It could shed some light if you somehow got those urls printed by running trojita with QT_WEBKIT_LOG=ResourceLoading environment variable (before rebuilding)

UNIMPLEMENTED:
/var/tmp/portage/dev-qt/qtwebkit-5.212.0_pre20200309-r1/work/qtwebkit-5.212.0-alpha4/Source/WebCore/html/parser/HTMLTreeBuilder.cpp(2626) : void WebCore::HTMLTreeBuilder::defaultForInitial()
UNIMPLEMENTED: 
/var/tmp/portage/dev-qt/qtwebkit-5.212.0_pre20200309-r1/work/qtwebkit-5.212.0-alpha4/Source/WebCore/html/parser/HTMLTreeBuilder.cpp(2556) : void WebCore::HTMLTreeBuilder::processEndOfFile(WebCore::AtomicHTMLToken&)
codecForName: Unable to find codec for charset "unknown-8bit"
CachedResourceLoader::requestResource 'trojita-imap://msg/0', charset '', priority=-1, forPreload=0
Loading CachedResource for 'trojita-imap://msg/0'.
MemoryCache::add Added 'trojita-imap://msg/0', resource 0x7f0a365ea000
WebResourceLoadScheduler::load resource 0x7f0a36d8b000 'trojita-imap://msg/0'
WebResourceLoadScheduler::servePendingRequests HostInformation.m_name=''
HostInformation '' loading 'trojita-imap://msg/0'. Current count 0
WebResourceLoadScheduler::scheduleServePendingRequests, m_requestTimer.isActive()=0
WebResourceLoadScheduler::requestTimerFired
WebResourceLoadScheduler::servePendingRequests. m_suspendPendingRequestsCount=0
WebResourceLoadScheduler::servePendingRequests HostInformation.m_name=''
WebResourceLoadScheduler::scheduleServePendingRequests, m_requestTimer.isActive()=0
WebResourceLoadScheduler::scheduleServePendingRequests, m_requestTimer.isActive()=1
CachedResourceLoader::requestResource 'https://ci4.googleusercontent.com/proxy/rjMJTls_lh9DBh3RPlPmQo8jo31txV1MsG-GxyEWbu4AyUqWzClw3OLHaTQM4cafQKljAFnWOJMYPwyXS5U94VUYQ-DT_npdwJwe__BIcv6ezaWxts60urprYc2ESKx9qg=s0-d-e1-ft#https://s3.eu-central-1.amazonaws.com/buybayemailsig/buybay+signature+logo.png', charset '', priority=-1, forPreload=0
Loading CachedResource for 'https://ci4.googleusercontent.com/proxy/rjMJTls_lh9DBh3RPlPmQo8jo31txV1MsG-GxyEWbu4AyUqWzClw3OLHaTQM4cafQKljAFnWOJMYPwyXS5U94VUYQ-DT_npdwJwe__BIcv6ezaWxts60urprYc2ESKx9qg=s0-d-e1-ft#https://s3.eu-central-1.amazonaws.com/buybayemailsig/buybay+signature+logo.png'.
MemoryCache::add Added 'https://ci4.googleusercontent.com/proxy/rjMJTls_lh9DBh3RPlPmQo8jo31txV1MsG-GxyEWbu4AyUqWzClw3OLHaTQM4cafQKljAFnWOJMYPwyXS5U94VUYQ-DT_npdwJwe__BIcv6ezaWxts60urprYc2ESKx9qg=s0-d-e1-ft#https://s3.eu-central-1.amazonaws.com/buybayemailsig/buybay+signature+logo.png', resource 0x7f0a359ef000
WebResourceLoadScheduler::load resource 0x7f0a36d8b500 'https://ci4.googleusercontent.com/proxy/rjMJTls_lh9DBh3RPlPmQo8jo31txV1MsG-GxyEWbu4AyUqWzClw3OLHaTQM4cafQKljAFnWOJMYPwyXS5U94VUYQ-DT_npdwJwe__BIcv6ezaWxts60urprYc2ESKx9qg=s0-d-e1-ft#https://s3.eu-central-1.amazonaws.com/buybayemailsig/buybay+signature+logo.png'
WebResourceLoadScheduler::servePendingRequests HostInformation.m_name='ci4.googleusercontent.com'
HostInformation 'ci4.googleusercontent.com' loading 'https://ci4.googleusercontent.com/proxy/rjMJTls_lh9DBh3RPlPmQo8jo31txV1MsG-GxyEWbu4AyUqWzClw3OLHaTQM4cafQKljAFnWOJMYPwyXS5U94VUYQ-DT_npdwJwe__BIcv6ezaWxts60urprYc2ESKx9qg=s0-d-e1-ft#https://s3.eu-central-1.amazonaws.com/buybayemailsig/buybay+signature+logo.png'. Current count 0
ASSERTION FAILED: resource->url() == url.string()
/var/tmp/portage/dev-qt/qtwebkit-5.212.0_pre20200309-r1/work/qtwebkit-5.212.0-alpha4/Source/WebCore/loader/cache/CachedResourceLoader.cpp(625) : WebCore::CachedResourceHandle<WebCore::CachedResource> WebCore::CachedResourceLoader::requestResource(WebCore::CachedResource::Type, WebCore::CachedResourceRequest&)
1   0x7f0a47cf1997 /usr/lib64/libQt5WebKit.so.5(WTFCrash+0x17) [0x7f0a47cf1997]
2   0x7f0a486f0865 /usr/lib64/libQt5WebKit.so.5(+0x1aea865) [0x7f0a486f0865]
3   0x7f0a486f1f90 /usr/lib64/libQt5WebKit.so.5(+0x1aebf90) [0x7f0a486f1f90]
4   0x7f0a48683b51 /usr/lib64/libQt5WebKit.so.5(+0x1a7db51) [0x7f0a48683b51]
5   0x7f0a480d2ae1 /usr/lib64/libQt5WebKit.so.5(+0x14ccae1) [0x7f0a480d2ae1]
6   0x7f0a480d2bb8 /usr/lib64/libQt5WebKit.so.5(+0x14ccbb8) [0x7f0a480d2bb8]
7   0x7f0a48246138 /usr/lib64/libQt5WebKit.so.5(+0x1640138) [0x7f0a48246138]
8   0x7f0a4824574e /usr/lib64/libQt5WebKit.so.5(+0x163f74e) [0x7f0a4824574e]
9   0x7f0a4955b34e /usr/lib64/libQt5WebKit.so.5(+0x295534e) [0x7f0a4955b34e]
10  0x7f0a49560df1 /usr/lib64/libQt5WebKit.so.5(+0x295adf1) [0x7f0a49560df1]
11  0x7f0a48610cf9 /usr/lib64/libQt5WebKit.so.5(+0x1a0acf9) [0x7f0a48610cf9]
12  0x7f0a4861159b /usr/lib64/libQt5WebKit.so.5(+0x1a0b59b) [0x7f0a4861159b]
13  0x7f0a4861750e /usr/lib64/libQt5WebKit.so.5(+0x1a1150e) [0x7f0a4861750e]
14  0x7f0a485edd52 /usr/lib64/libQt5WebKit.so.5(+0x19e7d52) [0x7f0a485edd52]
15  0x7f0a485ee195 /usr/lib64/libQt5WebKit.so.5(+0x19e8195) [0x7f0a485ee195]
16  0x7f0a485efdef /usr/lib64/libQt5WebKit.so.5(+0x19e9def) [0x7f0a485efdef]
17  0x7f0a481dfef1 /usr/lib64/libQt5WebKit.so.5(+0x15d9ef1) [0x7f0a481dfef1]
18  0x7f0a48649af8 /usr/lib64/libQt5WebKit.so.5(_ZN7WebCore14DocumentLoader10commitDataEPKcm+0x58) [0x7f0a48649af8]
19  0x7f0a471d9d06 /usr/lib64/libQt5WebKit.so.5(+0x5d3d06) [0x7f0a471d9d06]
20  0x7f0a4864859e /usr/lib64/libQt5WebKit.so.5(+0x1a4259e) [0x7f0a4864859e]
21  0x7f0a486d9085 /usr/lib64/libQt5WebKit.so.5(+0x1ad3085) [0x7f0a486d9085]
22  0x7f0a486da765 /usr/lib64/libQt5WebKit.so.5(+0x1ad4765) [0x7f0a486da765]
23  0x7f0a486b799c /usr/lib64/libQt5WebKit.so.5(+0x1ab199c) [0x7f0a486b799c]
24  0x7f0a486b7ca5 /usr/lib64/libQt5WebKit.so.5(+0x1ab1ca5) [0x7f0a486b7ca5]
25  0x7f0a486ad13a /usr/lib64/libQt5WebKit.so.5(+0x1aa713a) [0x7f0a486ad13a]
26  0x7f0a48a23056 /usr/lib64/libQt5WebKit.so.5(+0x1e1d056) [0x7f0a48a23056]
27  0x7f0a48a227c9 /usr/lib64/libQt5WebKit.so.5(+0x1e1c7c9) [0x7f0a48a227c9]
28  0x7f0a48a24d50 /usr/lib64/libQt5WebKit.so.5(+0x1e1ed50) [0x7f0a48a24d50]
29  0x7f0a48a251f0 /usr/lib64/libQt5WebKit.so.5(+0x1e1f1f0) [0x7f0a48a251f0]
30  0x7f0a461ea624 /usr/lib64/libQt5Core.so.5(+0x2a7624) [0x7f0a461ea624]
31  0x55954b732f24 trojita(+0x1c5f24) [0x55954b732f24]
fish: “env QT_WEBKIT_LOG=ResourceLoadi…” terminated by signal SIGSEGV (Address boundary error)