On 05/27/2018 05:24 PM, Joey Hess wrote:
I stopped the (foreground) assistant with "git annex assistant --stop"; then ran "git annex assistant" (worked). Then stopped it again. Then started (failed). Tried another few times, all failed. I tried a few "git annex watch" followed by "git annex watch --stop" (after getting the "(started...)" message in the log — all of those worked. Tried a few more "git annex assistant", all failed.Anthony DeRobertis wrote:So right now, it's just refusing the run in the background :-/If you're able to reproduce the bug on demand that way, that could point to the way git-annex daemonizes itself with forkProcess. Which from its documentation: forkProcess comes with a giant warning: since any other running threads are not copied into the child process, it's easy to go wrong: e.g. by accessing some shared resource that was held by another thread in the parent. git-annex tries to use forkProcess in a safe way, but that's not especially well-defined or easy to check. You might try running git-annex watch instead of git-annex assistant, since they both daemonize but the latter has a simpler code path.
So, absent the one "git annex assistant" which worked, those all failed. And all of the "git annex watch" worked. So does starting the assistant with "git annex assistant --foreground". (And maybe that's why the webapp was working for me earlier too — it doesn't fork...)
Honestly, if that code is a nightmare... you could just remove it. "git annex assistant --foreground &" is easy enough. And presumably entirely avoids the forkProcess issue there.