- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to fix a SIGBUS fault
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
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
тАО04-14-2009 03:30 AM
тАО04-14-2009 03:30 AM
I am trying to port an application from TRU64 to HPUX. When running the migrated application on HPUX, I am getting a SIGBUS signal and the application core dumps. Did some reading .. it seems this is caused by "unaligned access". The call which is failing is a TUXEDO function "tpcall()". Would be great if any could guide me in what is wrong here and how to fix this ..
Thanks in advance..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2009 03:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2009 04:12 AM
тАО04-14-2009 04:12 AM
Re: How to fix a SIGBUS fault
When i open the core with gdb, it says : "BUS_ADRALN - Invalid address alignment.". Also there is a link to a doc that explains some pragmas related to data alignment. Reading those right now ....
>>Are you using any misaligned data structures?
The data structures used in this particular call are Tuxedo data structures (i.e. FBFR32) and data in these structures is populated using Tuxedo calls (Fadd32). Is there any thing I should look out for .. that might indicate that these are misaligned ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2009 04:23 AM
тАО04-14-2009 04:23 AM
Re: How to fix a SIGBUS fault
Then you have misaligned data or a garbage pointer value.
>Is there any thing I should look out for that might indicate that these are misaligned.
Seeing pragma pack in the source.
Can you provide a stack trace of the abort. Are you calling tpcall directly? Is the misaligned address related to a parm you are passing?
You could use a hammer and just call allow_unaligned_data_access:
http://docs.hp.com/en/14487/pragmas.htm#pragma-pack-ex3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2009 05:32 AM
тАО04-14-2009 05:32 AM
Re: How to fix a SIGBUS fault
Fixed the issue!! In the tpcall(), one of the parameters is a long *. But in the code, the variable that was passed, was declared as FLDLEN32 and cast to a long. The compiler was giving a warning related to "trying to cast to a more strongly aligned type". Changed the declaration of the variable from FLDLEN32 to long and it worked!!
Still I was wondering why it didnt give any problems on TRU64. I found this: (http://gcc.gnu.orgml/gcc/2005-02/msg00892.html). This guy says that unaligned access is handled by the OS itself in TRU64, but not in HPUX.
Thanks for the help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2009 05:40 AM
тАО04-14-2009 05:40 AM
Re: How to fix a SIGBUS fault
HP-UX will do it but you have to call allow_unaligned_data_access.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2009 06:21 AM
тАО04-14-2009 06:21 AM
Re: How to fix a SIGBUS fault
> problems on TRU64.
It probably _was_ slower at run time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-14-2009 07:29 AM
тАО04-14-2009 07:29 AM
Re: How to fix a SIGBUS fault
Found the definition of FLDLEN32. Its typedef'd to int.
So, in this case, the function expected a long * and we were passing it an int *. And the code compiled with a warning and ran fine on Tru64. But core dumped on HP UX.