Project

General

Profile

Evolution #6177

Arrêt de creoled --debug avec ctrl+c

Added by Joël Cuissinat over 8 years ago. Updated almost 8 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Category:
-
Start date:
02/11/2014
Due date:
02/21/2014
% Done:

100%

Estimated time:
0.50 h
Spent time:
Distribution:
EOLE 2.4

Description

Si on lance creoled en mode debug, un ctrl+c ne permet plus de le stopper...

 ENGINE Start InotifyMonitor thread
^CTraceback (most recent call last):
  File "/usr/sbin/creoled", line 6, in <module>
    d.run()
  File "/usr/lib/python2.7/dist-packages/creole/server.py", line 439, in run
    engine.start()
  File "/usr/lib/python2.7/dist-packages/cherrypy/process/wspbus.py", line 235, in start
    self.publish('start')
  File "/usr/lib/python2.7/dist-packages/cherrypy/process/wspbus.py", line 197, in publish
    output.append(listener(*args, **kwargs))
  File "/usr/lib/python2.7/dist-packages/cherrypy/_cpserver.py", line 151, in start
    ServerAdapter.start(self)
  File "/usr/lib/python2.7/dist-packages/cherrypy/process/servers.py", line 167, in start
    wait_for_free_port(*self.bind_addr)
  File "/usr/lib/python2.7/dist-packages/cherrypy/process/servers.py", line 406, in wait_for_free_port
    time.sleep(timeout)
KeyboardInterrupt

Related issues

Related to creole - Tâche #6669: Plusieurs ctrl-c peuvent être nécessaire pour stopper reconfigure Ne sera pas résolu 10/28/2014 11/07/2014

Associated revisions

Revision d229f264 (diff)
Added by Daniel Dehennin almost 8 years ago

Un « SIGINT » mal placé n’arrête pas « creoled »

Le problème la prise en charge des signaux lors du démarrage du serveur
cherrypy : lorsque le moteur n’est pas démarré, les signaux sont ignorés.

  • creole/server.py (CreoleDaemon.run): Appel la méthode « _kill() » sur
    la réception d’un « SIGINT ».
    (CreoleDaemon._kill): Sort avec un code d’erreur non nul.

Fixes: #6177 @1h

History

#1 Updated by Joël Cuissinat over 8 years ago

  • Target version set to Eole 2.4-beta1

#2 Updated by Daniel Dehennin over 8 years ago

  • Status changed from Nouveau to En attente d'informations

C’est amusant ça fonctionne très bien sur ma machine…

D’après la log fourni, il semble que creoled n’a pas eu le temps de complètement démarrer, peut-être que cherrypy trap les Ctrl-C le temps de finir son démarrage:

root@eolebase:~# creoled --debug
creoled - Loading tiramisu configuration
^CTraceback (most recent call last):
  File "/usr/sbin/creoled", line 6, in <module>
    d.run()
  File "/usr/lib/python2.7/dist-packages/creole/server.py", line 405, in run
    server = CreoleServer()
  File "/usr/lib/python2.7/dist-packages/creole/server.py", line 142, in __init__
    self.reload_config()
  File "/usr/lib/python2.7/dist-packages/creole/server.py", line 149, in reload_config
    disable_mandatory=True)
  File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 206, in creole_loader
    config = loader.get_config()
  File "/usr/lib/python2.7/dist-packages/creole/var_loader.py", line 1216, in get_config
    self._config = Config(descr)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 552, in __init__
    self._impl_build_all_paths()
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 475, in _impl_build_all_paths
    self.cfgimpl_get_description().impl_build_cache()
  File "/usr/lib/python2.7/dist-packages/tiramisu/option.py", line 1224, in impl_build_cache
    force_no_consistencies)
  File "/usr/lib/python2.7/dist-packages/tiramisu/option.py", line 1224, in impl_build_cache
    force_no_consistencies)
  File "/usr/lib/python2.7/dist-packages/tiramisu/option.py", line 1224, in impl_build_cache
    force_no_consistencies)
  File "/usr/lib/python2.7/dist-packages/tiramisu/option.py", line 1211, in impl_build_cache
    option._consistencies is not None:
KeyboardInterrupt
root@eolebase:~# 

#3 Updated by Joël Cuissinat over 8 years ago

  • Target version changed from Eole 2.4-beta1 to Eole 2.4-beta2

#4 Updated by Joël Cuissinat about 8 years ago

  • Priority changed from Normal to Bas
  • Target version changed from Eole 2.4-beta2 to Eole 2.4-beta3

#5 Updated by Joël Cuissinat about 8 years ago

  • Target version changed from Eole 2.4-beta3 to Eole 2.4-RC2

#6 Updated by Daniel Dehennin almost 8 years ago

  • Due date set to 02/21/2014
  • Status changed from En attente d'informations to Accepté
  • Priority changed from Bas to Normal
  • Start date set to 02/11/2014

#7 Updated by Daniel Dehennin almost 8 years ago

Pour la gestion par le script d’init: un kill -9 est fait après 10 secondes d’attente (source:init/creoled?rev=27505c3#L40)

#8 Updated by Daniel Dehennin almost 8 years ago

  • Status changed from Accepté to Résolu
  • % Done changed from 0 to 100

#9 Updated by Joël Cuissinat almost 8 years ago

  • Status changed from Résolu to Fermé

En réalité, il reste encore un moment précis où l'on peut planter creoled (et en plus il continue de répondre !) mais je ne vais pas m'acharner !

root@scribe:~# creoled --debug
creoled - Loading tiramisu configuration
 ENGINE Listening for SIGHUP.
 ENGINE Listening for SIGTERM.
 ENGINE Listening for SIGUSR1.
 ENGINE Listening for SIGINT.
 ENGINE Bus STARTING
 ENGINE Started monitor thread '_TimeoutMonitor'.
 ENGINE PID 25932 written to '/tmp/creoled.pid'.
 ENGINE Started monitor thread 'Autoreloader'.
 ENGINE Start InotifyMonitor thread
^C ENGINE Caught signal SIGINT.
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C
127.0.0.1 - - [21/Feb/2014:17:39:38] "GET /get/creole?variable=nom_machine HTTP/1.1" 200 35 "" "restkit/3.3.2" 

Also available in: Atom PDF