Operating System - Linux
1827704 Members
2828 Online
109967 Solutions
New Discussion

Re: SIGBUS Error on third party application

 

SIGBUS Error on third party application

Hello,

our application crashes with a Bus-Error.
I run it with truss and see this:

read(89, "01& 02\001\0\0\001& 02\001\0\0\0".., 2048) = 2048
lseek(89, 1241088, SEEK_SET) = 1241088
read(89, "1c\0\0\0019804\0< 0f0e\0011f\f\0".., 1776) = 1776
Received signal 10, SIGBUS, in user mode, [caught], partial siginfo
Siginfo: si_code: I_NONEXIST, faulting address: 0x401d21c5, si_errno: 0
PC: 0x68c9f, instruction: 0x4afa0000

gdb (bt) show this:
Core was generated by `_progres'.
Program terminated with signal 3, Quit.

warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.

(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...#0 0xc01f8368 in __fattach ()
from /usr/lib/libc.2
(gdb) bt
#0 0xc01f8368 in __fattach () from /usr/lib/libc.2
#1 0x2a2300 in utcore () from /home/dlc83e/bin/_progres
#2 0x461b0 in drexit () from /home/dlc83e/bin/_progres
#3 0x46cfc in drSigFatal () from /home/dlc83e/bin/_progres
#4 0xc01f7150 in __pause_sys () from /usr/lib/libc.2


What can ce the cause ?

Regards,
S.Marquardt
6 REPLIES 6
Peter Godron
Honored Contributor

Re: SIGBUS Error on third party application

Re: SIGBUS Error on third party application

Hello,

yes i see this cases but SIGBUS seems to be a global error for much circumstances and my SIGBUS is another SIGBIS error than the other cases.


ranganath ramachandra
Esteemed Contributor

Re: SIGBUS Error on third party application

you can start with looking at what fattach is supposed to do:
http://www.opengroup.org/pubs/online/7908799/xsh/fattach.html

you can see that it takes 2 parameters, the second one being a string. since the SIGBUS is in libc (common to all applications and hence thoroughly tested), it is likely that your program passed it a bad string. you can try printing it. in gdb:
p/x $r25
will print the pointer value.
x/s $r25
will print the string (if the address is valid) or give an error message.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

Dennis Handly
Acclaimed Contributor

Re: SIGBUS Error on third party application

Why does gdb say you got SIGQUIT instead of SIGBUS? Do you have a SIGBUS handler and then later it aborted with SIGQUIT? It appears that the __fattach stack trace has nothing to do with your SIGBUS.

Taking the output from tusc, you can see that you have an alignment trap:
0x401d21c5 is not word aligned.
LDW 0(r23),r26

To find the proper function, you could do:
disas 0x68c9c


Re: SIGBUS Error on third party application

Hello,

yes there seems to be a a signal handler (i don't know C very well as a VB programmer)
sigaction(SIGBUS, 0x40037438, 0x40037460) = 0


Disassembling shows me the same function i got in the handler:
(gdb) disas 0x68c9c
Dump of assembler code for function fmESUBR:
0x68c90 : stw %rp,-0x14(%sp)
0x68c94 : ldo 0x40(%sp),%sp
0x68c98 : b,l 0x4de40 ,%rp
0x68c9c : ldw 0(%r23),%r26
0x68ca0 : ldw -0x54(%sp),%rp
0x68ca4 : bv %r0(%rp)
0x68ca8 : ldo -0x40(%sp),%sp
0x68cac : break 0,0
End of assembler dump.
(gdb)

fmESUBR is a function from the developer of the database engine.

The "handler" give this:

( 0) 0x002b33d0 uttraceback + 0x18[/home/dlc83e/bin/_progres]
( 1) 0x002a24b4 uttrace + 0x134[/home/dlc83e/bin/_progres
( 2) 0x002a22d4 utcore + 0xbc [/home/dlc83e/bin/_progres]
( 3) 0x000461b0 drexit + 0x120[/home/dlc83e/bin/_progres]
( 4) 0x00046cfc drSigFatal + 0x64[/home/dlc83e/bin/_progres]
( 5) 0xc01f7150 _sigreturn[/usr/lib/libc.2]
( 6) 0x00068c9c fmESUBR + 0xc[/home/dlc83e/bin/_progres]
( 7) 0x0004e1a0 fmeval + 0x360[/home/dlc83e/bin/_progres]
( 8) 0x0004dfb8 fmeval + 0x178[/home/dlc83e/bin/_progres]
( 9) 0x0004dfb8 fmeval + 0x178[/home/dlc83e/bin/_progres]
(10) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(11) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(12) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(13) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(14) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(15) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(16) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(17) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(18) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(19) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(20) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(21) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(22) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(23) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(24) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(25) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(26) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(27) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(28) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(29) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(30) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(31) 0x0004dfb8 fmeval + 0x178[/home/dlc83e/bin/_progres]
(32) 0x00066e68 fmEIFTE + 0x40[/home/dlc83e/bin/_progres]
(33) 0x0004e1a0 fmeval + 0x360[/home/dlc83e/bin/_progres]
(34) 0x0004e010 fmeval + 0x1d0 [/home/dlc83e/bin/_progres]
(35) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(36) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(37) 0x0004dfb8 fmeval + 0x178 [/home/dlc83e/bin/_progres]
(38) 0x00165d3c rnasgsimple + 0x8ac[/home/dlc83e/bin/_progres]
(39) 0x00150b68 rnexec_entry + 0x3a0[/home/dlc83e/bin/_progres]
(40) 0x0016137c rninterpret + 0x44[/home/dlc83e/bin/_progres]
(41) 0x001b3418 umeDispatchEvent + 0xda0[/home/dlc83e/bin/_progres]
(42) 0x000c2d48 wvRunDispatcher + 0x128[/home/dlc83e/bin/_progres]
(43) 0x00292694 iodispatch + 0x9c[/home/dlc83e/bin/_progres]
(44) 0x00058fe0 rnrq + 0x68[/home/dlc83e/bin/_progres]
(45) 0x00040fdc main + 0x134[/home/dlc83e/bin/_progres]
(46) 0xc013f204 _start + 0xc8[/usr/lib/libc.2]
(47) 0x0003789c $START$ + 0x1a4[/home/dlc83e/bin/_progres]

Are there any information to give to the developer of the database engine what is going wrong ?
On another HP-UX 11.0 host i can't reproduce this error !

Regards,
S.Marquardt
Dennis Handly
Acclaimed Contributor

Re: SIGBUS Error on third party application

>Disassembling shows me the same function i got in the handler:
(gdb) disas 0x68c9c
0x68c90 : stw %rp,-0x14(%sp)
0x68c94 : ldo 0x40(%sp),%sp
0x68c98 : b,l 0x4de40 ,%rp
0x68c9c : ldw 0(%r23),%r26 << TRAP

This shows that fmESUBR is calling fmeval. It is getting the alignment trap in deferencing its 4th parm to pass to first parm.

> The "handler" give this:
( 6) 0x00068c9c fmESUBR + 0xc[_progres]
( 7) 0x0004e1a0 fmeval + 0x360[_progres]

Frame 7 is passing a bad 4th parm (misaligned) to fmESUBR.

>Are there any information to give to the developer of the database engine what is going wrong?

I'm not sure if this will help. You will need to see what frame 7 is doing at fmeval + 0x360. This is different from the other recursive calls but similar to frame 33 but calling a different function.