1836444 Members
2530 Online
110100 Solutions
New Discussion

Re: ls -laR hangs in /

 
moonchild
Regular Advisor

ls -laR hangs in /

on a rp8420 running 11.11

ls -laR hangs in /

Syslog has no errors.

ll / is running fine but when I am running ll -R / I face the same problem. I tried ll -R on other mount point and the result was same.

No nfs mount point exist on server.

Any ideas?
Thanks in advance
12 REPLIES 12
A. Clay Stephenson
Acclaimed Contributor

Re: ls -laR hangs in /

Eventhough you say there are no NFS mount points, is it possible that the automounter is running and you are generating a mount storm?


The most likely explanation is that you have a set on symbolic links that are cross-linked and thus looping endlessly.

What happens if you do a find . -print from /? Do it get to some point and appear to hang?
If it ain't broke, I can fix that.
Dennis Handly
Acclaimed Contributor

Re: ls -laR hangs in /

>Clay: What happens if you do a find . -print from /? Do it get to some point and appear to hang?

Are you expecting find(1) to get in a symlink loop, or only ls -R?
$ find SUB -follow -print
SUB
SUB/SUB2
find: SUB/SUB2/FOO creates a cycle
SUB/SUB2/FOO

I was able to get ll -RL to loop but it stopped when the line was long or depth 43?:
SUB/SUB2/FOO/SUB2/FOO/.../SUB2/FOO not found
Peter Nikitka
Honored Contributor

Re: ls -laR hangs in /

Hi,

examine the point, where your command stops, very carefully. Dividing up your command like this may help:
cd /
for d in .??*
do
print === $d =====
ls -goR $d >/dev/null
# ls -goR $d
done

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Ralph Grothe
Honored Contributor

Re: ls -laR hangs in /

How far does -R traverse?
Do you get any listing up to a certain directory?
If so, could it be that ls cannot stat a certain filesystem because it might have become corrupt?
Do you have any stale extents in any of the mounted volumes?
Madness, thy name is system administration
moonchild
Regular Advisor

Re: ls -laR hangs in /

we just tried running it on the console and it worked fine.

We are looking into networking patches

Will keep you posted

thanks all
Matti_Kurkela
Honored Contributor

Re: ls -laR hangs in /

Is the automounter (or autofs) running with default settings?

Type "mount": if you see "/net" in the list of mounted filesystems, automounter or autofs is running. Any attempt to read the listing of /net directory causes the automounter to search for NFS shares in your local network.

If NFS access is blocked by a firewall or IPfilter that just drops the NFS packets instead of sending the proper "connection refused" messages back, any attempt to access /net/* will hang a long time.

To completely disable the automounter, first run:
/sbin/init.d/nfs.client stop

then edit /etc/rc.config.d/nfsconf and make sure both AUTOMOUNT and AUTOFS are set to 0.

MK
MK
moonchild
Regular Advisor

Re: ls -laR hangs in /

if we use another terminal it hangs if we telnet from another hpux server and run the ll it hangs. only on console it does not.

other commands run from a remote system work fine.

root:rp8420# more exports
root:rp8420# pwd
/etc
root:rp8420# ll exp*
-rw-r----- 1 root sys 0 Nov 19 2004 exports
root:rp8420# root:rp8420# pwd



root:rp8420# ll xt*
-rw-r--r-- 1 root root 0 Aug 2 07:50 xtab
root:rp8420# cat xtab
root:rp8420#


root:rp8420# /usr/sbin/showmount -a
showmount: rp8420: RPC: Program not registered
root:rp8420#


root:rp8420# showmount -e
showmount: rp8420: RPC: Program not registered
root:rp8420# showmount -a
showmount: rp8420: RPC: Program not registered
root:rp8420# more /etc/exports
root:rp8420#


root:rp8420# cat /etc/xtab
root:rp8420# cd ..
root:rp8420# ll x*
-rw-r--r-- 1 root root 0 Aug 2 07:50 xtab
root:rp8420#

any suggestions?
Peter Nikitka
Honored Contributor

Re: ls -laR hangs in /

Hi,

it would really help, if you answered our questions.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
moonchild
Regular Advisor

Re: ls -laR hangs in /

when we type mount we see no /net

automount is set to 0
nfs too

once again when we run the command locally form the console it works fine.

if we use other protocols like ftp it works.

Re: ls -laR hangs in /

Do you get the problem regardless of whether you telnet/rlogin/ssh into the server, or is it just with one of these products you have a problem?

HTH

Duncan

I am an HPE Employee
Accept or Kudo

Re: ls -laR hangs in /

Something else to try:

on the console:

telnet 0

To connect locally - log in

Then try command again - does it now hang?

HTH

Duncan

I am an HPE Employee
Accept or Kudo
moonchild
Regular Advisor

Re: ls -laR hangs in /

ssh hangs as well