Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Behind the Scenes
  3. Qt.io webservices
  4. QtNetwork multiple concurrent upload data corruption bug
Forum Updated to NodeBB v4.3 + New Features

QtNetwork multiple concurrent upload data corruption bug

Scheduled Pinned Locked Moved Qt.io webservices
2 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NahidAkbar
    wrote on last edited by
    #1

    Versions observed: 4.8, 5.0, ...
    OS: Linux/Ububtu 12.04
    Libraries linked to: Qt5Network, Qt5Core.

    I have a setup where I upload several hundred small files (size around 512kb-2mb) to a local webserver in parallel. When I say parallel, I mean multiple QNetworkRequest/Reply objects. It's a simple QtCoreApplication running a simple event loop and does not use any threading code. I am uploading through post requests. I think this only happens when I have more than one or two parallel connections. I usually limit the number of parallel connections to 4 as it doesn't seem to run more than six connections anyway. But if I let in about 10-20 connections at once, it seems to make this occur faster.

    What basically happens is, after about 16 kb, only for some of the requests, it starts to repeat the start of the packet. I can easily tell because those are preety much json files and I can see the elements at the top repeating. I am using a QFile as the QIODevide in my request. I've tried caching the data in a QBuffer and using that. Same result.

    It is very non-deterministic. If I ran 100 uploads, I would only observe this in say 15 of the requests. I have retry mechanisms in my software and when the same request is retried, it succeeds. And this is very very rare when only using say two connections. Starts to happen quicker when more when more parallel connections are used.

    It is not a fault of the web-server. We've stress tested it with thousands of parallel uploading connections. And we've confirmed with wireshark that it is indeed the data that comes out of the qt network stack that goes corrupted.

    Would be nice if this was fixed for future versions of Qt. Or maybe I am not enabling some setting or something that makes this bug report stupid. I can't share our proprietery code but I am willing to patch together some snippets to help reproduce this is that helps.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      amccarthy
      wrote on last edited by
      #2

      I suggest you report this in the Qt bug tracking system. https://bugreports.qt-project.org/

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved