[sudo-users] sudo hang on bad SAMBA mount

Hassell, Bill bill.hassell at Fiserv.com
Mon Oct 1 14:06:03 EDT 2007


I am using a SAMBA server on RedHat to an HP-UX client and when the
share fails (due to a Redhat or SAMBA problem), sudo for the simplest
command on the client side (ie, sudo pwd) will hang, but eventually
complete after 10's to 100's of seconds. I've seen a similar question
concerning NFS hangs with sudo. So I did a tusc trace on sudo pwd and
discovered some unexplained lstat calls at the end, just before running
the pwd command:

 

open("/usr/lib/nls/loc/locales.2/C", O_RDONLY, 0) ........ ERR#2 ENOENT

open("/usr/lib/nls/msg/C/pwd.cat", O_RDONLY, 0177777) .... = 3

fstat(3, 0x79402570) ..................................... = 0

fcntl(3, F_SETFD, 1) ..................................... = 0

sysfs(GETFSIND, 0xc0137d60, 0x793ed200) .................. = 8

lstat(".", 0x794019a0) ................................... = 0

sysfs(0x5, NULL, 0x79401ac8) ............................. = 0

open("../", O_RDONLY|0x200000, 060100) ................... = 4

fstat(4, 0x794022d8) ..................................... = 0

fcntl(4, F_SETFD, 1) ..................................... = 0

sysfs(GETFSIND, 0xc013e690, 0xf3156040) .................. = 7

brk(0x4000a000) .......................................... = 0

getdents(4, 0x40005c88, 16384) ........................... = 5856

close(4) ................................................. = 0

open("../../", O_RDONLY|0x200000, 015310) ................ = 4

fstat(4, 0x794022d8) ..................................... = 0

fcntl(4, F_SETFD, 1) ..................................... = 0

sysfs(GETFSIND, 0xc013e690, 0xf3156040) .................. = 7

sysfs(0x4, NULL, NULL) ................................... = 0

getmount_cnt(0x79402564) ................................. = 110

brk(0x4000b000) .......................................... = 0

mmap(NULL, 344520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
NULL) = 0x79387000

getmount_entries(0x4000a0a0, 110) ........................ = 110

brk(0x4000c000) .......................................... = 0

munmap(0x79387000, 344520) ............................... = 0

lstat("home", 0x79402360) ................................ ERR#2 ENOENT

getdents(4, 0x40005c88, 16384) ........................... = 7040

lstat("../../sybase12", 0x79402428) ...................... = 0

lstat("../../sybe2", 0x79402428) ......................... = 0

lstat("../../stand", 0x79402428) ......................... = 0

lstat("../../tmp", 0x79402428) ........................... = 0

lstat("../../var", 0x79402428) ........................... = 0

lstat("../../spool", 0x79402428) ......................... = 0

lstat("../../opt", 0x79402428) ........................... = 0

lstat("../../usr", 0x79402428) ........................... = 0

lstat("../../sbin", 0x79402428) .......................... = 0

lstat("../../.ssh", 0x79402428) .......................... = 0

lstat("../../IZ014a", 0x79402428) ........................ = 0

 

... a dozen other locations deleted from this list ...

 

lstat("../../ishome", 0x79402428) ........................ = 0

lstat("../../home", 0x79402428) .......................... = 0

close(4) ................................................. = 0

open("../../../", O_RDONLY|0x200000, 015310) ............. = 4

fstat(4, 0x794022d8) ..................................... = 0

fcntl(4, F_SETFD, 1) ..................................... = 0

sysfs(GETFSIND, 0xc013e690, 0xf3156040) .................. = 7

close(4) ................................................. = 0

/home/blh

write(1, "/ h o m e / b l h \n", 10) ..................... = 10

exit(0) .................................................. WIFEXITED(0)

 

The question is: why is this odd collection of directories being
lstat'ed?  Some are local mountpoints, some are part of the / directory
but the strange part is that this is not a complete list of mount
points. Where did this list come from, or how was this list formed
inside sudo? If I can get sudo to ignore NFS or SAMBA/CIFS shares, it
shouldn't hang anymore.

 

Bill




More information about the sudo-users mailing list