twistd can fail when checking whether a twistd.pid is stale #1524

Open
opened 2011-09-02 16:28:47 +00:00 by davidsarah · 3 comments
davidsarah commented 2011-09-02 16:28:47 +00:00
Owner

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.

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.
tahoe-lafs added the
code-nodeadmin
major
defect
1.9.0a1
labels 2011-09-02 16:28:47 +00:00
tahoe-lafs added this to the undecided milestone 2011-09-02 16:28:47 +00:00

maybe the pidfile was owned by a different user? perhaps tahoe was accidentally started as root the previous time?

maybe the pidfile was owned by a different user? perhaps tahoe was accidentally started as root the previous time?
davidsarah commented 2011-09-02 16:58:09 +00:00
Author
Owner

Replying to warner:

maybe the pidfile was owned by a different user? perhaps tahoe was accidentally started as root the previous time?

No, the pidfile is owned and writeable by davidsarah.

Replying to [warner](/tahoe-lafs/trac-2024-07-25/issues/1524#issuecomment-85473): > maybe the pidfile was owned by a different user? perhaps tahoe was accidentally started as root the previous time? No, the pidfile is owned and writeable by `davidsarah`.
davidsarah commented 2011-09-02 17:02:49 +00:00
Author
Owner

Replying to [davidsarah]comment:3:

No, the pidfile is owned and writeable by davidsarah.

... and davidsarah also has rwx permissions on the parent directory, /home/davidsarah/tahoe/grid/server2.

Replying to [davidsarah]comment:3: > No, the pidfile is owned and writeable by `davidsarah`. ... and `davidsarah` also has rwx permissions on the parent directory, `/home/davidsarah/tahoe/grid/server2`.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#1524
No description provided.