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]
# 1
Hi.Could you post an ls -l of the /var/sadm/install/contents file# ls -l /var/sadm/install/contents
ForumModerator at 2007-7-7 0:43:13 > top of Java-index,Administration Tools,Sun Update Connection-System...
# 2
Right, here goes:-rw-r--r--1 rootroot25666098 Aug 25 14:15 /var/sadm/install/contents
aduitsis at 2007-7-7 0:43:13 > top of Java-index,Administration Tools,Sun Update Connection-System...
# 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.

ForumModerator at 2007-7-7 0:43:13 > top of Java-index,Administration Tools,Sun Update Connection-System...
# 4

It is not on nfs. Patchadd does not work for any other patch. In fact, I cannot patch the machine in any way for the time being.

I was hoping that I would not have to resort to truss but unfortunately there are no other ideas. I 'll try it on monday and update on this thread.

Many thanks,

Athanasios

aduitsis at 2007-7-7 0:43:13 > top of Java-index,Administration Tools,Sun Update Connection-System...
# 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

aduitsis at 2007-7-7 0:43:13 > top of Java-index,Administration Tools,Sun Update Connection-System...
# 6
Your theory may well be right, I suppose if it happens again it may be possible to look into it further. I think this was more an OS related problem than an issue with the patch tools though. The contents file is used by the likes of pkgadd as well.
ForumModerator at 2007-7-7 0:43:13 > top of Java-index,Administration Tools,Sun Update Connection-System...
# 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

aduitsis at 2007-7-7 0:43:13 > top of Java-index,Administration Tools,Sun Update Connection-System...