Package: python-bottle Version: 0.8.0-2 Severity: normal Hello,
I'm making a daemon using bottle, which I'm killing with SIGTERM as it happens to be the case with daemons. While everything works fine with ^C/SIGINT: $ ./run-local src/arki-server data/conf Bottle server starting up (using AutoServer())... Listening on http://localhost:8080/ Use Ctrl-C to quit. Started new worker 140423895066384: Initial worker pool Started new worker 140423878280976: Initial worker pool Started new worker 140423886673680: Initial worker pool Started new worker 140423861495568: Initial worker pool Started new worker 140423869888272: Initial worker pool Started new worker 140423853102864: Initial worker pool Started new worker 140423836317456: Initial worker pool Started new worker 140423844710160: Initial worker pool Started new worker 140423754413840: Initial worker pool serving on http://127.0.0.1:8080 Started new worker 140423746021136: Initial worker pool ^CShutting down threadpool Worker 140423878280976 asked to SHUTDOWN Worker 140423895066384 asked to SHUTDOWN Worker 140423886673680 asked to SHUTDOWN Worker 140423861495568 asked to SHUTDOWN Worker 140423869888272 asked to SHUTDOWN Worker 140423853102864 asked to SHUTDOWN Worker 140423754413840 asked to SHUTDOWN Worker 140423836317456 asked to SHUTDOWN Worker 140423844710160 asked to SHUTDOWN Worker 140423746021136 asked to SHUTDOWN All workers stopped Shutting down threadpool All workers stopped With SIGTERM I get a backtrace: $ ./run-local src/arki-server data/conf Bottle server starting up (using AutoServer())... Listening on http://localhost:8080/ Use Ctrl-C to quit. Started new worker 139643165251344: Initial worker pool Started new worker 139643156858640: Initial worker pool Started new worker 139643148465936: Initial worker pool Started new worker 139643140073232: Initial worker pool Started new worker 139643131680528: Initial worker pool Started new worker 139643123287824: Initial worker pool Started new worker 139643114895120: Initial worker pool Started new worker 139643106502416: Initial worker pool Started new worker 139643098109712: Initial worker pool serving on http://127.0.0.1:8080 Started new worker 139643089717008: Initial worker pool Shutting down threadpool Worker 139643165251344 asked to SHUTDOWN Worker 139643156858640 asked to SHUTDOWN Worker 139643148465936 asked to SHUTDOWN Worker 139643140073232 asked to SHUTDOWN Worker 139643131680528 asked to SHUTDOWN Worker 139643123287824 asked to SHUTDOWN Worker 139643114895120 asked to SHUTDOWN Worker 139643106502416 asked to SHUTDOWN Worker 139643098109712 asked to SHUTDOWN Worker 139643089717008 asked to SHUTDOWN All workers stopped Traceback (most recent call last): File "/home/enrico/lavori/arpa/arkimet/src/arki-server", line 608, in <module> start_server(opts) File "/home/enrico/lavori/arpa/arkimet/src/arki-server", line 542, in start_server bottle.run(**args) File "/home/enrico/lavori/arpa/arkimet/src/arkimet/bottle.py", line 1251, in run server.run(app) File "/home/enrico/lavori/arpa/arkimet/src/arkimet/bottle.py", line 1224, in run return sa(self.host, self.port, **self.options).run(handler) File "/home/enrico/lavori/arpa/arkimet/src/arkimet/bottle.py", line 1148, in run httpserver.serve(app, host=self.host, port=str(self.port), **self.options) File "/usr/lib/pymodules/python2.5/paste/httpserver.py", line 1310, in serve server.serve_forever() File "/usr/lib/pymodules/python2.5/paste/httpserver.py", line 1084, in serve_forever self.handle_request() File "/usr/lib/python2.5/SocketServer.py", line 217, in handle_request request, client_address = self.get_request() File "/usr/lib/pymodules/python2.5/paste/httpserver.py", line 1119, in get_request (conn,info) = SecureHTTPServer.get_request(self) File "/usr/lib/pymodules/python2.5/paste/httpserver.py", line 388, in get_request (conn, info) = self.socket.accept() File "/usr/lib/python2.5/socket.py", line 172, in accept sock, addr = self._sock.accept() File "/usr/lib/pymodules/python2.5/cherrypy/_cpengine.py", line 24, in SIGTERM cherrypy.engine.stop() AttributeError: 'module' object has no attribute 'engine' Shutting down threadpool All workers stopped Although cherrypy is installed (because I also have TurboGears1 in the system), bottle is not using it, and yet CherryPy still manages to annoy me. It looks like AutoServer is trying in sequence FapwsServer CherryPyServer and PasteServer, settling on PasteServer. Although CherryPy is installed, it still raises ImportError because I have CherryPy 2.3 which does not have "wsgiserver". It still does manage, however, to install its own signal handlers and screw up the environment. Unfortunately, I cannot find anything that can be imported from cherrypy3 that is useful to check its version or the presence of wsgiserver and which doesn't install CherryPy's hooks. What else could I expect from the very same who completely changed API without changing module names, after all? But I digress. Anyway, in my local copy of Bottle I can just make it not attempt to load CherryPy. Unless there is a reason to think CherryPy is preferable to Paste, I could suggest to try CherryPy later in AutoServer. Ciao, Enrico -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages python-bottle depends on: ii python 2.5.4-9 An interactive high-level object-o ii python-support 1.0.8 automated rebuilding support for P python-bottle recommends no packages. python-bottle suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org