Skip to content

how_to_kill_trinity

Brian Haas edited this page Aug 31, 2023 · 6 revisions

If you need to kill the Trinity process for any reason and it's during phase-2, it can be a challenge, because it will retry sub-jobs automatically in case there was a hiccup of some sort (usually involving the file system or resources not keeping pace). To get around this, you need to be able to kill the parent process that's spawning the sub-jobs.

To find the parent process, you can run:

 ps axjf

and search for the parent Trinity job at the top of the Trinity job tree.

Once you have that process ID, you can run:

 kill -9 $pid

the ParaFly process is responsible for managing the phase-2 Trinity jobs. In phase-2, if a Trinity sub-job fails, it will retry it a handful of times automatically to ensure its a true failure and not something sporadic. If you can kill this ParaFly parent process (highlighted above in red), that should end the phase-2 execution.

Another much easier way to do it is to try to kill all jobs that have Trinity or ParaFly in the name, which can be done like so (as a last resort):

 ps auxww | egrep "Trinity|ParaFly" | grep -v grep | awk '{ print $2;}' | xargs -n1 -I {} kill -9 {}
Clone this wiki locally