Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Killing SliceRecon does not kill ZMQ #11

Open
schoonhovenrichard opened this issue Oct 16, 2019 · 2 comments
Open

Killing SliceRecon does not kill ZMQ #11

schoonhovenrichard opened this issue Oct 16, 2019 · 2 comments

Comments

@schoonhovenrichard
Copy link

When trying to kill a SliceRecon process I run into several problems.

Firstly, I start 4 terminals as follows:
Terminal 1) recast3d,
Terminal 2) ./slicerecon_server --slice-size et.c
Terminal 3) ./slicerecon_push_tomos --parallel (this one finishes the process on its own)
Terminal 4) python slicerecon_plugin.py

I have not found a way to kill these processes without some "ZMQbg/1" process remaining alive.

Option A, killing from SliceVisualizer:

  • If I hit Ctrl-D while in SliceVisualizer, it kills the graphics inside the screen and I get a "core dumped" in Terminal 2 that runs the slicerecon_server. Hitting Ctrl-C has no effect. It also does not close Terminals 1 and 4.
  • Subsequently hitting Ctrl-C inside terminal 1 will kill SliveVisualizer but not the python process in Terminal 4.
  • The python process in Terminal 4 can only be killed by Ctrl-Z. No error is thrown. However, subsequently trying to restart it leads to the error that the tcp address is already in use. If I run "ps" I see a process "ZMQbg/1" which needs to be killed by "kill -9 PID".

Option B, killing from terminal:

  • If we navigate to Terminal 1 or Terminal 2 and hit Ctrl-C we can exit these terminals without error, in both cases the python process in Terminal 4 remains active. It needs to be killed with Ctrl-Z separately again. Again a "ZMQbg/1" process remains active that needs to be killed manually with "kill -9 PID".

I am unsure how the correct procedure to kill SliceRecon and the plugins should be implemented. Any thoughts?

PS: One reason why this is relevant is that when developing a python plugin, ideally we would keep the first 3 terminals active, see the result of the plugin, kill the pluging to make some changes en restart it again. I don't know if SliceRecon supports reconnecting a plugin in this way but it could probably be implemented if the visualization server has some loop which tries to reconnect. Currently, we can kill only the Python process in Terminal 4, run kill the "ZMQbg/1" but then restarting the python plugin does not work.

@jwbuurlage
Copy link
Member

jwbuurlage commented Oct 16, 2019 via email

@adriaangraas
Copy link

adriaangraas commented Oct 17, 2019

Does this problem still arise on develop? Curious if #1 fixed this. Points 1,2 are still very welcome though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants