Operating System - HP-UX
1832277 Members
1942 Online
110041 Solutions
New Discussion

HP-UX 11.23 compiler questions

 
SOLVED
Go to solution
Clive Quinn
Occasional Advisor

HP-UX 11.23 compiler questions

Hi,
I am in the middle of a port from PA risc architecture to IPF architecture. We are using HPUX b11.23 U ia64 and compiler version HP aC++/ANSI C B3910B A.05.50.

Now I have built my application fine and I am using the the classic C++ runtime (i.e the -AP flag instead of itanium default of standard -AA flag). I have also used optimization level 2 i.e +O2 flag. We are also using the flag -D_PSTAT64 to allow us to use 64 bit compliant system call.

Please note I want my application to be built 32 bit even though I am on 64 bit machine and I am believe this should not be a problem. I am using shared libraries from /usr/lib/hpux32.

Now I am encountering problems during some of my test runs. Some tests are generating core files and when I try debug the core using gdb and wdb; I am unable to go into functions where the core is supposed to be generated(I have urned the -g flag on for debug). This makes me think we might be missing a debugger or compiler patch !

Also please note I also switched off the +O2 optimization and still got same problem.

Firstly I would be grateful if someone could send me on details of patches I need to install to ensure I have latest runtime and linker.
Also I noticed that I have no patches installed that start with the phrase PHSS (this is usually HP's patches label). Is this an issue ?

Any help would be appreciated.
Thanks in advance,
Clive
4 REPLIES 4
Mike Stroyan
Honored Contributor
Solution

Re: HP-UX 11.23 compiler questions

These are all of the patches currently available for 11.23.

PHSS_30015 Aries cumulative patch
PHSS_30043 OV EMANATE15.3 naaagt startup fix
PHNE_29913 sendmail(1m) 8.11.1 patch
PHKL_30065 msgrcv(2) reports success when interrupted
PHSS_30004 Fortran Product Patch; v2.7 to v2.7.4
PHCO_30027 Release notes document
PHSS_30041 Support Tool Manager Jun 2003 Patch
PHSS_29902 MC/ServiceGuard A.11.15.00
PHSS_29966 HP DCE 1.9 client cumulative patch
PHKL_29951 Report all tombstone logs after an MCA
PHKL_29923 Compressed Dump Hang Fix
PHKL_29994 install kernel panic with ram fs problem
PHSS_30013 CDE Base Patch
PHSS_29742 CDE Applications Periodic Patch
PHKL_29681 SCSI c8xx Dump Driver Cumulative Patch
PHSS_29620 FORTRAN Intrinsics [libF90 B.11.23.15]
PHCO_29793 audisp(1M) patch
PHSS_29949 hptc/ClusterPack v2.2 CPACK-MGR
PHSS_29950 hptc/ClusterPack v2.2 CPACK-AGENT
PHSS_29655 aC++ Compiler (A.05.52)
PHSS_29656 HP C Compiler (A.05.52)
PHSS_29657 u2comp/be/plugin library Patch

I am not aware of any problems that would cause the debugging difficulties that you describe. One possibility is that you are looking for a function that is actually inlined. You could use the aCC +d option to prevent inlining in your debuggable build.
Clive Quinn
Occasional Advisor

Re: HP-UX 11.23 compiler questions

Hi Mike,

Thanks for your speedy reply with my last question. Now I think I need to explain in more detail what our problem is; as it is still occuring.

I am attaching a file which contains the list of patches we have on our machine, our compile and link lines and core output from one of our servers. I would be grateful if you could have a look at this and try and spot any potential problems.

To describe in brief our problem : Basically we have a daemon process and we register a server with the daemon process. We start this server (named IFR). Next we communicate with this server and write a file to a repository. This works fine up to here. Now when we try to read a file or remove a file from this repository, we get a core output from the server IFR.

Now we have tried both the default optimization (i.e +O1) and 2nd level optimization with flag (+O2). We noticed that the debugger output is different with and without +O2 sometimes. Also we have not installed the patch PHSS_29657 u2comp/be/plugin library Patch yet. Do we need to do this ?
Note also we have checked our libraries and binaries. There are no incompatibilities with PA architecture. We are using system libraries from /usr/lib/hpux32 and when i output with -v flag I see the following:
-a shared_archive -lm -lpthread -lstd -lstream -lCsup -lm -lunwind -lCsup -lc -ld .

I would be very grateful if you could update us with anything you can asap as this is an urgent customer problem we are having. Thanks a lot for all your help with my issues and your fast response times.

Clive


G. Vrijhoeven
Honored Contributor

Re: HP-UX 11.23 compiler questions

Clive,

I have looked into the patch discription of PHSS_29657 and it is an critical fix:

Critical:
Yes
PHSS_29657: HANG CORRUPTION
This patch is critical. It contains corrections
for the problems listed below that may result in
hangs or incorrect results in users' applications.


JAGae86933: bad flt80 math at -O
JAGae05155: libcalls fix for sin/cos
JAGae78528: Infinite application program runtime
using +O2


So i think i would install the patch.

But you are able to check the patch discriptoin yourself at:

http://www5.itrc.hp.com/service/patch/patchDetail.do?BC=patch.breadcrumb.main|patch.breadcrumb.search|&patchid=PHSS_29657&context=hpux:800:11:23

Use the next link to search the HP's test database:

http://www5.itrc.hp.com/service/patch/crumbRequest.do?crumb=patch.breadcrumb.main&BC=

Hope this helps,

Gideon
Mike Stroyan
Honored Contributor

Re: HP-UX 11.23 compiler questions

From the stack trace I see that you are getting a core file from your process, then gdb is crashing if you try to examine that core file. The gdb crash looks like it is a gdb bug, although I suppose the core file or program file could be so very wrong that gdb has some excuse for being unable to read it.

There are two directions to take this. One is to characterize the gdb problem and get it fixed. The other is looking at the original program crash and trying to fix it. Both are worth doing, but the program problem is probably first on your mind.

I noticed that the program is linked with -lpthread, but the source is not compiled with the -mt option. You should either drop the thread library or add the compiler option to both the source compile and the aCC link step. The link line also had libCsup duplicated. You should let aCC include libCsup, libstd, and libpthread instead of trying to list them directly.

You could try adopting the server program with wdb before it crashes. The debugger may be more capable when looking at the live process instead of a core file.