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

Connection closed before finish processing an URL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 4.8.1, 4.8.2
    • Network, Network: Cache
    • None
    • This has happened on both Ubuntu Linux 12.04 and osx 10.7

    Description

      We are developing an application with QT 4.7.4 that is working as expected, but when making the switch to 4.8.1 we are seeing some static content not loading anymore.

      We tough that it was QTBUG-2092427 but using 4.8.2 from git our problem still occurs.

      Notes: We've only seen it on SSL and with content that it is present in the disk cache.

      With the following image, if you reload some times the bug appear

      https://www.itau.cl/personas/images_login/btn-ingresar.jpg

      To test it we are using the Browser app that comes with the 4.7 Demos.

      This is the console output with the network debug macros enabled:

      QNetworkDiskCache::metaData() QUrl( "https://www.itau.cl/personas/images_login/btn-ingresar.jpg" )
      QSslSocket::connectToHostImplementation( "www.itau.cl" , 443 , OpenMode( "ReadOnly|WriteOnly" ) )
      QAbstractSocket::connectToHost("www.itau.cl", 443, 3)...
      QSslSocket::_q_stateChangedSlot( QAbstractSocket::HostLookupState )
      QHostInfo::lookupHost("www.itau.cl", 0x102f773a0, _q_startConnecting(QHostInfo))
      QAbstractSocket::connectToHost("www.itau.cl", 443) == false (connection in progress)
      QHostInfoAgent::fromName(www.itau.cl) looking up...
      getaddrinfo node: flags: 0 family: 2 ai_socktype: 2 ai_protocol: 17 ai_addrlen: 16
      getaddrinfo node: flags: 0 family: 2 ai_socktype: 1 ai_protocol: 6 ai_addrlen: 16
      QHostInfoAgent::fromName(): found 1 entries for "www.itau.cl":

      {200.54.67.180}
      QAbstractSocketPrivate::_q_startConnecting(hostInfo == {200.54.67.180}

      )
      QSslSocket::_q_stateChangedSlot( QAbstractSocket::ConnectingState )
      QSslSocket::_q_hostFoundSlot()
      state = QAbstractSocket::ConnectingState
      QAbstractSocketPrivate::_q_connectToNextAddress(), connecting to 200.54.67.180:443, 1 left to try
      QAbstractSocketPrivate::resetSocketLayer()
      QAbstractSocketPrivate::initSocketLayer(TcpSocket, IPv4Protocol) success
      QNativeSocketEnginePrivate::nativeConnect() : 21
      QNativeSocketEnginePrivate::nativeConnect(200.54.67.180, 443) == false (Connection in progress)
      QNativeSocketEnginePrivate::nativeConnect() : 21
      QNativeSocketEnginePrivate::nativeConnect(200.54.67.180, 443) == true
      QNativeSocketEnginePrivate::fetchConnectionParameters() local == 192.168.1.100:60362, peer == 200.54.67.180:443, socket == TcpSocket - IPv4Protocol
      QAbstractSocketPrivate::connectionNotification() testing connection
      QSslSocket::_q_stateChangedSlot( QAbstractSocket::ConnectedState )
      QSslSocket::_q_connectedSlot()
      state = QAbstractSocket::ConnectedState
      peer = "www.itau.cl" QHostAddress( "200.54.67.180" ) 443
      QHostInfo::fromName("192.168.1.100")
      QHostInfoAgent::fromName(192.168.1.100) looking up...
      local = "192.168.1.100" QHostAddress( "192.168.1.100" ) 60362
      QSslSocket::startClientEncryption()
      QAbstractSocket::writeData(0x10abfc1e0 "\26\3\1\0t\1\0\0p\3\1O\37777777647\37777777745\37777777652\37777777674\37777777716\377777776567\37777777765\377777776542\13\37777777717\37777777634\37777777611\37777777664udq\37777777743\35...", 121) == 121
      QSslSocketBackendPrivate::transmit: wrote 121 encrypted bytes to the socket 121 actual.
      QAbstractSocket::bytesAvailable() == 0
      QSslSocketBackendPrivate::transmit: testing encryption
      QSslSocketBackendPrivate::transmit: encryption not done yet
      QAbstractSocket::bytesAvailable() == 0
      QSslSocketBackendPrivate::transmit: testing encryption
      QSslSocketBackendPrivate::transmit: encryption not done yet
      QAbstractSocketPrivate::fetchConnectionParameters() connection to 200.54.67.180:443 established
      QAbstractSocketPrivate::canWriteNotification() flushing
      QNativeSocketEnginePrivate::nativeWrite(0x10426e218 "\26\3\1\0t\1\0\0p\3\1O\37777777647\37777777745\37777777652\37777777674...", 121) == 121
      QAbstractSocketPrivate::flush() 121 bytes written to the network
      QSslSocket::_q_bytesWrittenSlot( 121 )
      QAbstractSocketPrivate::canReadNotification()
      QNativeSocketEnginePrivate::nativeBytesAvailable() == 1448
      QAbstractSocketPrivate::readFromSocket() about to read 1448 bytes
      QNativeSocketEnginePrivate::nativeRead(0x103118018 "\26\3\1\20\37777777762\2\0\0F\3\1O\37777777647\37777777744c^...", 1448) == 1448
      QAbstractSocketPrivate::readFromSocket() got 1448 bytes, buffer size = 1448
      QAbstractSocket::bytesAvailable() == 1448
      QSslSocket::_q_readyReadSlot() - 1448 bytes available
      QAbstractSocket::bytesAvailable() == 1448
      QAbstractSocket::readData(0x1040e9600 '? (0x16)', 16384) == 1448 [buffer]
      QSslSocketBackendPrivate::transmit: read 1448 encrypted bytes from the socket
      QAbstractSocket::bytesAvailable() == 0
      QSslSocketBackendPrivate::transmit: testing encryption
      QSslSocketBackendPrivate::transmit: encryption not done yet
      QAbstractSocket::bytesAvailable() == 0
      QSslSocketBackendPrivate::transmit: testing encryption
      QSslSocketBackendPrivate::transmit: encryption not done yet
      QAbstractSocketPrivate::canReadNotification()
      QNativeSocketEnginePrivate::nativeBytesAvailable() == 1448
      QAbstractSocketPrivate::readFromSocket() about to read 1448 bytes
      QNativeSocketEnginePrivate::nativeRead(0x103118018 "\37777777763>\37777777707\37777777722d\37777777720\7\37777777723\37777777762\37777777712\37777777633\377777776700Pe\0...", 1448) == 1448
      QAbstractSocketPrivate::readFromSocket() got 1448 bytes, buffer size = 1448
      QAbstractSocket::bytesAvailable() == 1448
      QSslSocket::_q_readyReadSlot() - 1448 bytes available
      QAbstractSocket::bytesAvailable() == 1448
      QAbstractSocket::readData(0x1040e9600 '? (0xfffffff3)', 16384) == 1448 [buffer]
      QSslSocketBackendPrivate::transmit: read 1448 encrypted bytes from the socket
      QAbstractSocket::bytesAvailable() == 0
      QSslSocketBackendPrivate::transmit: testing encryption
      QSslSocketBackendPrivate::transmit: encryption not done yet
      QAbstractSocket::bytesAvailable() == 0
      QSslSocketBackendPrivate::transmit: testing encryption
      QSslSocketBackendPrivate::transmit: encryption not done yet
      QAbstractSocketPrivate::canReadNotification()
      QNativeSocketEnginePrivate::nativeBytesAvailable() == 1447
      QAbstractSocketPrivate::readFromSocket() about to read 1447 bytes
      QNativeSocketEnginePrivate::nativeRead(0x10426e218 "\37777777614b\25E`\27!\37777777742\37777777725B\37777777650w\37777777641U\37777777730C...", 1447) == 1447
      QAbstractSocketPrivate::readFromSocket() got 1447 bytes, buffer size = 1447
      QAbstractSocket::bytesAvailable() == 1447
      QSslSocket::_q_readyReadSlot() - 1447 bytes available
      QAbstractSocket::bytesAvailable() == 1447
      QAbstractSocket::readData(0x1040e9600 '? (0xffffff8c)', 16384) == 1447 [buffer]
      QSslSocketBackendPrivate::transmit: read 1447 encrypted bytes from the socket
      QAbstractSocket::bytesAvailable() == 0
      QSslSocketBackendPrivate::transmit: testing encryption
      QSslSocketBackendPrivate::transmit: encryption not done yet
      QAbstractSocket::writeData(0x10abfc350 "\26\3\1\1\6\20\0\1\2\1\0%\37777777755\37777777752&\13\13O\16\37777777666\37777777722#P\37777777653u\37777777617\37777777751?\22v\37777777775\37777777772...", 310) == 310
      QSslSocketBackendPrivate::transmit: wrote 310 encrypted bytes to the socket 310 actual.
      QAbstractSocket::bytesAvailable() == 0
      QSslSocketBackendPrivate::transmit: testing encryption
      QSslSocketBackendPrivate::transmit: encryption not done yet
      QAbstractSocket::bytesAvailable() == 0
      QSslSocketBackendPrivate::transmit: testing encryption
      QSslSocketBackendPrivate::transmit: encryption not done yet
      QAbstractSocketPrivate::canWriteNotification() flushing
      QNativeSocketEnginePrivate::nativeWrite(0x10426e218 "\26\3\1\1\6\20\0\1\2\1\0%\37777777755\37777777752&\13...", 310) == 310
      QAbstractSocketPrivate::flush() 310 bytes written to the network
      QSslSocket::_q_bytesWrittenSlot( 310 )
      QAbstractSocketPrivate::canReadNotification()
      QNativeSocketEnginePrivate::nativeBytesAvailable() == 43
      QAbstractSocketPrivate::readFromSocket() about to read 43 bytes
      QNativeSocketEnginePrivate::nativeRead(0x10426e218 "\24\3\1\0\1\1\26\3\1\0 \37777777770z=\37777777642\37777777736...", 43) == 43
      QAbstractSocketPrivate::readFromSocket() got 43 bytes, buffer size = 43
      QAbstractSocket::bytesAvailable() == 43
      QSslSocket::_q_readyReadSlot() - 43 bytes available
      QAbstractSocket::bytesAvailable() == 43
      QAbstractSocket::readData(0x1040e9600 '? (0x14)', 16384) == 43 [buffer]
      QSslSocketBackendPrivate::transmit: read 43 encrypted bytes from the socket
      QAbstractSocket::bytesAvailable() == 0
      QSslSocketBackendPrivate::transmit: testing encryption
      QSslSocket::writeData( 0x1040d6a18 , 807 )
      QSslSocketBackendPrivate::transmit: encryption established
      QSslSocketBackendPrivate::transmit: encrypted 807 bytes
      QAbstractSocket::writeData(0x10abfc350 "\27\3\1\37\37777777635\37777777741\37777777704}\37777777617\20\37777777601\25\37777777763\37777777773\37777777752\37777777761\37777777635[I\37777777747\37777777743T\37777777654bw}ch\37777777663\37777777721\37777777701...", 828) == 828
      QSslSocketBackendPrivate::transmit: wrote 828 encrypted bytes to the socket 828 actual.
      QAbstractSocket::bytesAvailable() == 0
      QAbstractSocket::bytesAvailable() == 0
      QAbstractSocketPrivate::canWriteNotification() flushing
      QNativeSocketEnginePrivate::nativeWrite(0x10426e218 "\27\3\1\37\37777777635\37777777741\37777777704}\37777777617\20\37777777601\25\37777777763\37777777773\37777777752...", 828) == 828
      QAbstractSocketPrivate::flush() 828 bytes written to the network
      QSslSocket::_q_bytesWrittenSlot( 828 )
      QAbstractSocketPrivate::canReadNotification()
      QNativeSocketEnginePrivate::nativeBytesAvailable() == 154
      QAbstractSocketPrivate::readFromSocket() about to read 154 bytes
      QNativeSocketEnginePrivate::nativeRead(0x10426e218 "\27\3\1\0\34\2\37777777705Aw\37777777725\37777777757h\37777777607*\4\37777777620...", 154) == 154
      QAbstractSocketPrivate::readFromSocket() got 154 bytes, buffer size = 154
      QAbstractSocket::bytesAvailable() == 154
      QSslSocket::_q_readyReadSlot() - 154 bytes available
      QAbstractSocket::bytesAvailable() == 154
      QAbstractSocket::readData(0x1040e9600 '? (0x17)', 16384) == 154 [buffer]
      QSslSocketBackendPrivate::transmit: read 154 encrypted bytes from the socket
      QAbstractSocket::bytesAvailable() == 0
      QSslSocketBackendPrivate::transmit: decrypted 12 bytes
      QSslSocket::readData( 0x103252200 , 16384 ) == 12
      QAbstractSocket::bytesAvailable() == 0
      QSslSocket::readData( 0x103252200 , 16384 ) == 0
      QAbstractSocket::bytesAvailable() == 0
      QSslSocket::readData( 0x10abfc177 , 1 ) == 0
      QAbstractSocket::bytesAvailable() == 0
      QSslSocket::readData( 0x103252200 , 16384 ) == 0
      QAbstractSocket::bytesAvailable() == 0
      QSslSocket::readData( 0x10abfc177 , 1 ) == 0
      QAbstractSocket::bytesAvailable() == 0
      QSslSocketBackendPrivate::transmit: decrypted 100 bytes
      QSslSocket::readData( 0x103252200 , 16384 ) == 100
      QAbstractSocket::bytesAvailable() == 0
      QSslSocket::close()
      QAbstractSocket::close()
      QAbstractSocket::disconnectFromHost()
      QAbstractSocket::disconnectFromHost() emits stateChanged()(ClosingState)
      QSslSocket::_q_stateChangedSlot( QAbstractSocket::ClosingState )
      QAbstractSocket::disconnectFromHost() disconnecting immediately
      QAbstractSocketPrivate::resetSocketLayer()
      QNativeSocketEngine::nativeClose()
      QSslSocket::_q_stateChangedSlot( QAbstractSocket::UnconnectedState )
      QSslSocket::_q_disconnectedSlot()
      state = QAbstractSocket::UnconnectedState
      QAbstractSocket::bytesAvailable() == 0
      QAbstractSocket::disconnectFromHost() disconnected!
      QAbstractSocket::disconnectFromHost() closed!
      QAbstractSocket::close()
      QAbstractSocketPrivate::canReadNotification() socket is closing - returning
      QSslSocket::close()
      QAbstractSocket::close()
      QAbstractSocket::close()
      Received finished signal while progress is still: 10 Url: QUrl( "https://www.itau.cl/personas/images_login/btn-ingresar.jpg" )

      Attachments

        1. log.txt
          161 kB
          Emilio Davis
        2. Screen Shot 2012-05-08 at 1.24.38 PM.png
          131 kB
          Emilio Davis
        3. Screen Shot 2012-05-08 at 12.51.27 PM.png
          113 kB
          Emilio Davis

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              emiliodavis Emilio Davis
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes