Tuesday, July 13, 2010
zones: TTYsrch Issues Within Zones
Symptoms such as process-related commands like "ps", "ps -ef", "ptree", "pgrep" etc. were hanging and not completing. This had knock-on effects for utilities and applications which use the ps command, such as VCS, VxVM etc.
The above problem only occurred when one or more non-global zones was running on the system.
Root Cause:
Among other things, the ps command traverses the system "device tree" in /dev, to link processes with terminal devices. Such searches are optimized using the /etc/ttysrch file, which is like a PATH file for the /dev directory. If the required device is not found under one of the directories listed in the /etc/ttysrch file, it must do a recursive search of the whole /dev directory, which can take a long time. This is what was happening in the above case.
Root Cause:
Among other things, the ps command traverses the system "device tree" in /dev, to link processes with terminal devices. Such searches are optimized using the /etc/ttysrch file, which is like a PATH file for the /dev directory. If the required device is not found under one of the directories listed in the /etc/ttysrch file, it must do a recursive search of the whole /dev directory, which can take a long time. This is what was happening in the above case.
When non-global zones are running, the relevant terminal device files reside under the /dev/zcons directory. This entry was missing from the /etc/ttysrch file. It seems that servers installed with Solaris 10 to start with have this entry included in their ttysrch file, but on servers upgraded from Solaris 8 to 10 via Live Upgrade, this entry is missing. This would appear to be a bug in the Sun Live Upgrade process.
Fix:
Fix:
Add the entry "/dev/zcons" to the /etc/ttysrch file. See the following examples - last few lines of /etc/ttysrch in each case.
#
/dev/pts
/dev/term
/dev/xt
/dev/zcons
/dev/pts
/dev/term
/dev/xt
/dev/zcons
Labels:
Performance,
Zones
No comments:
Post a Comment