Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.0 Beta2
-
-
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
- relates to
-
QTBUG-111964 QProcess::start does not return if setChildModifier hangs
- Closed
-
QTBUG-120275 QProcess Leaks FD if non existence binary is executed
- Closed
For Gerrit Dashboard: QTBUG-111243 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
463355,6 | QProcess/Linux: fix file descriptor leak in case of failed child start | dev | qt/qtbase | Status: MERGED | +2 | 0 |
467493,5 | Revert commit "don't ever force fork() instead of forkfd()" | dev | qt/qtbase | Status: MERGED | +2 | 0 |
467508,18 | QProcess/Linux: add a flag to re-enable the vfork()-like semantics | dev | qt/qtbase | Status: MERGED | +2 | 0 |
477743,2 | Revert commit "don't ever force fork() instead of forkfd()" | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
478784,2 | QProcess/Linux: fix file descriptor leak in case of failed child start | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |