Skip to content

sage is killed on startup via sage-cleaner #27769

@sagetrac-andy

Description

@sagetrac-andy

Under rare conditions, sage is killed at startup by sage-cleaner.

This requires:

  1. Files left over in ~/.sage/temp/HOSTNAME/PID
  2. A pid in ~/.sage/temp/HOSTNAME/PID/spawned_processes must exist, and be started at init time. Its process group id will be 0

When sage-cleaner tries to clean up, it will do a "kill 0", which will kill sage.

Files will only be left in ~/.sage/temp/HOSTNAME if sage is not shutdown properly. Most likely because of a reboot.

The attached patch to sage-cleaner prevents it from doing 'kill 0'

With the fix, the ~/.sage/temp/HOSTNAME/cleaner.log

Starting sage-cleaner with PID 16954
Checking PIDs [809, 31312]
Process 809 is no longer running, so we clean up
Killing 809's spawned jobs
--> Killing 'Singular' with PID 814 and parent PID 809
--> Process group of PID 814 is 0. Not killing process group
Deleting /home/andy/.sage/temp/dokodemo/809
Contents of ~/.sage/temp/dokodemo/809/spawned_processes: 
814 Singular
ps auxww|grep 814
root       814  0.0  0.0      0     0 ?        S<   Apr30   0:00 [loop11]

CC: @jdemeyer

Component: scripts

Keywords: sage-cleaner

Author: Andy Howell

Branch/Commit: u/andy/sage_is_killed_on_startup_via_sage_cleaner @ 8be49ef

Issue created by migration from https://trac.sagemath.org/ticket/27769

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions