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

Qt should not use select but poll

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Duplicate
    • Affects Version/s: 4.8.0, 5.0.0
    • Fix Version/s: None
    • Component/s: Core: I/O
    • Labels:
      None
    • Environment:
      Linux and other unix variants

      Description

      See this crash in ktorrent:

      https://bugs.kde.org/show_bug.cgi?id=294996

      The crash is caused by the fact that a file descriptor larger then FD_SETSIZE is passed to one of the fdset macros used in conjunction with the select system call. The problem is that a percentage of users of ktorrent increase the maximum number of open file descriptors to something larger then 1024 on linux, to be able to connect to more peers. This can result in Qt getting file descriptors which are larger then FD_SETSIZE. Which cannot be used in the select system call.

      Qt should therefore use the poll system call instead when dealing with sockets on linux and other unix variants. Poll does not suffer from the limitations of FD_SETSIZE.

        Attachments

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

          Activity

            People

            • Assignee:
              w00t Robin Burchell
              Reporter:
              joriskt Joris Guisson
            • Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes