Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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:~$ 
share|improve this question

3 Answers 3

up vote 20 down vote accepted

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.

share|improve this answer
    
I have update the original post. The problem still there. When should I use UUIDs? –  sam Dec 12 '11 at 15:32

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.

share|improve this answer
    
I know that hard disk has errors,but how to kill the program trying to use it that cause a forever loop. –  sam Dec 19 '11 at 3:05

I believe that processes in brackets are ones that are started by kernel threads and as such are critical to system function. In this case, jbd2 is the journaling block device, which is required if you want to use your hard drive.

Why do you want to kill this process?

share|improve this answer
    
Because that process is created by me. I use a disk tool to mount a hard disk but seems mounting forever. I want to stop that process and retry another to fix that hard disk. I can't reboot because my / partition also seems to be broken. I use a lot of time to boot into my ubuntu. –  sam Dec 12 '11 at 8:22
1  
The process wasn't created by you - the disk tool initiated the block device which as others have mentioned is waiting for a timeout of some kind –  Rory Alsop Dec 12 '11 at 9:39
1  
information in the answer is fundamentally wrong: bracketed processes are kernel threads, not started by init. –  David Schmitt Dec 12 '11 at 12:06
    
David, I will edit to fix that. –  mfisch Dec 15 '11 at 15:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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