- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: SIGBUS Error
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
тАО03-10-2009 12:07 PM
тАО03-10-2009 12:07 PM
The SIGBUS is happening when the memory (allocated as new SomeClass[]) is de-allocated using delete[]. Note that the memory that the system tries to allocate could be as high as 1541262816 bytes.
Following are the details of the machine I am having the SIGBUS error:
$uname -a
HP-UX ocpdev1 B.11.11 U 9000/800 ocpdev1 unlimited-user license
Following are some of the kernel parameters (output from kmtune):
Parameter: maxdsiz
Current: 1073741824
Planned: 1073741824
Default: 0x10000000
Parameter: maxdsiz_64bit
Current: 8589934592
Planned: 8589934592
Default: 0x0000000040000000
Parameter: maxfiles
Current: 260
Planned: 260
Default: 60
Parameter: maxfiles_lim
Current: 1024
Planned: 1024
Default: 1024
Parameter: maxssiz
Current: 134217728
Planned: 134217728
Default: 0x00800000
Parameter: maxssiz_64bit
Current: 268435456
Planned: 268435456
Default: 0x00800000
Parameter: maxtsiz
Current: 134217728
Planned: 134217728
Default: 0x04000000
Parameter: maxtsiz_64bit
Current: 0x40000000
Planned: 0X40000000
Default: 0x0000000040000000
1) Can somebody please explain the meaning of the above mentioned kernel parameters?
2) Do these parameters require any change? Are there any change?
3) Are there any side effects by increasing/decreasing these parameters?
4) Should I look at any other parameters?
Output of ulimit:
$ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 1048576
stack(kbytes) 131072
memory(kbytes) unlimited
coredump(blocks) 4194303
Thanks in advance!
-Shiv
Solved! Go to Solution.
- Tags:
- SIGBUS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2009 12:28 PM
тАО03-10-2009 12:28 PM
SolutionA SIGBUS error is a memory access error that occurs when your program tries to point to an invalid memory address. A NULL pointer is one example. This is a program bug.
As for the kernel parameters mentioned, the manpages (for 11.23 for example) offer some good descriptions. The 'maxdsiz' parameters control the size of data segments (the heap and what you 'malloc()'). The 'maxxsiz' parameters fence the stack size for your program. The 'maxtsiz' parameter controls the maxiumum text (instruction) size. The ones labeled 64-bit are for 64-bit processes; those without the "64" are for 32-bit processes.
The 'maxfiles' and 'maxfiles_lim' do not relate to memory but rather to the maxiumum number of file descriptors a process may have. The first is the "soft" limit; the second is the "hard" limit.
Regards!
...JRF...
- Tags:
- maxdsiz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2009 12:42 PM
тАО03-10-2009 12:42 PM
Re: SIGBUS Error
Thanks for your reply.
The program did allocate memory using new and did its job, but it failed while delet[]'ing this memory. This is what is bothering me. If it did allocate, then why should it give a SIGBUS while deleting it.
Note that the memory that the program tries to allocate could be as high as 1541262816 bytes. There are other objects that are allocated and yet to be deleted when this memory is being allocated.
From the details that I provided, do I have to change any of the kernel parametes?
Thanks again!
-Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-10-2009 04:13 PM
тАО03-10-2009 04:13 PM
Re: SIGBUS Error
Then you have corrupted the heap.
Do you have a stack trace of your signal?
>Note that the memory that the program tries to allocate could be as high as 1.541 Gb.
Unless you link with -N, or compile with +DD64, you can't get bigger than 1 Gb.
>From the details that I provided, do I have to change any of the kernel parameters?
Is this a 64 bit application? If not, your maxdsiz is too small.
Otherwise, you have to debug your application. See the following how to use gdb:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1320687
- Tags:
- heap corruption
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2009 07:22 AM
тАО03-11-2009 07:22 AM
Re: SIGBUS Error
Thanks for your reply.
Following are the compiler options that are used in the project:
-g -Wl,+n,-a,archive -D_HPUX_SOURCE +DA2.0W
I am not sure what does the option +n in -Wl,+n mean. Sometimes I see -Wl,+s also. I am not sure what +s option means here.
Based on above information, can you give some suggestions?
Thanks
Shiv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2009 12:27 PM
тАО03-11-2009 12:27 PM
Re: SIGBUS Error
-g -Wl,+n,-a,archive +DA2.0W
You are 64 bit. But you should replace the obsolete +DA2.0W by +DD64. You probably should also split up the two linker options:
-Wl,+n -Wl,-a,archive
>I am not sure what does the option +n in -Wl,+n mean. Sometimes I see -Wl,+s also.
Look at ld(1) for +n (keep scanning archives) and +s (allow SHLIB_PATH/LD_LIBRARY_PATH).
>can you give some suggestions?
Again, download wdb and debug the heap corruption as in the above URL.