Operating System - HP-UX
1848575 Members
6759 Online
104033 Solutions
New Discussion

HP-UX 11.OO: ksh hangs on automounted home directory

 
John Ross_1
Occasional Advisor

HP-UX 11.OO: ksh hangs on automounted home directory

I have a user who has csh as his default shell, and automounts his home directory. Everything works fine for him until he does a 'ksh', which hangs.
My personal login has a /home automount from the same server, but I have /bin/ksh as my default shell. Ksh works fine. Even runing 'ksh' from within my ksh works fine.
I have seen the ksh history file location workaround and I also already have a ksh cumulative patch installed that I have seen in similary issues.
Any idea why this is hanging all of a sudden?
10 REPLIES 10
Dave Olker
Neighborhood Moderator

Re: HP-UX 11.OO: ksh hangs on automounted home directory

Hi John,

There could be any number of reasons why this would hang. If you suspect this is an NFS file locking problem (i.e. the decades old ksh history file problem) then the best way to prove this would be to collect a network trace of the ksh hang using nettl or ethereal and post the raw trace file for people to analyze.

The trace should at least show if NFS file locking is involved and could potentially show why the file lock is failing. However, if this is a file locking hang problem we may need to collect more data to get to the root cause of the hang.

Regards,

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Steven E. Protter
Exalted Contributor

Re: HP-UX 11.OO: ksh hangs on automounted home directory

Shalom John,

I would suggest permission issues on the NFS side of the equation. There could be issues with NFS itself.

To ber certain, you might want to add an environment dump to a local filesystem like /tmp to his profile.

Try making your user id csh default for one boot and see if the behavior repeats itself. If yes, try the csh with a local home directory.

These tests will at least let you define what the problem is.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: HP-UX 11.OO: ksh hangs on automounted home directory

Shalom,

There were patches for all the major shells released during the past few years. Might want to make sure they are in.

I didn't see Dave's reply before my first post, but saw it before this. His ideas are likely better than mine in this area.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
John Waller
Esteemed Contributor

Re: HP-UX 11.OO: ksh hangs on automounted home directory

John,
I had exactly the same issue a couple of years ago and the problem was down to the .sh_history. Apparantly there is an issue with .sh_history and lockd. I found the solution was to modify the users .profile and at the top point the HISTFILE to /tmp/.sh_.??

The downside was that the history was only kept for the current session, the plus side was I could write a root cron job which performed a:
find /tmp -name ".sh-*" -mtime +2 -exec rm {} \;
to clean up the old history files
Victor Fridyev
Honored Contributor

Re: HP-UX 11.OO: ksh hangs on automounted home directory

Hi,

I agree with John, the problem with sh/ksh hang can be resolved by redirection of HISTFILE to a local file system.

HTH
Entities are not to be multiplied beyond necessity - RTFM
John Waller
Esteemed Contributor

Re: HP-UX 11.OO: ksh hangs on automounted home directory

John,
Forgot to mention, that prior to the first occurance we had been running that way for ages and I could never find out what caused the issue. I believed it was something on the remote server because if I stopped all networking and nfs jobs including inetd,on the remote machine then restarted it would work again. Once it was fixed on the remote server it would work fine again for a couple of weeks then happen again. Also once it happened for one user, all other users would have the problem.
RAC_1
Honored Contributor

Re: HP-UX 11.OO: ksh hangs on automounted home directory

Many things to look at.
1 how exactly he starts ksh?
2 .sh_history location as advised by others
3 Can user manullay cd to automount home dir of his?
4 tusc -vfp "ksh"
There is no substitute to HARDWORK
RAC_1
Honored Contributor

Re: HP-UX 11.OO: ksh hangs on automounted home directory

Many things to look at.
1 how exactly he starts ksh?
2 .sh_history location as advised by others
3 Can user manullay cd to automount home dir of his?
4 tusc -vfp "ksh"
5 Anything in .profile or /etc/profile that stops, when he tried to do ksh??
There is no substitute to HARDWORK
Alexander Skwar
Frequent Advisor

Re: HP-UX 11.OO: ksh hangs on automounted home directory

Has one of the NFS servers be renamed? You might wish to try cleaning the /var/statmon/sm.bak directory and restarting NFS.
John Ross_1
Occasional Advisor

Re: HP-UX 11.OO: ksh hangs on automounted home directory

Thanks for all of the hints. Sorry I haven't awarded points yet, but I got sidetracked from this issue, so I haven't fixed it yet.