Opened 9 years ago

Last modified 9 years ago

#97 new defect

cereal failing to destroy stopped sessions

Reported by: jrollins Owned by: jrollins
Priority: major Component: cereal
Keywords: Cc:
Sensitive:

Description

For some reason cereal is failing to destroy sessions. I have stopped a cereal session (chez), and then attempted to destroy it:

rukh:~ 0# cereal-admin destroy chez 
Really destroy session 'chez'? [Y|n]: 
Service cereal.chez removed, the service daemon received the TERM and CONT signals.
Session 'chez' destroyed.
rukh:~ 0#

but the runsv process for the session is still running, and runsvdir reported this log message twice:

rukh:~ 0# ps -eFH | grep cereal | grep chez
root      2333     1  0    33    24   0 09:51 ?        00:00:00   runsvdir -P /etc/service log: ................................................................................................................................................................................................................................runsv cereal.chez: warning: unable to open supervise/stat.new: file does not exist?runsv cereal.chez: warning: unable to open log/supervise/stat.new: file does not exist?.
root      2334  2333  0    27    24   0 09:51 ?        00:00:00     runsv cereal.chez
rukh:~ 0# 

The cereal session directory in /var/lib/cereal/sessions is gone. Is this a problem with the update-service --remove command in the destroy_session function?

Change History (2)

comment:1 Changed 9 years ago by jrollins

So I'm noticing two different behaviors, that may be related.

If the session is running and it is destroyed, the runsv process will terminate properly, but runsvdir will complain with the following:

runsv cereal.hydra2: fatal: unable to change directory to ./log: file does not exist?runsv cereal.hydra2: warning: unable to open log/supervise/pid.new: file does not exist?runsv cereal.hydra2: warning: unable to open log/supervise/pid.new: file does not exist?runsv cereal.hydra2: warning: unable to open supervise/pid.new: file does not exist?

If the session is not running and an attempt it made to destroy it, the runsv process will 'not' terminate, and runsvdir will complain with a different message:

runsv cereal.hydra2: warning: unable to open supervise/stat.new: file does not exist?runsv cereal.hydra2: warning: unable to open log/supervise/stat.new: file does not exist?

comment:2 Changed 9 years ago by jrollins

  • Summary changed from cereal failing to destroy sessions to cereal failing to destroy stopped sessions

I think I've tracked at least part of this problem to what I think is a bug in runit where stopped runsv services are not responding to TERM signals:505608. I'm going to wait to here back from Gerrit before looking too much further into this.

Note: See TracTickets for help on using tickets.