473,385 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

To port our C++ Solaris 9, Studio 8 application to HP-UNIX 11i aCC environment

Dear Friends,

I need some help regarding to port our C++ Solaris 9, Studio 8 application to HP-UNIX 11i aCC environment.

Our same code in Solaris, after porting to HP-UNIX, exiting by the SIGBUS signal at some strange point, at the line, where we are doing "memset" of one of our 'big' structure (local variable, 74120 Bytes)

--------------------------------------
Program received signal SIGBUS, Bus error
si_code: 0 - BUS_UNKNOWN - Unknown Error.
[Switching to thread 3 (system thread 6992034)]
0x77f021f8 in <unknown_procedure> + 0xc0 () from /usr/lib/libc.2
(gdb) bt
#0 0x77f021f8 in <unknown_procedure> + 0xc0 () from /usr/lib/libc.2
#1 0x1664d0 in DIA_UTIL::_memset (s=0x77231248, c=0, n=74120)
at AAAOSWrapper.cpp:28
#2 0x104b44 in AAADiaMsgHandler::handleDiameterMessage (this=0x401b0128,
buffer=0x77230168 "\001", len=260, fd=14) at AAADiaMsgHandler.cpp:83
#3 0x628dc in AAAIfHandler::serviceRequest (this=0x40065668,
buffer=0x77230168 "\001", len=260, fd=14) at AAAIfHandler.cpp:704
#4 0x14746c in AAAThreadService::runThread (this=0x4008a0d8, inIndex=0)
--------------------------------------

Another thing we observed is that, HP gdb can not find any "code instruction" in the binary, at the line where we declared our variable, which was giving BUS error at 'memset'.
------------------------------------------------------------------------------- ---------
bash-2.03$ gdb dfn
HP gdb 5.4.0 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00
and target hppa1.1-hp-hpux11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.4.0 (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.
..
(gdb) break AAADiaMsgHandler.cpp:82
warning: Line 82 in file "AAADiaMsgHandler.cpp" does not have instructions. Plac
ing breakpoint on the next available source line.
Breakpoint 1 at 0x104b2c: file AAADiaMsgHandler.cpp, line 83 from ./obj/dfn.
------------------------------------------------------------------------------- ---------

We use the following procedure regarding Solaris to HPU porting.
1) Since we use POSIX system call, so do not face to change system API, apart from some SOCKET api signature like 'accept'.
2) compile option: aCC -g -v -DHP_UX -AA -z -ext +u1 -mt
3) link option: -lpthread -lrt -lm -lnsl

HPU Version: HP-UX telco03 B.11.23 U 9000/800 908196403 unlimited-user license
aCC Version: aCC: HP ANSI C++ B3910B A.03.70

If anyone can help me in this problem, I will be very helpful.

Thanks in advance,
Regards,
Nilanjan
Aug 11 '07 #1
2 1670
JosAH
11,448 Expert 8TB
A bus error is caused by trying to access a mis aligned data type (e.g. ints should
be aligned at 4 byte boundaries etc.) I don't know what aCC's flags are doing there.
Does any of them have to do with alignment of structs or similar? Is there some
'struct packing' flag active?

kind regards,

Jos
Aug 11 '07 #2
A bus error is caused by trying to access a mis aligned data type (e.g. ints should
be aligned at 4 byte boundaries etc.) I don't know what aCC's flags are doing there.
Does any of them have to do with alignment of structs or similar? Is there some
'struct packing' flag active?

kind regards,

Jos
Hello Jos,
Thank you for reply. We found the root cause of the problem. In HP-UNIX thread stack size by default is very small (64K), compared with other OS like linux (10MB). So our big structure was overflowing the smaller thread stack on HP-UX and causing the issue. After setting some big value with pthread_attr_setstacksize(), it is working :-)

Regards,
Nilanjan
Aug 13 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Volker | last post by:
Hello, i want to compiled PHP 4.3.3 under Solaris 8. My Configuration: Solaris Version 5.8 gcc Version 3.2 PHP 4.3.3 The compile prozess stopped by the compiling
7
by: Paul Moore | last post by:
I'm looking for binaries of Python (2.3.4, preferably) which run on Solaris and HP-UX. I need to be able to install them as a non-root user (hence, to a private directory, something like ~/bin). ...
1
by: Rudy Ko | last post by:
Dear All, I have Apache using port 80. So I changed IIS to use port 8000 as default web service. After that all my .net projects were not able to load into Visual Studio .net. Do you know how to...
0
by: gerd | last post by:
Hello, I want to port an MFC Application from Visual Studio 6 MFC application to Visual C++ 2005 express edition beta. While building i get following error: ------ Build started: Project:...
0
by: gerd | last post by:
Hello, I want to port an MFC Application from Visual Studio 6 MFC application to Visual C++ 2005 express edition beta. While building i get following error: ------ Build started: Project:...
0
by: MichaelR | last post by:
I have an ASP.NET application that I coded with a text editor and command line compiler. I'm trying to port it to Visual Studio for the IDE tools and debugger, but am having a lot of problem with...
0
by: amjad | last post by:
Dear All, I am using Visual Studio beta 2005 beta 2 with ASP.Net 2.0 and C#.I run the application and it work correctly with http://localhost:port/projectname/page but not with...
1
by: henrycortezwu | last post by:
Hi All, I'm trying to connect to a virtual port (COM19, OUTGOING, "Bluetooth Serial Port") using VS2005 System.IO.Ports. When I ran the ff code below here's what happens. 1) VS2005 Compiles w/o...
4
by: Christopher Tidy | last post by:
Hi folks, I have a Sun workstation which doesn't have USB. I want to be able to download photos from SmartMedia cards onto the workstation. As far as I know there are no drivers available for...
0
by: uupi_duu | last post by:
Hello I have installed Visual Sudio Team System 2005 and I'm develping ASP.NET 2.0 application. There is one problem that I can't understand: when I launch my ASP.NET WebApplication in Studio's...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.