Operating System - HP-UX
1745865 Members
4358 Online
108723 Solutions
New Discussion юеВ

Re: Program terminated with signal 10, Bus error

 
SOLVED
Go to solution
AS_UX
Frequent Visitor

Program terminated with signal 10, Bus error

Hi,

 

I am trying to port a few existing applications to HP-UX 11.31 and came across a few issues.

Would be really grateful if any assistance is provided to solve it.

 

Also, can someone help suggest why ousig.c is reported as missing?

Is it part of some default signal handler routine which is bundled with HP-UX?

 

The existing cobol application is terminating with the message:

 

Program terminated with signal 10, Bus error

.

.

ousig.c: No such file or directory

 

and dumping a core file.

 

> file core

core:           ELF-32 core file - IA64 from 'ppCOL' - received SIGBUS

 

When I try to debug the core file

 

gdb ppCOL core
HP gdb 6.4 for HP Itanium (32 or 64 bit) and target HP-UX 11iv2 and 11iv3.
Copyright 1986 - 2011 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 6.4 (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.
..
Core was generated by `ppCOL'.
Program terminated with signal 10, Bus error.
BUS_ADRALN - Invalid address alignment. Please refer to the following link that helps in handling unaligned data: http://docs.hp.com/en/7730/newhelp0610/pragmas.htm#pragma-pack-ex3

warning: Core file load map pointer 20202020 is corrupted
or the executable does not match the core file.
Using the load map pointer 60000000e8708538 from
alternate dld /usr/lib/hpux32/dld.so with timestamp = Wed Jun 5 16:22:10 2013


#0 0x60000000e3051cd0:1 in signal_handler_catch () at ousig.c:606
606 ousig.c: No such file or directory.
in ousig.c
(gdb) where
#0 0x60000000e3051cd0:1 in signal_handler_catch () at ousig.c:606
#1 <signal handler called>
#2 0x60000000e3051cd0:1 in signal_handler_catch () at ousig.c:606
#3 <signal handler called>
#4 0x60000000e25fa580:1 in real_malloc+0x1c1 () from /usr/lib/hpux32/libc.so.1
#5 0x60000000e25f9ae0:0 in _malloc+0x140 () from /usr/lib/hpux32/libc.so.1
#6 0x60000000e24a52c0:0 in malloc+0x1d0 () from /usr/lib/hpux32/libc.so.1
#7 0x60000000e3cf6c40:0 in sqlalc () at sqlalc.c:147
#8 0x60000000e3d0ae90:0 in sqlbrl () at sqlexp.c:755
#9 0x60000000e3d0bb10:0 in sqgctx () at sqlexp.c:1060
#10 0x60000000e3d0b410:0 in sqgrct () at sqlexp.c:917
#11 0x60000000e3cffab0:0 in sqlcmex () at sqlent.c:338
#12 0x60000000e3d00400:0 in sqlbex () at sqlent.c:449
#13 0x3d113b0:0 in SQLBEX ()
at /ade/b/1779338688/oracle/precomp/utl/pcc14/cobsqlintf.c:903
#14 0x3c4c660:0 in AcGetNextF + 0x4990 ()
#15 0x3bab800:0 in AcMain + 0x2d0 ()
#16 0x892f20:0 in ppcmg_AC_realAC ()
at /rgshome/rgs/cc/mb_ccrgs/bb/cellmafcom/v89_2/cmg/src/ppcmg_AC.c:763
#17 0x892580:0 in ppcmg_AC ()
at /rgshome/rgs/cc/mb_ccrgs/bb/cellmafcom/v89_2/cmg/src/ppcmg_AC.c:681
#18 0x83fe50:0 in ppclg_AC (i_verb=2)
at /rgshome/rgs/cc/mb_ccrgs/bb/cellmafcol/v89_2/clg/src/ppclg_AC.c:562
---Type <return> to continue, or q <return> to quit

 

 

8 REPLIES 8
Dennis Handly
Acclaimed Contributor
Solution

Re: Program terminated with signal 10, Bus error

>why ousig.c is reported as missing?  Is it part of some default signal handler routine?

 

This is most likely MF COBOL's signal handler.

 

>warning: Core file load map pointer 20202020 is corrupted

 

(Wow they now handle that!)

These are 4 blanks.  Likely you have corrupted the heap and more!

 

>#4 0x60000000e25fa580:1 in real_malloc+0x1c1 libc.so.1

 

The heap is corrupted.

AS_UX
Frequent Visitor

Re: Program terminated with signal 10, Bus error


@Dennis Handly wrote:

>why ousig.c is reported as missing?  Is it part of some default signal handler routine?

 

This is most likely MF COBOL's signal handler.

 

>warning: Core file load map pointer 20202020 is corrupted

 

(Wow they now handle that!)

These are 4 blanks.  Likely you have corrupted the heap and more!

 

>#4 0x60000000e25fa580:1 in real_malloc+0x1c1 libc.so.1

 

The heap is corrupted.


Many thanks for your prompt reply, Dennis!

 

It seems I need to redirect my queries at the compiler vendor to understand how byte alignments should be handled.

 

 

Dennis Handly
Acclaimed Contributor

Re: Program terminated with signal 10, Bus error

>to understand how byte alignments should be handled.

 

The alignment trap is most likely caused by heap corruption.

AS_UX
Frequent Visitor

Re: Program terminated with signal 10, Bus error


@Dennis Handly wrote:

>to understand how byte alignments should be handled.

 

The alignment trap is most likely caused by heap corruption.


Dennis, is there a patch available for HP-UX 11.31 which can fix it?

 

Or do I need to modify the existing code?

Dennis Handly
Acclaimed Contributor

Re: Program terminated with signal 10, Bus error

>is there a patch available for HP-UX 11.31 which can fix it?

 

Of course not, heap corruption is a user problem.  Going past the end of an array/buffer.

AS_UX
Frequent Visitor

Re: Program terminated with signal 10, Bus error

Thanks Dennis.

 

Will approach the concerned developer and ask him to fix it.

HP_man
New Member

Re: Program terminated with signal 10, Bus error

AS_UX :- We are facing similar problem. Can you please help here. We have recently upgraded to following system:-
uname -a
uHP-UX indhp067 B.11.31 U ia64 3118034054 unlimited-user license.
While running the performance tests we are getting core and below is the error we see. It dumps core after 1 hour.

>file core
fcore: ELF-32 core file - IA64 from 'scmngMP' - received SIGBUS
indhp067:/usg/TLG_VAR/can/projs/sc/work> gdb `which scmngMP` core
gHP gdb 6.4 for HP Itanium (32 or 64 bit) and target HP-UX 11iv2 and 11iv3.
Copyright 1986 - 2011 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 6.4 (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.
..
Core was generated by `scmngMP'.
Program terminated with signal 10, Bus error.
BUS_ADRALN - Invalid address alignment. Please refer to the following link that helps in handling unaligned data&colon; http://docs.hp.com/en/7730/newhelp0610/pragmas.htm#pragma-pack-ex3
#0 0x60000000d26998b0:0 in skgesigSignalMessageLen () at skgesig.c:859
859 skgesig.c: No such file or directory.
in skgesig.c
(gdb) where
#0 0x60000000d26998b0:0 in skgesigSignalMessageLen () at skgesig.c:859
#1 0x60000000d383ed20:0 in kpeDbgSignalHandler () at kpedbg.c:1028
#2 0x60000000d269a0a0:0 in skgesig_sigactionHandler () at skgesig.c:809
(gdb) info line 859
Line 859 of "skgesig.c"
starts at address 0x60000000d26996e0:0 <skgesigSignalMessage+0x80>
and ends at 0x60000000d2699740:0 <skgesigSignalMessage+0xe0>.

Do you think this is problem with skgesig.c or user program ?
Dennis Handly
Acclaimed Contributor

Re: Program terminated with signal 10, Bus error

>Program terminated with signal 10, Bus error. BUS_ADRALN - Invalid address alignment.
#0 0x60000000d26998b0:0 in skgesigSignalMessageLen skgesig.c:859
#1 0x60000000d383ed20:0 in kpeDbgSignalHandler kpedbg.c:1028
#2 0x60000000d269a0a0:0 in skgesig_sigactionHandler skgesig.c:809

>Do you think this is problem with skgesig.c or user program?

 

You need a complete stack trace with bt, you're just seeing the signal handler.

Most likely the problem is due to the program passing in unaligned data.