1

I've got a process on OSX 10.9.5 that just won't die. I have tried

  • kill PID
  • kill -9 PID
  • sudo kill -9 PID
  • killall sshfs
  • killall -9 sshfs
  • sudo killall -9 sshfs
  • Activity monitor / select process / Force Quite

Note that this is not a similar process re-spawning this is the same PID and it just won't die The process concerned is sshfs version 2.5.0.

davidwaters$ ps -ax | grep sshfs
  14080 ttys000    0:00.01 sshfs david@****:/data/workstuff /Users/davidwaters/Work -p **** -o defer_permissions
  14583 ttys004    0:00.00 grep sshfs
davidwaters$ kill -9 14080
davidwaters$ sudo kill -9 14080
  Password:
davidwaters$ ps -ax | grep sshfs
  14080 ttys000    0:00.01 sshfs david@****:/data/workstuff /Users/davidwaters/Work -p **** -o defer_permissions
  14609 ttys004    0:00.00 grep sshfs
davidwaters$ sudo killall  sshfs
davidwaters$ ps -ax | grep sshfs
  14080 ttys000    0:00.01 sshfs david@****:/data/workstuff /Users/davidwaters/Work -p **** -o defer_permissions
  14615 ttys004    0:00.00 grep sshfs
davidwaters$ sudo killall -9 sshfs
davidwaters$ ps -ax | grep sshfs
  14080 ttys000    0:00.01 sshfs david@****:/data/workstuff /Users/davidwaters/Work -p **** -o defer_permissions
  14619 ttys004    0:00.00 grep sshfs
davidwaters$ sshfs --version
  SSHFS version 2.5 (OSXFUSE SSHFS 2.5.0)
  OSXFUSE library version: FUSE 2.7.3 / OSXFUSE 2.7.0
  no mount point

ps -efv reports the process in state U

U Marks a process in uninterruptible wait.

Update

As requested:

davidwaters$ ps -aefl | grep sshfs
  501 14080     1   0  8:12am ??         0:00.01 sshfs david@offi     4006  31  0  2434632   2312 -      U                   0

As you can see I have killed the parent process and 14080 got reassigned to being a child of PID 1.

  • If U this could be waiting for the completing of an interrupt which would not be interruptible. – mdpc Oct 22 '14 at 20:39
  • I'd include the ps -aefl for the processes AND their parents in the question. – mdpc Oct 22 '14 at 20:40
  • mdpc@ I have included the out put of ps -aefl for the process. As I have already killed the original parent I don't think the state of PID 1 will be relevant. – David Waters Oct 22 '14 at 20:44
  • 1
    Have you tried, y'know, unmounting? – Bob Oct 22 '14 at 20:51
  • @Bob Yep I tried unmounting, no luck. I ended up having to reboot. – David Waters Oct 23 '14 at 2:22
1

If the process is hung in Device WAIT state you will NOT be able to kill it. To see that you'll have to check the flags with ps -aefl.

Also if the process is in Zombie state, it is an already killed process. If it does not remove itself from the process table this is due to the parent process having some type of problem. In this case, depending on the parent, you can try killing the parent process.

| improve this answer | |
  • Thanks, as I have updated the question the process is in state U – David Waters Oct 22 '14 at 20:37
  • I have already tried killing the parent process, the parent process died after a kill -9 but the process in question just reparented it's self to PID 1 and carried on ignoring signals. – David Waters Oct 22 '14 at 20:39
  • @mdpc, Why can't you interrupt and kill a process in WAIT state? – Pacerier Dec 11 '17 at 19:20
  • @Pacerier See this article for an explanation (or ask a new question): eklitzke.org/uninterruptible-sleep – Miles Jul 12 '18 at 8:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.