<html>#710: Can't stop / cleanup simulations that run without a queueing system
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Erik Schnetter</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td></td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>SimFactory</td></tr>
</table>

<p>Comment (by Roland Haas):</p>
<p>This is still happening even after git hash <a data-is-external-link="true" href="https://bitbucket.org/simfactory/simfactory2/commits/0ce61cb24ea4cbf4d9abf8f6db6ae82e8bbba25f" rel="nofollow">0ce61cb</a> "Add submit scripts for workstations, so that simulations can be run in the background there" of <a data-is-external-link="true" href="https://bitbucket.org/simfactory/simfactory2" rel="nofollow">simfactory2</a> which introduced an <code>exec</code> to <code>generic.sub</code> making the PID returned that of the simfactory run process. This still leaves python and bash in between the PID returned and the Cactus executable. Eg for pid 30727 on a Debian system, one has:</p>
<div class="codehilite language-plaintext"><pre><span></span>systemd(1)───python2(30711)───RunScript(30719)───cactus_sim(30727)─┬─orted(30758)─┬─{orted}(30764)
                                                                   │              ├─{orted}(30765)
                                                                   │              └─{orted}(30766)
                                                                   ├─{cactus_sim}(30768)
                                                                   └─{cactus_sim}(30769)
</pre></div>


<p>and after running <code>stop</code> on the simulation this looks like so</p>
<div class="codehilite language-plaintext"><pre><span></span>systemd(1)───RunScript(30719)───cactus_sim(30727)─┬─orted(30758)─┬─{orted}(30764)
                                                  │              ├─{orted}(30765)
                                                  │              └─{orted}(30766)
                                                  ├─{cactus_sim}(30768)
                                                  └─{cactus_sim}(30769)
</pre></div>


<p>ie Python terminated but nothing else. Manually killing RunScript gets rid of just the RunScript and now leaves <code>cactus_sim</code> as a child of <code>systemd</code>. </p>
<p>A fix would be to try and propagate the signal down to <code>cactus_sim</code> (see 
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/710/cant-stop-cleanup-simulations-that-run'>https://bitbucket.org/einsteintoolkit/tickets/issues/710/cant-stop-cleanup-simulations-that-run</a></p>
</html>