Operating System - HP-UX
1847188 Members
3583 Online
110263 Solutions
New Discussion

Re: malloc failure during swremove operation

 
SOLVED
Go to solution
Jeff Davis_3
New Member

malloc failure during swremove operation

Hi,

Please bear with me... I'm relatively new at HP-UX administration. :)

I'm trying to swremove a package that was built by my company, and getting a malloc error. Here is a portion of the swremove output (I've removed the package names because we're under NDA)...
==============================================

* Session started for user "root@fe1".

* Beginning Selection
* Target connection succeeded for "fe1:/".
* Software selections:
(...)
* Selection succeeded.


* Beginning Analysis
* Session selections have been saved in the file
"/.sw/sessions/swremove.last".
ERROR: "fe1:/": Could not allocate memory on this remote host during
task initialization, analysis or execution -- malloc()
failed.


==============================================
So I checked the agent logfile, as recommended in the error message, and it suggested that the memory management system might be corrupted.... This would make sense, as we have 2GB of memory on this system and basically nothing else is running...
==============================================

ERROR: Internal Error from SOL in function
"IA_CheckSparseDepsRemove". This could be due to a memory
allocation error.
ERROR: Cannot allocate memory. Either there is no memory available
or the memory management system is corrupted.
ERROR: Cannot continue the Analysis Phase until the previous errors
are corrected.

==============================================
So, my questions are two:
- Does this look like a corrupted memory manager problem to you guys?
- How does one go about replacing the corrupted memory manager?

Thanks a lot,
Jeff
the dude abides
9 REPLIES 9
A. Clay Stephenson
Acclaimed Contributor

Re: malloc failure during swremove operation

Hi Jeff:

There may well be nothing wrong other than maxdsiz is set rather small on the system. That would give you exactly the kind of error that you are seeing regardless of the amount of free memory in the box.
If it ain't broke, I can fix that.
Helen French
Honored Contributor

Re: malloc failure during swremove operation

Hi Jeff:

1) As Clay suggested, increasing 'maxdsiz' kernel parameter may solve your issue.

2) Another work around of malloc() error with SD-UX, is the file - /var/adm/sw/host_object. In this case, stop the swagentd daemon, move this file and start the swagentd again. It will re-create this file.

HTH,
Shiju
Life is a promise, fulfill it!
Jeff Davis_3
New Member

Re: malloc failure during swremove operation

Thanks for the quick responses... So I've changed the maxdsize kernel param to 512MB... Should I go larger? Also, what about the maxdsize_64bit (currently 1GB)... Would that affect swremove at all?

I also tried shutting down swagentd and moving the host object file. No change. It surprised me that both the old and new versions are zero-length. Is this supposed to be the case?

Thanks again,
Jeff
the dude abides
James R. Ferguson
Acclaimed Contributor

Re: malloc failure during swremove operation

Hi Jeff:

Remember that 'maxdsiz' is only a "fence". It keeps processes from gobbling memory for data segments without constraint. 'maxsiz' (for the stack) and 'maxtsiz' (for text (code)) functional analogously.

The values suffixed with "_64bit" are for 64-bit processes. Those without suffixes are for 32-bit processes.

Regards!

...JRF...
Jeffrey Davis_1
Frequent Advisor

Re: malloc failure during swremove operation

Hi Jeff. What a great name huh!
Jeff Davis_3
New Member

Re: malloc failure during swremove operation

:) Gotta love it...

So back to the second part of my question... I'm guessing that swremove could not be asking for more than 512MB of memory... Is this a fair assumption? If so, could it be that my memory manager is corrupted? How might I go about fixing that?

Thanks,
Jeff
the dude abides
Jeff Davis_3
New Member

Re: malloc failure during swremove operation

By the way, just for reference...

maxdsiz = 512MB
maxssiz = 8MB
maxtsiz = 64MB
maxusers = 128
the dude abides
S.K. Chan
Honored Contributor
Solution

Re: malloc failure during swremove operation

I may be wrong. Kernel parameter is one thing but the error message from SD can be sometimes very misleading. The
"IA_CheckSparseDepsRemove"
is actually a check to make sure that the product you're installing or removing in your case matches the dependents filesets on thee system. If it doesn't hence the error. It may be checking for "sparse" filesets on your system. Do a ..
# man 4 swpackage
for explaination of "sparse" as I'm not 100% sure myself. If the kernel tweaks does not work out, you may want to call HP.
Mateja Bezjak
Respected Contributor

Re: malloc failure during swremove operation

Hi Jeff,

S.K. Chan is right. This problem does have to do with product dependencies. The function is checking for sparse product's dependencies for swremove process. The following two rules must not be broken:
1. no patch left on the system without its base
2. under a no-rollback situation, a patch cannot be removed without also removing its base.

Regards,
Mateja