Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cherrypy gets wedged when you try to gracefully shut down #718

Open
neunenak opened this issue Jul 25, 2018 · 0 comments
Open

cherrypy gets wedged when you try to gracefully shut down #718

neunenak opened this issue Jul 25, 2018 · 0 comments

Comments

@neunenak
Copy link

This is a problem I've noticed both when I have systemd run cherrymusic as a service, and when I just load cherrymusicd up in a console and hit Ctrl-C - the program just fails to shut down. If I keep banging on Ctrl-C in the console case, or let systemd eventually SIGKILL the daemon in that case, it will eventually die.

Through printf-debugging I've figured out that the program successfully runs stopAndCleanUp in cherrymusicserver/init.py, and the problem lies somewhere in cherrypy/process/wspbus.py. It looks like the publish handler there gets a 'stop' channel argument, then gets a 'log' channel argument, and then somehow manages to keep running. I don't understand cherrypy well enough to know what might be going on here. I did figure out that if I make that function crash when it gets a 'stop' message, the program will shut down - if I add

if channel == 'stop':
  raise Exception

as the first thing in publish, the program halts as expected - although I don't know what havoc I'm wrecking with the cherrypy event system by doing so.

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

No branches or pull requests

1 participant