- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Unable to allocate memory
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2010 12:41 PM
тАО01-25-2010 12:41 PM
My process needs to allocate around 1GB memory and it does so using new operator.
Following are the system details:
HP-UX
Following is output from kmtune for data segment size:
kmtune | fgrep maxdsiz
maxdsiz 1073741824 Default Immed
maxdsiz_64bit 8589934592 8589934592 Immed
Following is the output of swampinfo command:
/usr/sbin/swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 4020 76 98% 0 - 1 /dev/vg00/lvol2
dev 10000 5207 4793 52% 0 - 1 /dev/vg01/lvol7
dev 16000 2699 13301 17% 0 - 1 /dev/vg01/lvol6
reserve - 17387 -17387
memory 18425 5344 13081 29%
total 48521 34657 13864 71% - 0 -
Following is the output of memprog command:
memprog
Memory Stat total used avail %used
physical 18424.9 18315.0 109.9 99%
active virtual 58409.2 3655.2 54754.0 6%
active real 7147.5 282.0 6865.5 4%
memory swap 18424.9 5344.4 13080.5 29%
device swap 30096.0 29319.2 776.8 97%
Following is the output from gdb:
gdb compile_ocp_holding_x core.compile_ocp_holding_x
Detected 64-bit executable.
Invoking /usr/ccs/bin/gdb64.
HP gdb 3.4 for PA-RISC 2.0 (wide), HP-UX 11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 3.4 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
Core was generated by `compile_ocp_holding_x'.
Program terminated with signal 11, Segmentation fault.
#0 0x400000000006fd54 in grow_arena+0x2b4 ()
(gdb) where
#0 0x400000000006fd54 in grow_arena+0x2b4 ()
#1 0x400000000006e2c4 in real_malloc+0x67c ()
#2 0x400000000006baf0 in _malloc+0x670 ()
#3 0x4000000000070c34 in malloc+0x1c4 ()
#4 0x400000000004f034 in operator new []+0x4c ()
#5 0x40000000000423b0 in generate_holding_owner_lookup_binary (load_dir=0x9fffffffe000180b "/tfsw/ocp/production/loadA",
rpt_file_name=0x9fffffffe0001829 "ocp_holding_reg.rpt", holding_indx_owner_x=0x800000010801ef48, rpt_file_num_rows=@0x9fffffffe0005c40)
at compile_ocp_holding_x.cc:339
#6 0x40000000000443f4 in generate_binaries (load_dir=0x9fffffffe000180b "/tfsw/ocp/production/loadA",
rpt_file_name=0x9fffffffe0001829 "ocp_holding_reg.rpt", start_addr_map=@0x9fffffffe0004838, num_rows_map=@0x9fffffffe0004898)
at compile_ocp_holding_x.cc:820
#7 0x4000000000044920 in main (argc=5, argv=0x9fffffffe0001000) at compile_ocp_holding_x.cc:895
(gdb)
Note that the program is 64 bit compiled using the following compilation/linking flags:
-Wl,+n,-a,archive -D_HPUX_SOURCE +DA2.0W
on the HP machine with following uname details:
HP-UX
Can somebody please tell me how to correct this allocation problem?
Thanks in advance!
-Shiv.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2010 12:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2010 04:15 PM
тАО01-25-2010 04:15 PM
Re: Unable to allocate memory
You should mention you are using Aries right away.
>Following is output from kmtune for data segment size:
>kmtune | fgrep maxdsiz => maxdsiz_64bit 8589934592
You should be using kctune(1m), not the obsolete kmtune(1m).
There should be two other kernel parms with "pa" for these two.
>Program terminated with signal 11, Segmentation fault.
#0 0x400000000006fd54 in grow_arena+0x2b4
Hmm, this should give an error return and not a signal. You may have heap corruption?
>-Wl,+n,-a,archive -D_HPUX_SOURCE +DA2.0W
You should be using +DD64 instead of the obsolete +DA2.0W.
>JRF: You need to add physical memory and/or more swap.
Unless the system was using more swap when it aborted, this will not help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-25-2010 04:29 PM
тАО01-25-2010 04:29 PM
Re: Unable to allocate memory
Oops, it appears these are only for the stack size:
pa_maxssiz_32bit pa_maxssiz_64bit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2010 04:57 AM
тАО01-26-2010 04:57 AM
Re: Unable to allocate memory
pa_maxssiz_[32|64]bit do not specify the stack size for PA-RISC processes - they determine size of ARIES managed area in application data segment... more details in aries(5) man page.
As suggested earlier, please add more physical memory and/or swap.
Regards
-Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2010 07:46 AM
тАО01-28-2010 07:46 AM
Re: Unable to allocate memory
Some more swap memory has been added as seen from the swapinfo command:
/usr/sbin/swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 1280 2816 31% 0 - 1 /dev/vg00/lvol2
dev 16000 1279 14721 8% 0 - 1 /dev/vg01/lvol6
dev 10000 1284 8716 13% 0 - 1 /dev/vg01/lvol7
dev 600 600 0 100% 0 - 1 /dev/vg01/lvol1
dev 400 400 0 100% 0 - 1 /dev/vg01/lvol4
reserve - 16837 -16837
memory 18425 3228 15197 18%
total 49521 24908 24613 50% - 0 -
Output of the memprog command:
memprog
Memory Stat total used avail %used
physical 18424.9 18329.9 95.0 99%
active virtual 36418.5 2934.2 33484.3 8%
active real 10393.0 1571.2 8821.8 15%
memory swap 18424.9 3228.4 15196.5 18%
device swap 31096.0 21686.2 9409.8 70%
I am testing my programs so see if the memory related problems are resolved.
Thanks for all you help!
Shiv.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2010 08:11 PM
тАО01-28-2010 08:11 PM
Re: Unable to allocate memory
You have essentially added nothing. 1 Gb isn't much in the scheme of things, 2%. :-)
>I am testing my programs so see if the memory related problems are resolved.
As I mentioned above, you may have heap corruption.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2010 07:58 AM
тАО02-03-2010 07:58 AM
Re: Unable to allocate memory
How can I perform heap corruption diagnostics? What are the tools available on IA64 HP machine?
Regards,
Shiv.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2010 08:12 AM
тАО02-03-2010 08:12 AM
Re: Unable to allocate memory
> How can I perform heap corruption diagnostics?
You need to use the debugger:
www.hp.com/go/wdb
On the upper right side of the web page is a link to documentation.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-03-2010 08:20 AM
тАО02-03-2010 08:20 AM
Re: Unable to allocate memory
I have gdb and following are the details:
HP gdb 5.9 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.9 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
Will this help in running the diagnostics? Also do I need a core file for running the diagnostics or I can simply run the exe file via gdb's run command and perform the diagnostics?
Thanks again for your help!
Regards,
Shiv.