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

High CPU usage of QUdpSocket after received ICMP TTL message

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.8.7, 5.4.0 RC
    • 4.8.6, 5.3.2
    • Network: Sockets
    • None
    • Compiler: MSVC 2010
      OS: Windows 7 PRO SP1 x64, Windows 8.1 PRO x64
      OpenVPN 2.3.4 (x64 version)
    • 2580192defddb4afc0281b6097b8a3c5271412e7 in qt5; 8c828dcba954b3168a7bef7ce6af17b5bdac5500 in qt 4

    Description

      I have QUdpSocket object bound to a port, and I use it both for sending and receiving datagrams. But when my app receive ICMP 'TLL Exceeded' message, the communiction stops. Since then no packet is received, even if I see network traffic. The CPU usage raises, but the application remains responsive - user can click buttons and perform other actions.

      The ICMP TTL Exceeded message for UDP sockets is hard to repoduce - I manged to get it only for OpenVPN connections, when firewall is turned off.

      To reproduce this bug:
      1. Download and install OpenVPN from https://openvpn.net/index.php/download/community-downloads.html
      2. Copy 4 attached files: vpn_test.ovpn, vpn_test.key, vpn_test.pem, vpn_test.cert to your OpenVPN config subdirectory.
      3. Start OpenVPN and click Connect (only one connection for this certifate is allowed).
      4. Turn off firewall - this is very important !!!
      5. Build & run 'qudpsocket_ttl_exceeded_bug' app.
      6. Open taskmgr and check current cpu usage.
      7. Set high value of TTL eg. 100 and click Test - CPU usage should be low.
      8. Now set low value of TTL eg. 3 to generate ICMP 'TTL Exceeded' message, and click Test - CPU usage will raise, and will be high until app is closed.

      Attachments

        1. 1.png
          1.png
          144 kB
        2. 2.png
          2.png
          179 kB
        3. 3.png
          3.png
          124 kB
        4. 4.png
          4.png
          119 kB
        5. 5.png
          5.png
          196 kB
        6. capture.sleepy
          55 kB
        7. qudpsocket_ttl_exceeded_bug.zip
          5 kB
        8. vpn_test.cert
          0.9 kB
        9. vpn_test.key
          0.9 kB
        10. vpn_test.ovpn
          0.4 kB
        11. vpn_test.pem
          1.0 kB

        Issue Links

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

          Activity

            People

              richmoore Richard Moore (qtnetwork)
              amiart Robert Szefner
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes