﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	launchpad_bug
1524	twistd can fail when checking whether a twistd.pid is stale	davidsarah	davidsarah	"After a failed hibernate/restore, I tried to restart some Tahoe nodes:
{{{
davidsarah@shinier:~/tahoe/1.9alpha$ bin/tahoe start ../grid/server1
STARTING '/home/davidsarah/tahoe/grid/server1'
Removing stale pidfile /home/davidsarah/tahoe/grid/server1/twistd.pid

davidsarah@shinier:~/tahoe/1.9alpha$ bin/tahoe start ../grid/server2
STARTING '/home/davidsarah/tahoe/grid/server2'
Can't check status of PID 2015 from pidfile /home/davidsarah/tahoe/grid/server2/twistd.pid: Operation not permitted

davidsarah@shinier:~/tahoe/1.9alpha$ ps -Fp 2015
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD

davidsarah@shinier:~/tahoe/1.9alpha$ bin/tahoe start ../grid/server2
STARTING '/home/davidsarah/tahoe/grid/server2'
Can't check status of PID 2015 from pidfile /home/davidsarah/tahoe/grid/server2/twistd.pid: Operation not permitted

davidsarah@shinier:~/tahoe/1.9alpha$ ls -l ../grid/server2/twistd.pid
-rw-r--r-- 1 davidsarah davidsarah 4 2011-09-02 03:32 ../grid/server2/twistd.pid

davidsarah@shinier:~/tahoe/1.9alpha$ cat -v ../grid/server2/twistd.pid
2015
}}}

There was no process with pid 2015. (Note that the {{{ps}}} command would show a process owned by another user including root.) I don't know why twistd is able to remove some stale pidfiles but not others.

The problem can be worked around by removing the {{{twistd.pid}}} file, but that's not really very satisfactory.

I'll file a bug against Twisted when I've investigated further."	defect	assigned	major	undecided	code-nodeadmin	1.9.0a1		twistd reliability usability tahoe-start unix		
