You are not logged in.
Pages: 1
Hi,
I have got a strange problem. Sometimes I cannot ls my home (i.e. ls ~). It just does not print an output. However, I can cat files in home and I can cat/ls any folder other than home. It seems to happen primarily upon resume from suspend. I use s2disk via pm-suspend.
The strange things is that root can ls my home (i.e. "sudo ls ~" will work). I have tried to kill every process run by my user but it does not solve the problem. (Neither does a simple logout but I guess that would be equivalent to kill all processes). The only "solution" is to reboot, which is rather annoying
Does anybody have any clue on what might cause this?
Thanks,
Rasmus
Arch x64 on Thinkpad X200s/W530
Offline
No idea why this might happen, but a couple of things come to mind to narrow down the problem:
Is /home mounted as a separate volume, and if so, does re-mounting it help? Does ls -l /home give the expected output after the problem occurs?
Offline
I can't run ls -l as my ordinary user. It is fine as root:
Pank:rasmus:[~] $ sudo ls -l
total 228
lrwxrwxrwx 1 rasmus users 16 Sep 21 23:47 backup -> /mnt/nas/backup/
drwxr-xr-x 3 rasmus users 4096 Oct 26 10:00 bin
drwxr-xr-x 28 rasmus users 4096 Oct 25 22:13 build
drwxr-xr-x 2 rasmus users 4096 Oct 24 10:42 Desktop
drwxr-xr-x 10 rasmus users 4096 Oct 27 11:10 documents
drwxr-xr-x 14 rasmus users 4096 Oct 26 22:20 download
-rwxr-xr-x 1 rasmus users 992 Jan 18 2010 EBJKS.ebjkeystore
drwxr-xr-x 5 rasmus users 4096 Oct 10 13:09 images
drwxr-xr-x 4 rasmus users 4096 Oct 9 02:44 mail
-rw-r--r-- 1 rasmus users 24784 Oct 24 14:31 man2.pdf
lrwxrwxrwx 1 rasmus users 15 Sep 21 23:47 music -> /mnt/nas/music/
drwxr-xr-x 4 rasmus users 4096 Oct 20 14:37 News
lrwxrwxrwx 1 rasmus users 16 Sep 21 23:47 photos -> /mnt/nas/photos/
-rw-r--r-- 1 rasmus users 85229 Oct 23 16:16 pic2.jpg
-rwxr-xr-x 1 rasmus users 70674 Sep 16 23:49 rasmus.jpg
drwxrwxrwx 3 rasmus users 4096 Oct 2 19:53 shared
drwxr-xr-x 15 root root 4096 Oct 10 00:07 site-lisp
lrwxrwxrwx 1 rasmus users 15 Sep 21 23:47 video -> /mnt/nas/video/
Running df as user and root gives me
Pank:rasmus:[~] $ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 10240 196 10044 2% /dev
/dev/disk/by-uuid/29116419-3869-449c-a8e8-bde9a9d52ceb
30612984 5566160 23491952 20% /
shm 1974428 198600 1775828 11% /dev/shm
/dev/sda1 101086 23868 71999 25% /boot
/dev/sda4 207580784 15540376 181495928 8% /home
but it stops after sda4 and I have to quit it with ^C. This is true for ordinary user/sudo and su. It apparently stops before swap, which I guess indicates that the problem is somehow related to suspend, eh?
Apparently swap is not mounted, and trying to mount it gives me
Pank:rasmus:[~] $ sudo mount /dev/sda2
mount: mount point swap does not exist
This is the line from my fstab
UUID=b0932160-948a-4e14-9a62-061823380379 swap swap defaults 0 0
I just recently switched to a swap partition instead of a file, but the swap disk is set up by arch installer (i.e. the usb installer).
I appreciate any input.
--Rasmus
Arch x64 on Thinkpad X200s/W530
Offline
Running df as user and root gives me
Pank:rasmus:[~] $ df Filesystem 1K-blocks Used Available Use% Mounted on udev 10240 196 10044 2% /dev /dev/disk/by-uuid/29116419-3869-449c-a8e8-bde9a9d52ceb 30612984 5566160 23491952 20% / shm 1974428 198600 1775828 11% /dev/shm /dev/sda1 101086 23868 71999 25% /boot /dev/sda4 207580784 15540376 181495928 8% /home
but it stops after sda4 and I have to quit it with ^C. This is true for ordinary user/sudo and su.
I'd be interested to see the output of 'strace df'. Does executing 'mount', etc. hang similarly? Is there any output in dmesg relating to filesystem / disk access problems?
Apparently swap is not mounted, and trying to mount it gives me
Pank:rasmus:[~] $ sudo mount /dev/sda2 mount: mount point swap does not exist
I don't believe directly mounting swap is possible. Use swapon / swapoff for this and available swap-space can be checked with 'free'.
This is the line from my fstab
UUID=b0932160-948a-4e14-9a62-061823380379 swap swap defaults 0 0
I just recently switched to a swap partition instead of a file, but the swap disk is set up by arch installer (i.e. the usb installer).
The second field, (fs_file), describes the mount point for the filesystem. For swap partitions, this field should be specified as `none'.
Though I doubt this is the cause of the problems.
Offline
what are the permissions on your home-directory itself (not the stuff in in it). I guess r or x is missing for your user
Offline
what are the permissions on your home-directory itself (not the stuff in in it). I guess r or x is missing for your user
chmod is 0700 and owner is rasmus:users.
I'd be interested to see the output of 'strace df'. Does executing 'mount', etc. hang similarly? Is there any output in dmesg relating to filesystem / disk access problems?
I post this info next time it happens. I had to reboot the computer.
Thanks a bunch,
Rasmus
Arch x64 on Thinkpad X200s/W530
Offline
I'd be interested to see the output of 'strace df'. Does executing 'mount', etc. hang similarly? Is there any output in dmesg relating to filesystem / disk access problems?
Here is the output of strace df
Pank:rasmus:[~] $ strace df
execve("/bin/df", ["df"], [/* 60 vars */]) = 0
brk(0) = 0xc37000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f96c772a000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=102979, ...}) = 0
mmap(NULL, 102979, PROT_READ, MAP_PRIVATE, 5, 0) = 0x7f96c7710000
close(5) = 0
open("/lib/libc.so.6", O_RDONLY) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\355\1\0\0\0\0\0"..., 832) = 832
fstat(5, {st_mode=S_IFREG|0755, st_size=1416464, ...}) = 0
mmap(NULL, 3525480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7f96c71b0000
mprotect(0x7f96c7303000, 2097152, PROT_NONE) = 0
mmap(0x7f96c7503000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x153000) = 0x7f96c7503000
mmap(0x7f96c7508000, 19304, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f96c7508000
close(5) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f96c770f000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f96c770e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f96c770d000
arch_prctl(ARCH_SET_FS, 0x7f96c770e700) = 0
mprotect(0x7f96c7503000, 16384, PROT_READ) = 0
mprotect(0x7f96c772b000, 4096, PROT_READ) = 0
munmap(0x7f96c7710000, 102979) = 0
brk(0) = 0xc37000
brk(0xc58000) = 0xc58000
open("/usr/lib/locale/locale-archive", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=1789536, ...}) = 0
mmap(NULL, 1789536, PROT_READ, MAP_PRIVATE, 5, 0) = 0x7f96c7558000
close(5) = 0
open("/etc/mtab", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=484, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f96c7729000
read(5, "proc /proc proc rw,relatime 0 0\n"..., 4096) = 484
read(5, "", 4096) = 0
close(5) = 0
munmap(0x7f96c7729000, 4096) = 0
statfs("/sys", {f_type="SYSFS_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
statfs("/dev", {f_type=0x1021994, f_bsize=4096, f_blocks=2560, f_bfree=2513, f_bavail=2513, f_files=493308, f_ffree=492341, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
open("/usr/share/locale/locale.alias", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f96c7729000
read(5, "# Locale name alias data base.\n#"..., 4096) = 2570
read(5, "", 4096) = 0
close(5) = 0
munmap(0x7f96c7729000, 4096) = 0
open("/usr/share/locale/en_DK.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_DK.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_DK/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 4), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f96c7729000
write(1, "Filesystem 1K-blocks "..., 67Filesystem 1K-blocks Used Available Use% Mounted on
) = 67
write(1, "udev 10240 "..., 61udev 10240 188 10052 2% /dev
) = 61
statfs("/", {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=7653246, f_bfree=6253122, f_bavail=5864404, f_files=1930656, f_ffree=1732289, f_fsid={-254150271, 2003352721}, f_namelen=255, f_frsize=4096}) = 0
write(1, "/dev/disk/by-uuid/29116419-3869-"..., 55/dev/disk/by-uuid/29116419-3869-449c-a8e8-bde9a9d52ceb
) = 55
write(1, " 30612984 "..., 58 30612984 5600496 23457616 20% /
) = 58
statfs("/dev/pts", {f_type="DEVPTS_SUPER_MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
statfs("/dev/shm", {f_type=0x1021994, f_bsize=4096, f_blocks=493607, f_bfree=465125, f_bavail=465125, f_files=493607, f_ffree=492430, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
write(1, "shm 1974428 "..., 65shm 1974428 113928 1860500 6% /dev/shm
) = 65
statfs("/boot", {f_type="EXT2_SUPER_MAGIC", f_bsize=1024, f_blocks=101086, f_bfree=77218, f_bavail=71999, f_files=26104, f_ffree=26068, f_fsid={-1062698542, -1184290760}, f_namelen=255, f_frsize=1024}) = 0
write(1, "/dev/sda1 101086 "..., 62/dev/sda1 101086 23868 71999 25% /boot
) = 62
statfs("/home", {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=51895196, f_bfree=50096109, f_bavail=47459989, f_files=13180928, f_ffree=13123614, f_fsid={-1587381696, 311860005}, f_namelen=255, f_frsize=4096}) = 0
write(1, "/dev/sda4 207580784 "..., 62/dev/sda4 207580784 7196348 189839956 4% /home
) = 62
statfs("/mnt/nas/download",
^C <unfinished ...>
So, using strace I was able to figure out the 'bug'. The thing was that the my user still believed that my home nfs drives were attached. The funny thing is I have configured a script to take them down in netcfg, but I guess it forgets because it is still connected when hibernated and my home network cannot be reached when I turn it on.
I needed to use umount -fl to remove the nfs drives.
But can anybody tell me why my user is sensitive to these drives while e.g. root is not?
I use the following command to mount drives
mount.nfs $HOST_TO_CHECK:/mnt/data/download /mnt/nas/download -w -o nolock,relatime,defaults || :
And I use(d) the following command to umount
umount.nfs -f /mnt/nas/video l > /dev/null 2>&1 || :
But I changed it to
umount -fl /mnt/nas/video l > /dev/null 2>&1 || :
Any obvious bugs in my way of conducting 'business'? Would you guys argue for running netcfg down ex ante hibernating?
Thanks for the tips,
Rasmus
Arch x64 on Thinkpad X200s/W530
Offline
But can anybody tell me why my user is sensitive to these drives while e.g. root is not?
This is wierd. Another line of thought which could be taken here is that it's specific to the environment, not so much to the user. The environment is, by default, largely reset by sudo. Also, executing '/bin/ls /home/<USER>' explicitly as that user (again, in an attempt to migitate effects of the user's environment and any aliases) might yield interesting results.
I use the following command to mount drives
mount.nfs $HOST_TO_CHECK:/mnt/data/download /mnt/nas/download -w -o nolock,relatime,defaults || :
[...]
umount -fl /mnt/nas/video l > /dev/null 2>&1 || :
Any obvious bugs in my way of conducting 'business'? Would you guys argue for running netcfg down ex ante hibernating?
This all seems reasonable to me. I can only suggest to ensure that it is being executed during suspend.
Last edited by chpln (2010-10-28 09:36:08)
Offline
This is wierd. Another line of thought which could be taken here is that it's specific to the environment, not so much to the user. The environment is, by default, largely reset by sudo. Also, executing '/bin/ls /home/<USER>' explicitly as that user (again, in an attempt to migitate effects of the user's environment and any aliases) might yield interesting results.
It should only be the almost default
Pank:rasmus:[~] $ grep ls .bashrc
alias ls='ls --color=auto'
alias lst='find -maxdepth 1 -type f -mtime -1 -printf "%T@-%Tk:%TM - %f\n" | sort -rn | cut -d- -f2-'
else
sudo ls is "clean". But then again, ls is probably a symptom rather than a cause.
Am I not aware of an easy way to compare entire environments. Are there any?
This all seems reasonable to me. I can only suggest to ensure that it is being executed during suspend.
Thanks
Arch x64 on Thinkpad X200s/W530
Offline
alias ls='ls --color=auto'
Results from this will be dependant on $PATH, $PWD, the correct expansion of the alias itself, and (no doubt) several other things.
sudo ls is "clean". But then again, ls is probably a symptom rather than a cause.
Indeed, though ls does make a handy tool for testing out the scope of the problem. The cause at this stage is still very much a mystery to me.
On that note, does 'ls' yield an exit status of zero when it fails?
Am I not aware of an easy way to compare entire environments. Are there any?
Try 'set'.
Last edited by chpln (2010-10-28 10:44:10)
Offline
How about your startup scripts?
In bash, does your .bashrc file have anything in it pertaining to your nfs drives?
I know that in zsh there is a .zlogin file that could do be set up to mount such volumes. (I'm more familiar with zsh than bash, so don't know if there's something similar in bash or not!)
HTH
Knute
Offline
Any chance you are using fuse (user file systems like sshfs ?)
also, what happens if you use \ls ?
Last edited by ewaller (2010-10-29 21:48:08)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Pages: 1