Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Program terminated with bus error

 
Highlighted
New Member

Program terminated with bus error

Hi
i have an executable which is throwing the core.
There were no code changes done as such. And the executable build with previous environment is working fine.
What i understood is there were some upgrades for Cobol and Unix.

When tried to debug with gbd, i get the following info
Core was generated by `scmqc'.
Program terminated with signal 10, Bus error.

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


warning: Can't find file /opt/mqm/lib/libmqiz.sl referenced in dld_list.
#0 0xc00b27e4 in ?? () from /usr/lib/libpthread.1
(gdb) bt
#0 0xc00b27e4 in ?? () from /usr/lib/libpthread.1
Cannot access memory at address 0xc003c1d3

Can anyone please advice

Thanks
5 REPLIES 5
Highlighted
Acclaimed Contributor

Re: Program terminated with bus error

You can't debug a core file unless you are are the same system.
Otherwise you need to use the packcore command to copy over all of your shlibs. Then use unpackcore.
New Member

Re: Program terminated with bus error

Thank you..
Now i am able to debug.. And the problem looks to be when calling pthread_attr_init

Below is the core
#0 0xc00b27e4 in __pthread_attr_init_generic+0xf0No symbol "unwind_data" in current context.
() from /usr/lib/libpthread.1
(gdb) where
#0 0xc00b27e4 in __pthread_attr_init_generic+0xf0 () from /usr/lib/libpthread.1
#1 0xc00b26cc in __pthread_attr_init_system+0x14 () from /usr/lib/libpthread.1
#2 0x4c8b0 in pthread_attr_init (attr=0xc003c1d3) at /usr/include/sys/pthread.h:573
#3 0x57bb8 in Gensrv_MainLoop (ntsSrvFullLog=0x400010e0 "sc.mqs")
at /ccnmxhome/nmx/ccnmx/mb_ccnmx/bb/ibssc/v17_0/gensrv/src/gensrv_mloop.c:1298
#4 0x8e84 in main (argc=8, argv=0xa8ff55e4) at /ccnmxhome/nmx/ccnmx/mb_ccnmx/bb/ibssc/v17_0/mqs/src/scmqs_main.c:375
Highlighted
Acclaimed Contributor

Re: Program terminated with bus error

>And the problem looks to be when calling pthread_attr_init

Yes, attr=0xc003c1d3 is not aligned properly or it is a bad address.
Highlighted
New Member

Re: Program terminated with bus error

thank you very much.. Got the issue and fixed. There was a cobol upgrade and the problem started occuring after the upgrade. The variable attr was not initialised which is causing the problem
Highlighted
Acclaimed Contributor

Re: Program terminated with bus error

>thank you very much. Got the issue and fixed.

If you are happy with the answers you have gotten, please read the following about assigning points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33