dedis / prifi

PriFi, a low-latency, local-area anonymous communication network.
https://prifi.net
GNU Affero General Public License v3.0
48 stars 11 forks source link

Ctrl+C does not stop prifi #123

Closed Pamoi closed 7 years ago

Pamoi commented 7 years ago

This seems to be a consequence of the switch to ONET and makes it very painful to stop prifi.

lbarman commented 7 years ago

Seems to be only on Mac, as Italo is also experiencing this, but I'm not. Specifically, you do ./prifi.sh client 0, but it does not stop ? @ineiti , do you know anything about that ?

Pamoi commented 7 years ago

More details: it happens with every role, I start prifi with ./prifi.sh client 0 for example, and then when I hit ^C the process is not stopped, and logs continue to print in my shell. The only way to stop prifi is to kill the process, moreover it seems the the executable itself (launched by go run) can only be stopped by SIGKILL signals. To make things even more complicated I am not on Mac but on Debian (unstable).

lbarman commented 7 years ago

OK. With nicolas we both use zsh instead of bash, and it works for us. But the engineers are discussing about a fix for bash ofc

nikkolasg commented 7 years ago

Actually, on my machine it works with both bash and zsh. What shell are you running @Pamoi ? echo $SHELL ? and terminal emulator ?

ineiti commented 7 years ago

See https://github.com/dedis/onet/pull/98

Pamoi commented 7 years ago

My shell is /bin/bash and my terminal emulator is gnome-terminal. I will try with zsh to see if the problem may be caused by bash.

lbarman commented 7 years ago

Matthieu can you try Ctrl-Q or Ctrl-Z ? (I really love this way of debugging - "can you try the I/O button on your laptop ?")

Pamoi commented 7 years ago

Ctrl-Qdoes nothing, Ctrl-Z gives me my shell back but the processes (both the script and the prifi binary) are still running.

ineiti commented 7 years ago

You can get them away with killall -9 prifi or pkill -9 -f prifi

Pamoi commented 7 years ago

Yes this works (I've been sending the signals from htop). The problem happens with zsh too on my machine.

ineiti commented 7 years ago

@pamoi - killall works, or using another shell?

ineiti commented 7 years ago

Anyway, try to update with go get -u github.com/lbarman/prifi/sda/app and try again

Pamoi commented 7 years ago

killall, sorry for the confusion.

Pamoi commented 7 years ago

The go getcommand gave me an error (fatal: Not possible to fast-forward, aborting.) so I manually pulled the urfave/cli master branch and it solved the problem !

lbarman commented 7 years ago

I added the -u inside the ./prifi.sh install to update all dependencies. Call ./prifi.sh install to fix the problem.