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

[Regression] invalid timeout value passed to select

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.6.1
    • 4.6.0
    • Core: I/O
    • None
    • embedded linux, qt 4.6.0
    • 9aa60dfdf5b4837b9ceb15d8fcbc96f37dce7b5a

    Description

      When a select is interrupted, we re-calculate the timeout and restart the select. It seems that the recalculation is not correct, so that the timeout value we passed to select causes EINVAL error.
      Strace log:
      select(8, [3 7], [], [],

      {0, 1395}

      ) = ? ERESTARTNOHAND (To be restarted)
      — SIGIO (I/O possible) @ 0 (0) —
      rt_sigreturn(0x1d) = -1 EINTR (Interrupted system call)
      clock_gettime(CLOCK_MONOTONIC,

      {27075, 687525931}

      ) = 0
      select(8, [3 7], [], [],

      {4294967295, 996967}

      ) = -1 EINVAL (Invalid argument)

      Problem seems to be in corelib/kernal/qcore_unix.cpp, time_update function.
      This did not happen against qt-4.5.3

      Attachments

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

        Activity

          People

            tmacieir Thiago Macieira (closed Nokia identity) (Inactive)
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes