Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12285

QNAM::post crash on abort

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.1
    • 4.6.3
    • Network
    • None
    • os x 10.6.
    • 677b96b3bfcbccae978f0d63f7e16a35783c0eec 12f129eb1e1472e5eec561ab780ed709e5b66987

    Description

      Occasionally when a http post request is aborted, it does not seem like qnam cleans up properly.

      Once i return from the slot connected to the finished signal from qnam and where i call reply->deletelater() the thread crashes on what i believe is the qnam attempting to reprocess the same request that was just aborted and also deleted.

      The thread in question uploads a series of files using http multipart/form-data. It does not try to issue a new post request before the previous one has finished, which is why i find it strange that it crashes on q_startNextRequest(). In the finished slot i start a qtimer on 50milliseconds which timeout signal is connected to the slot that issues the new post request. The thread crashes after the timer has been set and before the slot connected to the timeout signal is called.

      The connection uses ssl, but i don't think the crash is related to that.

      Thread x Crashed:
      0   ???                           	0x2e003200 0 + 771764736
      1   QtNetwork                     	0x01142196 QHttpNetworkConnectionPrivate::_q_startNextRequest() + 86
      2   QtNetwork                     	0x01142455 QHttpNetworkConnection::qt_metacall(QMetaObject::Call, int, void**) + 197
      3   QtCore                        	0x0139bf0a QMetaCallEvent::placeMetaCall(QObject*) + 42
      4   QtCore                        	0x0139e264 QObject::event(QEvent*) + 548
      5   QtGui                         	0x005d3fff QApplicationPrivate::notify_helper(QObject*, QEvent*) + 175
      6   QtGui                         	0x005da2b5 QApplication::notify(QObject*, QEvent*) + 1221
      7   QtCore                        	0x012b2bf2 QCoreApplication::notifyInternal(QObject*, QEvent*) + 98
      8   QtCore                        	0x01391b10 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 720
      9   QtCore                        	0x013b5ab8 QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 56
      10  QtCore                        	0x0138f801 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 65
      11  QtCore                        	0x0138fa2d QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 189
      12  QtCore                        	0x012d4a7d QThread::exec() + 93
      
      Thread x Crashed:
      0   QtNetwork                     	0x01144d25 QHttpNetworkConnectionChannel::resetUploadData() + 37
      1   QtNetwork                     	0x01142196 QHttpNetworkConnectionPrivate::_q_startNextRequest() + 86
      2   QtNetwork                     	0x01142455 QHttpNetworkConnection::qt_metacall(QMetaObject::Call, int, void**) + 197
      3   QtCore                        	0x0139bf0a QMetaCallEvent::placeMetaCall(QObject*) + 42
      4   QtCore                        	0x0139e264 QObject::event(QEvent*) + 548
      5   QtGui                         	0x005d3fff QApplicationPrivate::notify_helper(QObject*, QEvent*) + 175
      6   QtGui                         	0x005da2b5 QApplication::notify(QObject*, QEvent*) + 1221
      7   QtCore                        	0x012b2bf2 QCoreApplication::notifyInternal(QObject*, QEvent*) + 98
      8   QtCore                        	0x01391b10 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 720
      9   QtCore                        	0x013b5ab8 QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 56
      10  QtCore                        	0x0138f801 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 65
      11  QtCore                        	0x0138fa2d QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 189
      12  QtCore                        	0x012d4a7d QThread::exec() + 93
      
      Thread x Crashed:
      0   ???                           	0x01487e5d typeinfo for QSignalMapperPrivate + 5
      1   QtNetwork                     	0x0114f196 QHttpNetworkConnectionPrivate::_q_startNextRequest() + 86
      2   QtNetwork                     	0x0114f455 QHttpNetworkConnection::qt_metacall(QMetaObject::Call, int, void**) + 197
      3   QtCore                        	0x013a8f0a QMetaCallEvent::placeMetaCall(QObject*) + 42
      4   QtCore                        	0x013ab264 QObject::event(QEvent*) + 548
      5   QtGui                         	0x005e0fff QApplicationPrivate::notify_helper(QObject*, QEvent*) + 175
      6   QtGui                         	0x005e72b5 QApplication::notify(QObject*, QEvent*) + 1221
      7   QtCore                        	0x012bfbf2 QCoreApplication::notifyInternal(QObject*, QEvent*) + 98
      8   QtCore                        	0x0139eb10 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 720
      9   QtCore                        	0x013c2ab8 QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 56
      10  QtCore                        	0x0139c801 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 65
      11  QtCore                        	0x0139ca2d QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 189
      12  QtCore                        	0x012e1a7d QThread::exec() + 93
      

      Attachments

        1. crashTest.zip
          4 kB
        2. crashTest.zip
          3 kB
        3. crashTest.zip
          13 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mgoetz Markus Goetz (Inactive)
            kimbs Kim Bowles Sørhus
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes