How to kill the process that 'sudo kill -9' can't kill without reboot?

I have tried to kill the process:

  sam@sam-desktop:~$ ps -aux|grep sda
  Warning: bad ps syntax, perhaps a bogus '-'? See       http://procps.sf.net/faq.html
  root      2898  0.0  0.0      0     0 ?        S    11:39   0:00       [jbd2/sda6-8]
  root      2899  0.0  0.0   2300   716 ?        D    11:39   0:00       mount -t ext4 -o uhelper=udisks,nodev,nosuid /dev/sda6       /media/634bad56-5543-40fe-843b-cd31f4a95dba_
  sam       2973  0.0  0.0   3328   876 pts/0    S+   14:13   0:00       grep --color=auto sda
  sam@sam-desktop:~$ sudo kill -9 2898
  sam@sam-desktop:~$ sudo kill -9 2899
  sam@sam-desktop:~$ sudo killall -9 2898
  2898: no process found
  sam@sam-desktop:~$ sudo killall -9 2899
  2899: no process found
  sam@sam-desktop:~$ ps -aux|grep sda
  Warning: bad ps syntax, perhaps a bogus '-'? See       http://procps.sf.net/faq.html
  root      2898  0.0  0.0      0     0 ?        S    11:39   0:00       [jbd2/sda6-8]
  root      2899  0.0  0.0   2300   716 ?        D    11:39   0:00       mount -t ext4 -o uhelper=udisks,nodev,nosuid /dev/sda6       /media/634bad56-5543-40fe-843b-cd31f4a95dba_
  sam       2987  0.0  0.0   3328   872 pts/0    S+   14:22   0:00       grep --color=auto sda
  sam@sam-desktop:~$ 

After suggestions I tried:

 sam@sam-desktop:~$ sudo umount -f      /media/634bad56-5543-40fe-843b-cd31f4a95dba_
 umount2: Invalid argument
 umount: /media/634bad56-5543-40fe-843b-cd31f4a95dba_: not mounted
 sam@sam-desktop:~$ sudo umount -l      /media/634bad56-5543-40fe-843b-cd31f4a95dba_
 umount: /media/634bad56-5543-40fe-843b-cd31f4a95dba_: not mounted
 sam@sam-desktop:~$ 

A few points:

  • killall only takes process names so your syntax there was incorrect.

  • [bracketed] processes are kernel threads which aren't going to respond to being killed by a userspace program like kill.

  • Something like mount is waiting for the kernel to respond. It should mount and then close. The only time it hangs is when the mount can't go through, AFAIK. Consider using -v in your mount options to see the exact problem.

I think you want to try sudo umount -f /media/634bad56-5543-40fe-843b-cd31f4a95dba_ and if that doesn't work: sudo umount -l /media/634bad56-5543-40fe-843b-cd31f4a95dba_. I would hope the kernel would see the unmount and would stop the previous mount operation.

Also if this is a mount from your /etc/fstab, you might want to consider using UUIDs instead of "/dev/sdxn" devices which can change name between boots.


The process is in an uninterruptible sleep and therefore cannot be killed.

From wikipedia

An uninterruptible sleep state is a sleep state that won't handle a signal right away. It will wake only as a result of a waited-upon resource becoming available or after a time-out occurs during that wait (if specified when put to sleep). It is mostly used by device drivers waiting for disk or network IO (input/output). When the process is sleeping uninterruptibly, signals accumulated during the sleep will be noticed when the process returns from the system call or trap.

So I would check the hard disk and partition for errors.