[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

AIX 4.3 program returning immediately (exit code 99). Works on other AIX4.3 machine

Posted on 2004-09-10
9
Medium Priority
?
761 Views
Last Modified: 2013-11-17
My program works perfectly on my development machine and on the regular test machine. When ran on the two new test machines it exits immediately with exit code 99.

This code exists at the beginning of main():

cout << "hey!" << endl;

I understand the endl will flush the output buffer, so this means to me the instruction is not being reached. Also, it exists way to fast for the average load time of this process.

This is the output of a debugging session with dbx:

Type 'help' for help.
reading symbolic information ...
(dbx) run

execution completed (exit code 99)
(dbx) where
glink._exit() at 0xd018f500
exit(??) at 0xd0188248
__C_runtime_startup() at 0x10000638

These are the outputs of ulimit for the account used to run the process:

ulimit -a:
time(seconds)        unlimited
file(blocks)         2097151
data(kbytes)         unlimited
stack(kbytes)        unlimited
memory(kbytes)       unlimited
coredump(blocks)     2097151
nofiles(descriptors) 2000

ulimit -a -H:
time(seconds)        unlimited
file(blocks)         2097151
data(kbytes)         unlimited
stack(kbytes)        unlimited
memory(kbytes)       unlimited
coredump(blocks)     unlimited
nofiles(descriptors) unlimited

0
Comment
Question by:hs00gte
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
9 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 12028191
some revisions of gnu utilities make broken executables
0
 

Author Comment

by:hs00gte
ID: 12029030
I use xlC to compile this program. Remember it works perfectly on another IBM machine running the same AIX4.3. (although different support levels).
0
 
LVL 11

Expert Comment

by:griessh
ID: 12029240
Is that the whole program or what else is the program doing?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 20

Expert Comment

by:Gns
ID: 12110112
CC gheist. You should perhaps look long and hard at what happens in your constructors, since globaly instantiated objects will run that code prior to main.
Also look at what libs are dynamically linked with ldd... you might have a broken lib.

-- Glenn
0
 

Author Comment

by:hs00gte
ID: 12122551
We found a way around this problem, but I still don't understand what's going on. If we remove the static linking of one particular library and link the EXACT OBJECT FILE we need (which is included in the library) then everything works fine in both machines.

All the previous existing global object instantiations are still there in the code.
0
 
LVL 20

Expert Comment

by:Gns
ID: 12137540
Ok, that'd imply a "broken" lib then. Are the machines the exact same ML?

-- Glenn
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12860650
PAQed with points refunded (500)

modulo
Community Support Moderator
0
 
LVL 62

Expert Comment

by:gheist
ID: 12861254
every manual page dealing with linking binaries warns that static linking breaks program
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question