Hello,

we stumbled over some mysterious errors of some applications.
An analysis showed that the applications had a filedescriptor #4 opened on
  [u]/var/sadm/install/.lockfile[/u]
Each affected application was running in global zone of Solaris 10u2. 

After a long run of discussion and analysis sessions between admins and 
developer we turned out with the idea this might be an inherited filedescriptor 
from pkgadd. To test this I've put the command
  [u]lsof -p $$[/u]
into a checkinstall script, build a new package and installed it.
And surprise - here is the output of lsof:
[pre]
COMMAND     PID USER   FD   TYPE DEVICE SIZE/OFF          NODE NAME
sh         7619 noaccess  cwd   VDIR  32,51      512             5 
/var/sadm/install
sh         7619 noaccess  txt   VREG  32,48    95488          2926 /sbin/sh
sh         7619 noaccess  txt   VREG  32,48    41088         21420 
/lib/libgen.so.1
sh         7619 noaccess  txt   VREG  32,48    24996        227407 
/usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.3
sh         7619 noaccess  txt   VREG  32,48  1259500          2318 
/lib/libc.so.1
sh         7619 noaccess  txt   VREG  32,48    16856          6082 
/platform/sun4u/lib/libc_psr.so.1
sh         7619 noaccess  txt   VREG  32,48   253456          2185 /lib/ld.so.1
sh         7619 noaccess    0r  VCHR   13,2                6815752 
/devices/pseudo/mm at 0:null
sh         7619 noaccess    1w  VCHR   22,0               11534340 
/devices/pseudo/sy at 0:tty
sh         7619 noaccess    2w  VCHR   22,0               11534340 
/devices/pseudo/sy at 0:tty
[b]sh         7619 noaccess    3r  VREG               0 1464583847938 
/src/pkg/AKo-Test-5.8.6.pkg
sh         7619 noaccess    4u  VREG  32,51      128            10 
/var/sadm/install/.lockfile
sh         7619 noaccess    6r  VCHR   13,2                6815752 
/devices/pseudo/mm at 0:null
sh         7619 noaccess    7w  VCHR   22,0               11534340 
/devices/pseudo/sy at 0:tty
sh         7619 noaccess   19r  VREG  32,51     1547         35270 
/var/tmp/installGMaq4o/checkinstallIMaq4o[/b][/pre]

Is there any reason that filedescriptors 3, 4, 6, 7 and 19 are open during 
checkinstall run?
(numbers vary from time to time)
While installing a local zone, postinstall of pkg files to be installed will 
get an filedescriptor inherited as open on
[u]<zonepath>/root/var/sadm/install/.lockfile[/u]
Well, in our case it was filedescriptor #3, which put our applications into 
trouble.

If there is no reason for filedescritors >2 beeing open during execution of 
checkinstall or postinstall (and I'm sure there is none!), then this must be 
considered as an error!
 
 
This message posted from opensolaris.org

Reply via email to