[2.2] ProcessGroupLeaderMixin races with spawnProcess

Bug #1675823 reported by Gavin Panella
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Gavin Panella
2.1
Fix Released
High
Gavin Panella

Bug Description

ProcessGroupLeaderMixin.connectionMade tries to set the child process as a process group leader using setpgid. However, this is not permitted once the child process has called exec, which means the the parent process is racing with the child process, the former to call setpgid, the latter to call exec.

There are no synchronisation points in spawnProcess or hooks to customise the child's environment before exec is called, so ProcessGroupLeaderMixin needs to be removed, and the child processes need to set themselves as process group leaders.

Related branches

Gavin Panella (allenap)
summary: - ProcessGroupLeaderMixin races with spawnProcess
+ [2.2] ProcessGroupLeaderMixin races with spawnProcess
Gavin Panella (allenap)
Changed in maas:
status: In Progress → Fix Committed
milestone: none → 2.2.0
Changed in maas:
milestone: 2.2.0 → 2.2.0rc1
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.