# df hangs after shm

## gnac

[edit] this post is obsolete as the problem seems larger than just df.  The system is periodically crashing on what appear to be disk accesses.[/edit]

So I've been having some issues on my wifes pc, again.  Lately firefox keeps closing abrubtly and konqueror can't read her home directory.  ls'ing the directory in a console appears to work.  I've perused the logs with no useful information appearing.

then, I performed a df from the cli, got the following output, but then df frooze!?!

```
# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/hda3             244M  134M  110M  55% /

udev                  236M  2.7M  234M   2% /dev

/dev/hda5             9.4G  3.1G  6.3G  33% /usr

/dev/hda6             957M  233M  725M  25% /var

/dev/hda7             2.8G  386M  2.5G  14% /opt

/dev/hda8             957M  213M  745M  23% /tmp

/dev/hda9              60G  3.9G   56G   7% /home

shm                   236M     0  236M   0% /dev/shm

```

Several times during disk access, the system has completely frozen.  The drive is less than a year old.

I am rsyncing her home directory to my pc for backup before I run a reiserfsck.  Until then, anyone have any thoughts on what might be going on?

ty

----------

## thesheff17

sometimes df will freeze if your hard drive is full.  It may even happen if something in your /etc/fstab has something that isn't mounted.  To tell you the truth I think the drive is going bad.  If you can try to perform a stage4 gentoo install and then put it on a new hard drive.  If the drive is less then a year old...just get an RMA and get a new drive.  You will then know it isn't the hard drive, but I am 98% sure this is the issue.  

The walk through is here:

http://gentoo-wiki.com/HOWTO_Custom_Stage4

----------

## gnac

Thanks for the reply.

The harddrive is not full.  Also, I booted into a live cd and could not find any errors after checking the disk.

Also, while in the live cd I rsynced the contents of the home directory to another pc.

This process crashed the entire pc several times while in the installed gentoo.  In the live cd it went off without a hitch.  This leads me to believe it is an os issue, and not a harddrive issue.

ty

----------

## terminal9

Since your rootfs is dispersed on several partitions, I wonder if you fsck'ed them all or just /dev/hda3.

I'd also suggest you check swap space for bad blocks, since it's used by tmpfs. 

How's swap usage on this system?

----------

## gnac

I fsck'd (reiserfsck'd really) all of the partitions except /boot and swap.  FWIW /boot is ext2 and normally not mounted.

How do I check swap for bad blocks?  I don't appear to have a tmpfsck on my system.

Swap usage appears low, even non existent:

```
#cat /proc/meminfo

MemTotal:       483080 kB

MemFree:        187656 kB

Buffers:         27252 kB

Cached:         184608 kB

SwapCached:          0 kB

Active:         166996 kB

Inactive:       103920 kB

HighTotal:           0 kB

HighFree:            0 kB

LowTotal:       483080 kB

LowFree:        187656 kB

SwapTotal:      996020 kB

SwapFree:       996020 kB

Dirty:              44 kB

Writeback:           0 kB

Mapped:          95680 kB

Slab:            13104 kB

CommitLimit:   1237560 kB

Committed_AS:   153872 kB

PageTables:       1108 kB

VmallocTotal:   548564 kB

VmallocUsed:      9448 kB

VmallocChunk:   539044 kB

```

Of course the pc has recently been rebooted and the only "app" running is kde (i.e. user logged into kde).

----------

## eccerr0r

are you sure it's pausing on a disk?

Try typing 'mount' with no options to get a list of mount points, or cat /proc/mounts  Chances are you're hanging on an automount or nfs mount.

Disk failures tend to timeout and give that dreaded cryptic error message...

----------

## gnac

No, I'm not 100% sure its pausing/halting on a disk access.  The system has hung and crashed several times at different moments.  

One issue was the recurring crashing of Firefox.  The other was that Konqueror couldn't display items in certain folders, eg /home/user/, it just said "stalled" in the status bar.  Another item was then the hanging at the end of df.  Finally, the system crashed (completely froze) several times during an emerge (trying to upgrade firefox) and also during attempts to rsync files from this computer to another. 

Interestingly, It is not currently pausing on df (or mount).  This was after booting to a live cd, but I had rebooted several times due to the crashes beforehand.  I'm not in front of the pc to check konqueror for stalling atm.

----------

## thesheff17

running df and mount on the live cd is pointless.  You are running the entire os off the cd and wouldn't have any issues with it.  You should be doing these commands within the booted system.

----------

## gnac

 *thesheff17 wrote:*   

> running df and mount on the live cd is pointless.  You are running the entire os off the cd and wouldn't have any issues with it.  You should be doing these commands within the booted system.

 

Sorry, my original statement  *gnac wrote:*   

> Interestingly, It is not currently pausing on df (or mount). This was after booting to a live cd, but I had rebooted several times due to the crashes beforehand. I'm not in front of the pc to check konqueror for stalling atm.

  was misleading.  What I meant was that after I booted to the livecd, and then rebooted into the installed os, the df issue went away.  I doubt it had anything to do with booting the livecd as if the livecd fixed the problem somehow, I was just pointing out that I had the problem on successive reboots, but then it (at least the df hang) went away suddenly.

I think more telling is that the rsync worked fine on the livecd while it repeatedly crashed on the installed os, indicating an os issue as opposed to a hardware issue.

----------

## Hu

The df process can hang if you have an unresponsive mount.  This is not specific to df, but it is often one of the first processes to be affected, since df will (by default) stat each filesystem.  Attempting to stat the unresponsive mount hangs until the timeout occurs.  This is particularly noticeable when using CIFS mounts.  Depending on kernel version, I have seen the system enter a state where the CIFS mount never recovers.  If it happens again, check the state of the df process and note the contents of /proc/mounts.

----------

## gnac

>The df process can hang if you have an unresponsive mount. 

hmm, thats a good point.  Now that you mention that, I noticed on recent boots that the nfs file systems aren't mounting. reason being that permission was denied.  These were (now that I think about it) the mounts that did not appear in the df output, and I haven;t changed the nfs configurations on either machine lately.   

I don't know why all of a sudden the nfs stopped mounting.  I can mount them as root post boot and nf/mount don't hang atm.  worth looking into... ty

----------

## gnac

I think I found the cause of the df hang and Konqueror stall, but it still strikes me as a bug.

This computer has two nfs mounts to a locally networked pc.  If those connections are broken for some reason, eg nfs share pc is disconnected, konqueror will stall when trying to read a users home directory, and df will hang when checking the mounts.

I have tested this by ensuring the mounts are working, and then shutting down the nfs computer.  This causes the problem.  Restarting the nfs pc will restore functionality.

So, the question remains, shouldn't df and konqueror, or even fstab or whatever mounting daemon, be smart enough to overcome the very likely possibility  that a network share has been disconnected???

----------

