Replies: 6 comments 9 replies
-
what OS (Linux, Win, …) do you use? |
Beta Was this translation helpful? Give feedback.
-
Ok yeah interesting, I can replicate this with a simple repro on linux. I
thought we'd sorted this ages ago actually, the topic has definitely come
up before.
…On Fri, Mar 18, 2022 at 2:06 AM Christian Korneck ***@***.***> wrote:
what OS (Linux, Win, …) do you use?
—
Reply to this email directly, view it on GitHub
<#1250 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMOUSTNCL2S45FG2SAFXMLVANC6LANCNFSM5Q63BMZQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
This was a big problem at RodeoFX (and I'm sure it's still is). This code is supposed to fix that problem if I remember correctly but in some cases it doesn't. At the end of the day, such issues are always process group related. |
Beta Was this translation helpful? Give feedback.
-
Actually I was wrong about my repro, I was doing a SIGKILL not SIGTERM.
SIGTERM works as expected, child procs are killed. SIGKILL leaves child
procs hanging, but you're not gonna get any guarantees with it so that's
acceptable.
How specifically are you killing the rez proc?
…On Fri, Mar 18, 2022 at 8:37 AM Jean-Christophe Morin < ***@***.***> wrote:
This was a big problem at RodeoFX (and I'm sure it's still is). This code
<https://github.com/nerdvegas/rez/blob/6bd2f451e2ca464abcdcca3c7060a81fca1c2765/src/rez/cli/_util.py#L206-L243>
is supposed to fix that problem if I remember correctly but in some cases
it doesn't.
At the end of the day, such issues are always process group related.
—
Reply to this email directly, view it on GitHub
<#1250 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMOUSVF3UDKV6FOPVIUQPDVAOQ2RANCNFSM5Q63BMZQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
This sounds like something we should add a per-shell test for. This
_should_ be working (rez should terminate child procs on a SIGINT as per
https://github.com/nerdvegas/rez/blob/master/src/rez/cli/_util.py#L242) but
perhaps there's an issue on windows?
…On Fri, Mar 18, 2022 at 9:59 AM Christian Korneck ***@***.***> wrote:
yep, that’s what I wanted to answer in case of Windows. Kill the process
tree (taskkill /pid <pid> /f /t).
However. Some processes might spawn away (parent process not waiting,
leaving processes with no parent process). Some of this can be prevented by
using tricks like start /wait cmd.exe /c <actual cmdline> as the cmdline
to start a process (-> package definition). Some other stuff needs special
handling.
—
Reply to this email directly, view it on GitHub
<#1250 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMOUSQYFX3MFSY65TMBXCTVAO2NXANCNFSM5Q63BMZQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
For anyone having the same issue, I solved it by changing the Tractor blade code for killing the process: # TrSubprocess.py
def send_signal(self, sig):
if subprocess.mswindows:
subprocess.call(['taskkill', '/F', '/T', '/PID', str(self.pid)]) Now it uses Powershell to kill the process tree. |
Beta Was this translation helpful? Give feedback.
-
Hi,
We have a render farm setup where we launch renders in a Rez environment like:
rez env houdini -- hrender ...
The issue we are facing is that when trying to kill a running task on a computer, the visible PID is Rez's one and not
hrender
's one for example.I would have thought that killing Rez was killing the subprocess that was spawned but this is not the case and it stills run in the background. This is quite problematic since we launch renders on machines that are not only dedicated to the render farm and users must be able to kill jobs.
My question is: is there a reliable way to kill the child process in a Rez resolved environment?
I noticed that there is the
rez env --new-session
argument but I don't quite understand how it works on Windows and how it might solve our issue (I triedrez env --new-session maya -- maya
and closed the terminal but nothing happened)Thanks!
Beta Was this translation helpful? Give feedback.
All reactions