AIX runtime programming issue


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users AIX runtime programming issue
# 1  
Old 01-13-2016
Code AIX runtime programming issue

I hope my title is accurate enough.

I have a product that we port to various UNIX platforms. It is known to run on AIX but using the IBM compiler from years ago. Recently we got a different used AIX P5 platform running AIX 5.3 and we setup the GCC compiler (4.4.5 I think). C and C++ source code.

Traditionally I compile with static C run time libs such as the standard C and Math libs. But I think I was not able to do that on this platform.

So I compiled it on this new platform OK and tested it and it runs fine. I sent it to a customer and it core dumps. Based on info from the customer it appears to fail during C startup on a call to a function called: __modinit

I am not sure which AIX OS he is running but in the past it did not mater. The code ran on all AIX Power platforms.

Does anyone know what is causing this and what I can do about it?

If I had my way I would like to link statically so I would not depend on any run time SO libraries.

Here is some of the dump info:

Code:
Class:           S
Type:            PERM
WPAR:            Global
Resource Name:   SYSPROC
 
Description
SOFTWARE PROGRAM ABNORMALLY TERMINATED
 
Failure Causes
SOFTWARE PROGRAM
 
Detail Data
SIGNAL NUMBER
          11
ADDITIONAL INFORMATION
__modinit 26C
__start 5C
__start 5C


Thank you all for any help!

Last edited by Don Cragun; 01-14-2016 at 03:20 AM.. Reason: Add CODE an ICODE tags.
# 2  
Old 01-13-2016
From the information you've provided I can make only general recommendation - use IBM C Compiler, not GCC. Try to debug your code with dbx or IBM Debugger, but what I see - your code even doesn't come to the execution. Possibly you've linked it with wrong C runtime (crt0.o/crt0_64.o) or with wrong linker (GNU linker instead of IBM linker).
# 3  
Old 01-13-2016
Quote:
Originally Posted by Pug
I am not sure which AIX OS he is running but in the past it did not mater. The code ran on all AIX Power platforms.
I don't know either which AIX version your customer runs, but there is a BIG chance it isn't AIX 5.3 of any sort at all. 5.3 is not supported any more since a some years now (even its successor 6.1 is almost out of support) and on newer (POWER8) systems it won't even run. On the other hand the recent AIX version (7.2) will not run on POWER5 or even POWER6 platforms.

From 5.3 to 6.1 and from 6.1 to 7.1 there were two big changes and - lacking intimate knowledge of your application - it is quite conceivable that your code might have problems running on current platforms and/or OS versions.

To what agent.kgb (rightfully) said i'd like to add: get a current platform to compile your software, POWER7 at least or preferably a POWER8.

I hope this helps.

bakunin

Last edited by Don Cragun; 01-14-2016 at 03:08 AM.. Reason: Add missing ].
# 4  
Old 01-13-2016
Thank you both.

Well, regarding the compiler... the C/C++ compiler from IBM is extremely expensive if I recall correctly. GCC works well on all the other platforms so I am hoping I can figure this out.

Regarding the different AIX OS version, I don't think this is an issue with my App because we don't generally rely on any special OS calls. As an example, when this customer was unable to run the new release he reverted back to a stable earlier compile that was compiled on AIX 4.3.3 a few years back. This program compiles into native Power machine code.

I think my issue with the C startup code trying to initialize the math library. I suspect that it might have to do with SO files instead of a directly linked static math library, but I don't know. It could be as you say:
"Possibly you've linked it with wrong C runtime (crt0.o/crt0_64.o) or with wrong linker (GNU linker instead of IBM linker)"

I was asking in case there is someone out there that has worked with GCC on AIX and might know what this is right off.

I will dig into it further and see what I find.

Thanks again for your suggestions.

Last edited by Don Cragun; 01-14-2016 at 03:23 AM.. Reason: Add ICODE tags.
# 5  
Old 01-14-2016
first look here - AIX Open Source Packages | Main / Build Instructions. These instructions pass generally to all projects, compiled on AIX, not only RPM files by Michael Perzl.

second I personally experienced strange core dumps on some strange places in right written C programs, which were compiled with GCC for AIX. Changing the compiler helped me every time. I know it is expensive, but you can download 60-day trial version, compile with it and check if it works. As for me I use GCC only if there is some GNU specific source code. But I am not a programmer ;-)
# 6  
Old 02-23-2016
Not sure if this is still a problem. If so, try APAR IY91530. This corrects a __modinit core at 5.3. This may or may not be the ticket. Good chance it is.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl programming issue

Dears, I want to print filename and count of each file in perl but failing to implement. `find $srcFolder -maxdepth 1 -type f -name "*$workDate*$fileExt" -exec sh -c ' && printf "$workDate|%s|%s\n" "$(wc -l<"$0")" *$workDate*$fileExt' {} \ >> /Sadique/filelog.out \\; 2> /dev/null`; ... (2 Replies)
Discussion started by: sadique.manzar
2 Replies

2. AIX

Embedding Runtime Search Path into Library on AIX

My product has 2 libraries say "x & y". x depends on y. During the installation of my products package, user will be prompted for his own location to copy my product libraries. Installation will copy libraries "x & y" and create my product specific ENV variable say "MYPATH" pointing to User... (4 Replies)
Discussion started by: erra_krishna
4 Replies

3. Shell Programming and Scripting

Need help with programming issue

I need a UNIX shellscript command that will remove the 'Paragraph' mark from a simple text file. The Paragraph mark I'm referring to is the special character you can see in a WORD documant (similar to a backwards 'P') when you select the Show Paragraph Marks icon. If someone can give me the... (6 Replies)
Discussion started by: varefump
6 Replies

4. AIX

How to Check the what runtime package is applied on AIX OS

Hi Experts, How to Check the what runtime package is applied on AIX OS? I would like to verify if “xlcpp.rte.10.1.0.aix.base” package is applied or not ? thanks in advance. -Mallela (1 Reply)
Discussion started by: meetmallela
1 Replies

5. Programming

programming in C, C++ on AIX 6.1 requirments

I want to start programming in C, C++ on AIX 6.1 and I want to know what I need to install on the server to do so. Do I only need to install "gcc" GNU Compiler Collection & "gcc-c++" C++ support for GCC. or do I also need "libgcc" GCC compiler dynamic runtime library? am I missing any files to... (1 Reply)
Discussion started by: daveisme
1 Replies

6. AIX

runtime libs accessed by application in AIX

Hi , I need some inputs on runtime or shared libs for an application(s) in AIX . i have a requirement saying i need to rehost all the production applications into new AIX OS . Here Source and target oS is AIX but with different versions so for this i need to identify what are the... (1 Reply)
Discussion started by: naren_chella
1 Replies

7. UNIX for Advanced & Expert Users

Allocate memory for a shell script in Aix at runtime-urgent critical

How to allocate memory for a shell script on aix box at the time of execution i.e at runtime Are there any commands for AIX in specific Thanks in Advance (1 Reply)
Discussion started by: aixjadoo
1 Replies

8. Shell Programming and Scripting

Sed issue in K Shell programming

I am doing the following script in k shell sed -i 's/FILENAME/$i/g' TEST/test$j.ctl > TEST/control$j.ctl In the file it replaces $i for all FILENAME, it doesnot replace with the value of i. I put single quotes like below sed -i 's/FILENAME/'$i'/g' TEST/test$j.ctl > TEST/control$j.ctl I... (9 Replies)
Discussion started by: toshidas2000
9 Replies

9. AIX

Aix Shell Programming

HI I am trying to write a shell script which accepts two strings from user and finds the matching number of characters in those two ex: string 1 abcd string 2 bcgt result is bc (matching characters) pls provide me with a basic script for doing that (1 Reply)
Discussion started by: akmtcs
1 Replies

10. AIX

Programming Tools for Aix

I am searching for a good debugger and memory leak detection tools like for AIX. Right now we use Xldb for debugging, which is not bad, but detecting memory leaks is a pain... Unfortunately Purify is not aviable for the AIX plattform. DDD is not bad as an alternative debugger but he is... (0 Replies)
Discussion started by: Lazzar
0 Replies
Login or Register to Ask a Question