patchadd failes with "resource temp. not available"
Hi,
I was trying to install the latest patches on a solaris 10 sparc system through updatemanager but it would always produce errors.
I eventually went to /var/sadm/spool, unziped one of the patches, and run
patchadd 119578-24
but I got something like
Pkgadd failed. See /var/tmp/119578-24.log.1468for details
At the bottom of 119578-24.log.1468 there is this message:
removef: ERROR: unable to open </var/sadm/install/contents>for reading
(errno 11: Resource temporarily unavailable)
pkgadd: ERROR: postinstall script did not complete successfully
Using lsof I can see that none else is using /var/sadm/install/contents (besides, it should still be able tor read it).
Also, the file is there allright and I can indeed read it.
Does anyone have a clue about what this is about?
Message was edited by:
aduitsis
[979 byte] By [
aduitsis] at [2007-11-26 9:43:02]

# 3
Hi.
I can't find any other reference to this error anywhere.
1)
Is /var/sadm/install/contents on a network drive (NFS etc)?
2)
Does patchadd work for any other patches?
It may be worthwhile running a truss over the patchadd process to see what's going on in a bit more detail, i.e.
# truss -fael -o /tmp/trussOut patchadd 119578-24
then have a look in /tmp/trussOut for anything odd.
# 5
Hmm, this is very strange. I rebooted the machine and, again, issued:
patchadd 119578-24
and I got:
Validating patches...
Loading patches installed on the system...
Done!
Loading patches requested to install.
Done!
Checking patches that you specified for installation.
Done!
Approved patches will be installed in this order:
119578-24
Checking installed patches...
Executing prepatch script...
Temporarily disabling fmd(1M)
Verifying sufficient filesystem capacity (dry run method)...
Installing patch packages...
Patch 119578-24 has been successfully installed.
See /var/sadm/patch/119578-24/log for details
Executing postpatch script...
Re-enabling fmd(1M)
Patch packages installed:
FJSVfmd
SUNWarc
SUNWckr
SUNWcsl
SUNWcsu
SUNWfmd
SUNWhea
Which is, well, perfect. And since this is not windows, where a reboot can magically solve problems, I can only theorize that in my previous attempt, somebody else (possibly a hang smpatch session for instance) could have issued something like flock on the file. What do you think? Perhaps when (and if) the problem reappears I could see whether it is locked using something like lsof.
Kind regards,
Athanasios
# 7
Well, my theory proved wrong. As the machine is a V120 with very little memory, apparently it was being overwhelmed during patchadd and kept failing.
I unloaded all non-neccessary services and tried again, and voila, it worked!
If there is one thing that we should keep in mind, it is the fact that the phase where the package information database in /var/sadm is updated is memory consuming.
Again, thanks very much for the help.
Regards,
Athanasios