Seg Fault Running AIX COBOL program

Hi
some help read............

I'm getting a segmentation fault when I run an AIX COBOL/Db2 program.

I initiate the program from the command line, but it hangs, and then when I press enter it generates a segmantation fault and produces a core dump.

The box is running AIX software level
5300-07-01-0748

The box is a 64 bit machine. The program is compiled under 64 bit, but in order to run it (and access DB2) I bind it using a 32 bit DB2 gateway and run it via the DB2 32 bit gateway.

Previously when the box was at its previous software level of
5300-06-03-0732 I didn't get these errors. (I've also ported the execuatble and bind files back from the prod bax - which is the previous software level of 5300-06-03-0732 and re-bound them and they run ok without the seg fault).

Anyone had this fault before or know what the cause/rememdy is ?

Thanks in anticipation.

I'd just say that I'm an application developer and my UNIX/AIX OS knowledge is minimal.

When I look at the core dump I get (only a portion of the messages shown below)

internal error: 1283-239 consPic: expected cobol decimal alignment
internal error: 1283-228 expected char ';', found '"x",1;'
internal error: 1283-239 consPic: expected cobol decimal alignment
internal error: 1283-228 expected char ';', found '"X(08)",5;'
internal error: 1283-239 consPic: expected cobol decimal alignment
internal error: 1283-228 expected char ';', found '"x(6)",4;'
internal error: 1283-239 consPic: expected cobol decimal alignment
internal error: 1283-228 expected char ';', found '"x(6)",4;'
internal error: 1283-239 consPic: expected cobol decimal alignment
internal error: 1283-228 expected char ';', found '"x(16)",5;'
internal error: 1283-239 consPic: expected cobol decimal alignment
internal error: 1283-228 expected char ';', found '"x(8)",4;'
internal error: 1283-239 consPic: expected cobol decimal alignment
internal error: 1283-228 expected char ';', found '"X(15)",5;'
internal error: 1283-239 consPic: expected cobol decimal alignment
internal error: 1283-228 expected char ';', found '"x(20)",5;'
internal error: 1283-239 consPic: expected cobol decimal alignment
internal error: 1283-228 expected char ';', found '"x(7)",4;'
internal error: 1283-239 consPic: expected cobol decimal alignment
internal error: 1283-228 expected char ';', found '"x(7)",4;'

Segmentation fault in _iwzEnvNameInit at 0xd7023cc0
0xd7023cc0 (_iwzEnvNameInit+0x26c) 9005003c stw r0,0x3c(r5)
(dbx) where
_iwzEnvNameInit(??) at 0xd7023cc0
_iwzWriteStderr(??, ??, ??) at 0xd70188e8
writeERRmsg(??, ??, ??) at 0xd7016f00
iwzWriteERRmsg(0x3e3, 0x402, 0xd708f890, 0x1, 0xf0fe0864, 0xd0b2, 0x38bad000, 0x2ff46f30) at 0xd70185b4
signal_handler(??) at 0xd7018c84
_iwzEnvNameInit(??) at 0xd7023cc0
_iwzWriteStderr(??, ??, ??) at 0xd70188e8
writeERRmsg(??, ??, ??) at 0xd7016f00
iwzWriteERRmsg(0x3e3, 0x402, 0xd708f898, 0x0, 0xf0fe0864, 0xd0b2, 0x38bad000, 0x2ff46f30) at 0xd70185b4
signal_handler(??) at 0xd7018c1c
_usched_dispatch_front(??, ??) at 0xd011d7b0
_usched_swtch(??) at 0xd011ec1c
_waitlock(??, ??) at 0xd010b76c
_local_lock_common(??, ??, ??) at 0xd010bf28
_mutex_lock(??, ??, ??) at 0xd0119568
lock__11LibDescLockFv() at 0xd0221ebc
terminateAndUnload() at 0xd021c504
dlfcn.dlclose(??) at 0xd040e7e8
unload__11OSSHLibraryFv(??) at 0xd2609fcc
sqlexPluginUnload__Fi(??) at 0xd1ff556c
sqlexAppLibTerm__Fv() at 0xd1fe6050
sqloAppLibTerm() at 0xd22ea188
__modinit.mod_fini1(??, ??) at 0xd039856c
__modinit.modfini(??) at 0xd03984c8
__modinit.__modfini() at 0xd0398d0c
cuexit.exit(??) at 0xd038ddb4
(dbx) list 0xd7023cc0
"ko020E.cbl" has only 1141 lines

This appears to be an IBM OS patch issue. Have you tried to recompile; run the recompiled code? Your core seems to show alignment issues which at my level of ignorance implies that the runtuime library support has changed.

You need to get support from the AIX folks.

Thanks Jim

Yes I've re-compiled the code several times , trying different flavours of 32/64 bit ie compiling using 64 bit /running 32 bit(need to run 32 bit otherwise it fails)..........compiling 32 bit/running 32 bit, etc.

All to no avail.

There's some politics on the account where I work, as the AIX OS guys work for a different comapny to the one(which I work for) which support the application software (and although I used to work for the company that supports the AIX OS until recently I don't seem to be getting much help from the OS guys - they're saying its an apllcation problem not an OS issue - however the program that I'm using as a ginea pig hasn't had its code changed at all).

If it runs correctly on the previous "release", the code has not changed, the data has not changed, the inputs have not changed, and it fails to run when recompiled, it is most likely related to runtime libraries. Was the cobol runtime support library "patched" or updated? What does the vendor website say about compatibility of code going forward?

I'm the one who gets to work on problems like this, but not in AIX. The OS guys are thinking you did something "special" with this module. COBOL doesn't do "special" very well. Or very portably either.

Thanks

Althought there has been a 'technology upgrade' patch to the dev box I feel its something related to 32/64 bit mode. Whether this is OS patch related is proving difficult to determine.

The compile of the COBOL program isnt striaghtforward becuase I have to compile under 64 bit, then move the excutable & bind files over to the usserid running in 32 bit mode.

Looking at the dump the seg fault core dump the line

Segmentation fault in _iwzEnvNameInit

points to the goback command at the end of the program (see IBM - SIGSEGV _iwzEnvNameInit)

But like I said this prgram hasn't changed.