You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 10, 2022. It is now read-only.
I’ve looked at Proc::Q and Toaster and I (a concurrency noob) can’t see any obvious leak. However, child processes are being orphaned somehow.
As a temp work around, I might try keeping a list of the proc pids and, after all modules are handled, try to ensure all pids are reaped.
UPDATE
I have just had a successful toaster run with no orphans and I think the culprit in this saga may be me:
Not yet stated is how I’ve been actually executing a run. Since the job is long-running I have been using nohup. After reading about possible problems with stdin I started experimenting with this method:
but that apparently blocks use of stdin which the job needs, so I next dropped the stdin redirect:
nohup time perl6 bin/toaster-perl6 > toaster.out 2> toaster.err &
Then, still seeing orphaned processes, I started experimenting with various tweaks to Proc::Q trying to ensure no child processes were being left alive. After many runs, I started looking more closely at the orphan situation (using top and ps ajfx) and decided that nohup may be the root of the problem.
I then rediscovered the at utility, which I haven’t used for many years since leaving a heavy multi-user environment early in my second career. Bingo, no orphans on the first run! Now I have untweaked Proc::Q back to its original form and am trying another run:
I created a one-line script, run-toast.sh, to hold my desired command which is the same as the last nohup line above but without the nohup and the ampersand. Then I executed the file:
at -f run-toast.sh now
and it’s off and running in the default at queue.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I’ve looked at
Proc::Q
andToaster
and I (a concurrency noob) can’t see any obvious leak. However, child processes are being orphaned somehow.As a temp work around, I might try keeping a list of the proc pids and, after all modules are handled, try to ensure all pids are reaped.
UPDATE
I have just had a successful toaster run with no orphans and I think the culprit in this saga may be me:
Not yet stated is how I’ve been actually executing a run. Since the job is long-running I have been using
nohup
. After reading about possible problems withstdin
I started experimenting with this method:but that apparently blocks use of stdin which the job needs, so I next dropped the
stdin
redirect:Then, still seeing orphaned processes, I started experimenting with various tweaks to
Proc::Q
trying to ensure no child processes were being left alive. After many runs, I started looking more closely at the orphan situation (usingtop
andps ajfx
) and decided thatnohup
may be the root of the problem.I then rediscovered the
at
utility, which I haven’t used for many years since leaving a heavy multi-user environment early in my second career. Bingo, no orphans on the first run! Now I have untweakedProc::Q
back to its original form and am trying another run:I created a one-line script,
run-toast.sh
, to hold my desired command which is the same as the lastnohup
line above but without thenohup
and the ampersand. Then I executed the file:and it’s off and running in the default at queue.
The text was updated successfully, but these errors were encountered: