| Summary: | crash in HTTP | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Aleix Pol <aleixpol> |
| Component: | general | Assignee: | David Faure <faure> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | christophe, kdelibs-bugs-null, nate, simonandric5 |
| Priority: | NOR | ||
| Version First Reported In: | 5.39.0 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/kio/ca2364d9c2032e9e08e5c733b45efb97bd37f0ad | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
Aleix Pol
2017-10-30 15:39:06 UTC
Git commit c3ec3e9609f08a5a69c4d2af950d3c5bffe6ef63 by David Faure. Committed on 08/11/2017 at 13:55. Pushed by dfaure into branch 'master'. Oops, didn't intend to commit this M +0 -1 src/ioslaves/http/http.cpp https://commits.kde.org/kio/c3ec3e9609f08a5a69c4d2af950d3c5bffe6ef63 Wrong bug number? Above commit does not look like a crash fix. This didn't fix the crash. Can you maybe test on your side? $ KDE_FORK_SLAVES=yes kioclient5 cat https://odrs.gnome.org/1.0/reviews/api/ratings > /dev/null trying to load "/home/apol/devel/kde5/lib64/plugins/kf5/kio/http.so" from "/home/apol/devel/kde5/lib64/plugins/kf5/kio/http.so" QIODevice::skip (QBuffer): WriteOnly device ASSERT: "ret.size() == BinaryCacheFileHeader::size + sizeof(quint32) + s_hashedUrlNibbles" in file /home/apol/devel/frameworks/kio/src/ioslaves/http/http.cpp, line 4919 kioslave: ####### CRASH ###### protocol = https pid = 26797 signal = 6 /home/apol/devel/kde5/lib64/libKF5KIOCore.so.5(+0xa30cf)[0x7fadd36a90cf] /usr/lib/libc.so.6(+0x34920)[0x7fadd1c60920] /usr/lib/libc.so.6(gsignal+0x110)[0x7fadd1c608a0] /usr/lib/libc.so.6(abort+0x1c9)[0x7fadd1c61f09] /home/apol/devel/kde5/lib/libQt5Core.so.5(+0x9bad7)[0x7fadd2968ad7] /home/apol/devel/kde5/lib/libQt5Core.so.5(+0x96866)[0x7fadd2963866] /home/apol/devel/kde5/lib64/plugins/kf5/kio/http.so(+0x3893a)[0x7fadca36e93a] /home/apol/devel/kde5/lib64/plugins/kf5/kio/http.so(+0x1c00e)[0x7fadca35200e] /home/apol/devel/kde5/lib64/plugins/kf5/kio/http.so(+0x141c2)[0x7fadca34a1c2] /home/apol/devel/kde5/lib64/plugins/kf5/kio/http.so(+0x12cde)[0x7fadca348cde] /home/apol/devel/kde5/lib64/plugins/kf5/kio/http.so(+0x23388)[0x7fadca359388] /home/apol/devel/kde5/lib64/libKF5KIOCore.so.5(_ZN3KIO9SlaveBase8dispatchEiRK10QByteArray+0x49d)[0x7fadd36addcd] /home/apol/devel/kde5/lib64/libKF5KIOCore.so.5(_ZN3KIO9SlaveBase12dispatchLoopEv+0x2f5)[0x7fadd36a9675] /home/apol/devel/kde5/lib64/plugins/kf5/kio/http.so(kdemain+0x19e)[0x7fadca345afe] /home/apol/devel/kde5/lib64/libexec/kf5/kioslave(+0x17c8)[0x55d077d3a7c8] /usr/lib/libc.so.6(__libc_start_main+0xea)[0x7fadd1c4cf6a] /home/apol/devel/kde5/lib64/libexec/kf5/kioslave(_start+0x2a)[0x55d077d3a2ea] "The process for the https://odrs.gnome.org protocol died unexpectedly. Works here, could it be that you have a corrupted cache? Try moving away ~/.cache/kio_http ? Aleix, did comment #4 help to resolve the issue? No, I'm still seeing a crash. I took a while because I wanted to do a clean build of my Qt+KF5, still the same issue. Here's the actual backtrace I'm getting: #0 0x00007ffff6050860 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff6051ec9 in abort () from /usr/lib/libc.so.6 #2 0x00007ffff6d5a007 in qt_message_fatal (context=..., message=<synthetic pointer>...) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/global/qlogging.cpp:1710 #3 QMessageLogger::fatal (this=this@entry=0x7fffffffd1e0, msg=msg@entry=0x7ffff7018938 "ASSERT: \"%s\" in file %s, line %d") at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/global/qlogging.cpp:816 #4 0x00007ffff6d54d96 in qt_assert (assertion=<optimized out>, file=<optimized out>, line=<optimized out>) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/global/qglobal.cpp:3123 #5 0x00007fffee69293a in makeCacheCleanerCommand (cacheTag=..., cmd=CreateFileNotificationCommand) at /home/apol/devel/frameworks/kio/src/ioslaves/http/http.cpp:4919 #6 0x00007fffee67600e in HTTPProtocol::cacheFileClose (this=0x7fffffffdcd0) at /home/apol/devel/frameworks/kio/src/ioslaves/http/http.cpp:4946 #7 0x00007fffee66e1c2 in HTTPProtocol::readBody (this=0x7fffffffdcd0, dataInternal=false) at /home/apol/devel/frameworks/kio/src/ioslaves/http/http.cpp:4514 #8 0x00007fffee66ccde in HTTPProtocol::proceedUntilResponseContent (this=0x7fffffffdcd0, dataInternal=false) at /home/apol/devel/frameworks/kio/src/ioslaves/http/http.cpp:621 #9 0x00007fffee67d388 in HTTPProtocol::get (this=0x7fffffffdcd0, url=...) at /home/apol/devel/frameworks/kio/src/ioslaves/http/http.cpp:1282 #10 0x00007ffff7aa149d in KIO::SlaveBase::dispatch (this=0x7fffffffdce0, command=67, data=...) at /home/apol/devel/frameworks/kio/src/core/slavebase.cpp:1127 #11 0x00007ffff7a9cd45 in KIO::SlaveBase::dispatchLoop (this=0x7fffffffdce0) at /home/apol/devel/frameworks/kio/src/core/slavebase.cpp:301 #12 0x00007fffee669afe in kdemain (argc=4, argv=0x7fffffffe160) at /home/apol/devel/frameworks/kio/src/ioslaves/http/http.cpp:119 #13 0x00005555555557c8 in main (argc=5, argv=0x7fffffffe158) at /home/apol/devel/frameworks/kio/src/kioslave/kioslave.cpp:130 *** Bug 386420 has been marked as a duplicate of this bug. *** pasting what I wrote in the other report :
kio's output:
tHost: Hostname is now: "planetkde.org" ( "planetkde.org" )
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::get: QUrl("http://planetkde.org/rss20.xml")
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::maybeSetRequestUrl: QUrl("http://planetkde.org/rss20.xml")
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::resetSessionSettings: Window Id = ""
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::resetSessionSettings: ssl_was_in_use = ""
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::proceedUntilResponseContent:
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::proceedUntilResponseHeader:
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::sendQuery:
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::httpShouldCloseConnection:
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::httpOpenConnection:
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::httpOpenConnection: Proxy URLs: ()
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::httpOpenConnection: TCP_NODELAY: QVariant(int, 0)
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::satisfyRequestFromCache:
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::cacheFileOpenRead:
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::cacheFileClose:
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::sendQuery: ============ Sending Header:
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::sendQuery: "GET /rss20.xml HTTP/1.1"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::sendQuery: "Host: planetkde.org"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::sendQuery: "Connection: keep-alive"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::sendQuery: "User-Agent: Akregator/5.6.80; syndication"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::sendQuery: "Accept: text/html, text/*;q=0.9, image/jpeg;q=0.9, image/png;q=0.9, image/*;q=0.9, */*;q=0.8"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::sendQuery: "Accept-Encoding: gzip, deflate, x-gzip, x-deflate"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::sendQuery: "Accept-Charset: utf-8,*;q=0.5"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::sendQuery: "Accept-Language: en-US,en;q=0.9"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::sendQuery: sent it!
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readResponseHeader:
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readResponseHeader: ============ Received Status Response:
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readResponseHeader: "HTTP/1.1 200 OK"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: isPotentialSpoofingAttack: QUrl("http://planetkde.org/rss20.xml") response code: 200 previous response code: 0
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readResponseHeader: wasAuthError= false isAuthError= false sameAuthError= false
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readResponseHeader: -- full response:
"HTTP/1.1 200 OK\r\nDate: Sun, 05 Nov 2017 14:06:32 GMT\r\nServer: Apache/2.4.7 (Ubuntu)\r\nStrict-Transport-Security: max-age=15768000\r\nLast-Modified: Sun, 05 Nov 2017 13:37:38 GMT\r\nAccept-Ranges: bytes\r\nVary: Accept-Encoding\r\nContent-Encoding: gzip\r\nCache-Control: max-age=86400\r\nExpires: Mon, 06 Nov 2017 14:06:32 GMT\r\nContent-Length: 34792\r\nKeep-Alive: timeout=5, max=100\r\nConnection: Keep-Alive\r\nContent-Type: application/xml"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readResponseHeader: Content-type: "application/xml"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::fixupResponseMimetype: before fixup "application/xml"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::fixupResponseMimetype: after fixup "application/xml"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::cacheParseResponseHeader: parsed expire date from 'expires' header: "Mon, 06 Nov 2017 14:06:32 GMT"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::cacheParseResponseHeader: Cache needs validation
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::cacheParseResponseHeader: Cache, adding QUrl("http://planetkde.org/rss20.xml")
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::cacheFileOpenWrite:
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readResponseHeader: Emitting mimetype "application/xml"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::proceedUntilResponseHeader: Previous Response: 0
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::proceedUntilResponseHeader: Current Response: 200
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: "34792" bytes left.
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1021 m_iSize: 34792 Chunked: false BytesLeft: 33771
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 2896 m_iSize: 34792 Chunked: false BytesLeft: 30875
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 29427
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 27979
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 26531
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 25083
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 23635
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 22187
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 20739
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 19291
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 17843
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 16395
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 14947
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 13499
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 12051
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 10603
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 9155
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 7707
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 6259
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 4811
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 3363
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 1915
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 1448 m_iSize: 34792 Chunked: false BytesLeft: 467
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: bytesReceived: 467 m_iSize: 34792 Chunked: false BytesLeft: 0
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::readBody: EOD received! Left = "0"
15:06:32 - kio_http(20804) - kf5.kio.kio_http: HTTPProtocol::cacheFileClose:
15:06:32 - kio_http(20804) - : QIODevice::skip (QBuffer): WriteOnly device
15:06:32 - kio_http(20804) - : ASSERT: "ret.size() == BinaryCacheFileHeader::size + sizeof(quint32) + s_hashedUrlNibbles" in file /kde/src/5/frameworks/kio/src/ioslaves/http/http.cpp, line 4920
kdeinit5: PID 20804 terminated.
15:06:32 - klauncher(20540) - kf5.kinit.klauncher: KLauncher::processDied: 20804 exitStatus= 134
15:06:32 - klauncher(20540) - kf5.kinit.klauncher: KLauncher::processDied: found no pending requests for PID 20804
As a temporary workaround for !release builds, I commented out 5 Q_ASSERT, lines 4988 and 4919 in http.cpp and lines 290, 301 and 320 in http_cache_cleaner.cpp. no issue since then https://phabricator.kde.org/D9399 < this fixes the issue for me Testing Git commit ca2364d9c2032e9e08e5c733b45efb97bd37f0ad by Aleix Pol. Committed on 19/12/2017 at 22:44. Pushed by apol into branch 'master'. Fix crash, presumably since Qt 5.10? Summary: We are opening the stream as read only and skipRawData would complain that it's a write-only device, and skipping needs reading: QIODevice::skip (QBuffer): WriteOnly device It was a weird optimization anyway, so just pass the information like the rest of the data and it works just fine. Test Plan: The check on the bug report passes now, and akregator fetches all feeds again. Reviewers: #frameworks, dfaure Reviewed By: dfaure Subscribers: anthonyfieroni, ngraham Tags: #frameworks Differential Revision: https://phabricator.kde.org/D9399 M +1 -1 src/ioslaves/http/http.cpp https://commits.kde.org/kio/ca2364d9c2032e9e08e5c733b45efb97bd37f0ad |