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

[REG: 5->6] pthread functions seem to refer to the parent process in QProcess child setup

    XMLWordPrintable

Details

    • Linux/X11
    • 82b75570f (dev), 29b2fe40d (dev), 65528387d (6.5), b5982b652 (6.5), c5221f6be (dev)

    Description

      Trying to set affinity or priority in Qt 6 tries to change for the parent process, not the child being set up. Attached example produces when built with Qt 6:

      $ strace -e sched_setaffinity,sched_setscheduler -f ./qtbug*
      (parent) pthread_id: 140076353583104
      (parent) pid: 338620
      strace: Process 338621 attached
      (child) pthread_id: 140076353583104
      (child) pid: 338621
      pid: 338621 set_affinity 2 - 3
      [pid 338621] sched_setaffinity(338620, 128, [2, 3]) = 0
      [pid 338621] sched_setscheduler(338620, SCHED_FIFO, [40]) = -1 EPERM (Operation not permitted)
      strace: Process 338622 attached
      pid 338621's current affinity list: 0-7
      [pid 338622] +++ exited with 0 +++
      [pid 338621] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=338622, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
          TID     PID    PPID PSR CLS PRI RTPRIO
       338621  338621  338620   4 TS   19      -
      [pid 338621] +++ exited with 0 +++
      --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=338621, si_uid=1000, si_status=0, si_utime=0, si_stime=3} ---
      +++ exited with 0 +++
      

      Three the sched_setaffinity and sched_setscheduler somehow point to the parent. In Qt 5 these seem to be set for the current PID.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-111243
          # Subject Branch Project Status CR V

          Activity

            People

              thiago Thiago Macieira
              poikelin Joni Poikelin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: