Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't know why, but I cannot run the ps or w commands on my Ubuntu 10.04LTS machine. I did a trace for both, and both stopped when reading part of the same file.

Here's the result of running ps

And here's the result for w

The file also stopped when reading ... itself?

What is happening?

share|improve this question

migrated from Feb 26 '11 at 2:22

This question came from our site for professional and enthusiast programmers.

up vote 8 down vote accepted

I had that happen once when an NFS server went down.

The fact that it's hung trying to read information about pid 17398, and pid 17398 is in D (disk wait) state, suggests that could be the cause for you too.

read(6, "Name:\tconvert\nState:\tD (disk sle"..., 1023) = 664
open("/proc/17398/cmdline", O_RDONLY)   = 6

If you do have NFS mounts, I think the best option is to try to bring the NFS server back up.

Otherwise, umount -f <mount> might help.

share|improve this answer
I guess rebooting should repair this, but I don't want to do it, since I want to be sure what is the cause of this :P – Anonymous Feb 26 '11 at 2:12
What does mount say? Note there's a chance that might hang too (I don't think it should, but I'm not 100% sure). – Mikel Feb 26 '11 at 2:13

sigh closed-question handling is pretty poor, this'll be the third time I try typing this, so please forgive the terseness.

First, use intr NFS mounts. The default hard NFS mounts hang forever. soft NFS mounts error out after a time out (which might be stupid for transient errors.) intr lets you decide to interrupt a hung NFS operation. Just right.

Second, to fix this stupid problem, I've used a stupid trick before, it probably still works. Bring up an interface alias on lo with the NFS Server's IP Address (edit: ifconfig eth0:0 <ipaddress>). Create an /etc/exports file that contains a line to export the filesystem that you're hung on (edit: export a filesystem with the same name as the 'hung' filesystem; you'll have to create the same pathname as what you've mounted). Start your NFS server on your local machine, and hopefully your hung program can error out with "file not found" or "directory not found" or something like that, letting you get on with your work without rebooting.

Don't forget to turn off your NFS server again and remove the interface alias when you're done.

share|improve this answer
I use intr NFS mounts ... where did you see contrary ? – user69239 Feb 26 '11 at 2:40
About the "second paragraph" i don't understand it very well ... sorry ! :( – user69239 Feb 26 '11 at 2:42
@user69239 you didn't give any details, so I assumed you were using the default hard mount type. :) – sarnold Feb 26 '11 at 2:43
@user69239, I've slightly expanded the paragraph with the silly trick -- I hope it is easier to understand now. :) – sarnold Feb 26 '11 at 2:49

I'm not sure why the focus on NFS? Is the asker running NFS? Didn't see anything about that.

Anyways, this is a very strange problem since its /proc. Try the following things to give yourself more info about the problem:

  • Go into /proc and find other pid directories and try reading the cmdline files from those directories.
  • Try reading /proc/pid/stat as well, if that doesn't work, I'd say your system is having kernel issues.
  • Are you able to run netstat -n? This reads from different parts of /proc so it might work and would indicate less of a problem with the proc interface.
  • Try remounting /proc with mount -o remount /proc although I have no idea what this would do in this situation.

I would just suggest rebooting. If you can't read stuff from proc, I'm not sure what you're going to find through other methods. If it happens again, then start worrying.

share|improve this answer
Yes, i'm with NFS ... the problem is copying a file through a s3 fuse system – user69239 Feb 26 '11 at 7:43
fuse and nfs are different things. I think you need to provide all the details you can. You provided a lot with an strace, but knowing more about your setup and how this all started is a necessary first step. – deltaray Feb 26 '11 at 14:40
The problem appeared doing a massive "cp" command from my host (an small instance of Amazon) to an S3, connected with s3f3 1.40 with just the allow_other option. My Ubuntu is a normal base 10.10 installation with the typical upgrade. Nothing else. Really :P – user69239 Feb 26 '11 at 16:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .