Operating System - HP-UX
1753510 Members
4744 Online
108795 Solutions
New Discussion юеВ

Re: "Program terminated with signal 6, Aborted." to throw and catch exceptions calls

 
SOLVED
Go to solution
albino_1
Occasional Advisor

"Program terminated with signal 6, Aborted." to throw and catch exceptions calls

Hi
I have a "Program terminated with signal 6, Aborted." when I send a throw exception

my target is : HP-UX tlbphg B.11.31 U 9000/800

i'm using gcc :

Using built-in specs.
Target: hppa2.0w-hp-hpux11.31
Configured with: ../gcc/configure
Thread model: posix
gcc version 4.2.3


in the follow my bt full :

#0 0xc00f1a60 in _lwp_kill+0x10 () from /usr/lib/libpthread.1
No symbol table info available.
#1 0xc00b5804 in pthread_kill+0x66c () from /usr/lib/libpthread.1
No symbol table info available.
#2 0xc01c6ccc in raise+0x5c () from /usr/lib/libc.2
No symbol table info available.
#3 0xc0217f00 in abort_C+0x160 () from /usr/lib/libc.2
No symbol table info available.
#4 0xc0217f5c in abort+0x1c () from /usr/lib/libc.2
No symbol table info available.
warning: GDB cannot print complete stack trace since some shared libraries are missing. Set GDB_SHLIB_PATH and try again.

#5 0xcfb331d8 in + 0x170 () from /usr/local/lib//libstdc++.sl
No symbol table info available.
#6 0xcfb2f948 in + 0x20 () from /usr/local/lib//libstdc++.sl
No symbol table info available.
#7 0xcfb2f9bc in + 0x1c () from /usr/local/lib//libstdc++.sl
No symbol table info available.
#8 0xcfb2fbbc in + 0x94 () from /usr/local/lib//libstdc++.sl
No symbol table info available.
#9 0xcfc85930 in _ZN9ZcEnvInst4snmpEPKcb () at xnetsnmp_logic.cpp:914
No locals.
#10 0xcfcd6790 in _Z9zif_zc_iriP12_zval_structPS0_S0_iPPPv (ht=0, return_value=0x0, return_value_ptr=0x0,
this_ptr=0x0, return_value_used=0, tsrm_ls=0x0) at xnetsnmp.cpp:1440
ir = (class ZcIr *) 0x0
iface = 0x0
name = 0x0
liface = 0
lname = 0
iargs = (struct _zval_struct *) 0x0

...


the source code in xnetsnmp_logic.cpp:914 is :


try
{
ZC_SNMP_CLASS *s = get_snmp(host, forced);
if (!s)
--> row 914 SYS_ERROR("Cannot initialize host SNMP client.");
_mtx.unlock();
return s;
}
catch (ZcError& ze)
{
_mtx.unlock();
throw ze;
}


where SYS_ERROR defined :

class ZcError : public std::exception
{
public:
ZcError(const char *file, int line, bool retry, const char *type, const char *info);
ZcError(const char *file, int line, bool retry, const char *type, const char *info, long l);
ZcError(const char *file, int line, bool retry, const char *type, const char *info, const char *str);
virtual const char *what() const throw(); //! Inherited from std::exception

public:
bool _retry;
char _where[1024];
char _type[10];
char _error[1024];
};

// ERROR HANDLING MACROs

#define SYS_ERROR(info) throw ZcError(__FILE__, __LINE__, false, "sys", info);

could you help me pls?

tell me if you need more information.

Thx
best regards

Al
10 REPLIES 10
Dennis Handly
Acclaimed Contributor

Re: "Program terminated with signal 6, Aborted." to throw and catch exceptions calls

Do you have any more info other than that Signal 6? (A catch all error.)

If you use aC++, you get a detailed message with the exact EH violation:
Throw without a catch
Throw spec violation
etc.

I'm pretty sure g++ also gives some details.

>No symbol table info available.

We need the function names in the shlibs.
What version of wdb are you using??
The latest is 6.1.
albino_1
Occasional Advisor

Re: "Program terminated with signal 6, Aborted." to throw and catch exceptions calls

my wdb is 6.1 and i'm using gcc 4.2.3

I don't know why I have :
"No symbol table info available." and


however I have always the same signal :

Program terminated with signal 6, Aborted.

thx for the fast answer!
Dennis Handly
Acclaimed Contributor

Re: "Program terminated with signal 6, Aborted." to throw and catch exceptions calls

>I don't know why I have: "No symbol table info available." and

Perhaps because of this:
warning: GDB cannot print complete stack trace since some shared libraries are missing. Set GDB_SHLIB_PATH and try again.

If you need to move a corefile to another system, you should use gdb's packcore to transfer all of the needed files to debug.

>however I have always the same signal 6:

That's particularly useless. Do you have any messages on stderr?

If you have a throw, do you know which frame has the catch, the one you showed?
albino_1
Occasional Advisor

Re: "Program terminated with signal 6, Aborted." to throw and catch exceptions calls

I have tryed to set GDB_SHLIB_PATH (gdb) set enviroument and out gdb with export GDB_SHLIB_PATH but I have alwais the same message.
I also tryed to set SHLIB_PATH.


I dodn't need to move coredump .. I try it on the same system where it is done.

I haven't other message on stderr

yes the catch is the one I showed

thx
Dennis Handly
Acclaimed Contributor

Re: "Program terminated with signal 6, Aborted." to throw and catch exceptions calls

>I have tried to set GDB_SHLIB_PATH (gdb) set environment and out gdb with export GDB_SHLIB_PATH but I have always the same message.
>I try it on the same system where it is done.

If you are on the same system, you shouldn't need to export GDB_SHLIB_PATH.
What does "info shared" show?

What happens if you run the application in gdb, do you get better info?

>I haven't other message on stderr

What does file(1) show for each of these shlibs? Did you strip them?
albino_1
Occasional Advisor

Re: "Program terminated with signal 6, Aborted." to throw and catch exceptions calls

>What does "info shared" show?
this is my output :
(gdb) info shared
Shared Object Libraries
flags tstart tend dstart dend dlt
/usr/lib/dld.sl
0x02000200 0xc0010000 0xc0044664 0x79ff8000 0x79ffce80 0x79ff809c
/usr/lib/librt.2
0x03000301 0xc0344000 0xc03480ac 0x79fd4000 0x79fd408c 0x79fd4008
/usr/lib/libnsl.1
0x03000301 0xc0280000 0xc02eeb14 0x79fa3000 0x79faf628 0x79fa3368
/usr/lib/libxti.2
0x03000301 0xc0060000 0xc0076d5c 0x79fb5000 0x79fb73c0 0x79fb50d8
/usr/local/lib/libxml2.sl
0x03000301 0xd7500000 0xd768f044 0x79fbc000 0x79fca764 0x79fbc384
/usr/local/lib/libz.sl
0x03000301 0xcf480000 0xcf495b94 0x79ff6000 0x79ff6ae4 0x79ff6060
/usr/lib/libm.2
0x03000301 0xc0370000 0xc0397364 0x79fb0000 0x79fb4ad0 0x79fb028c
/usr/lib/libpthread.1
0x03000301 0xc0080000 0xc00f645c 0x79fcd000 0x79fcfb60 0x79fcd238
/usr/local/lib/libiconv.sl
0x03000301 0xcfb00000 0xcfbe9ebc 0x79fd5000 0x79fd6bac 0x79fd54e8
/usr/lib/libc.2
0x03000301 0xc0100000 0xc02668cc 0x79fd7000 0x79feb858 0x79fd77d4
/usr/lib/libdld.2
0x03000301 0xc0009000 0xc000b95c 0x79ff7000 0x79ff71e0 0x79ff700c
/opt/graphics/OpenGL/lib/libogltls.sl
0x03ff0301 0xc0008000 0xc00083a8 0x79ffd000 0x79ffd0c4 0x79ffd014
/usr/montella/_ZICLIGHT3.4/scripts/./../modules/xnettl1ENH.so
0x03000301 0xc7ef0000 0xc7efde9c 0x79fa1000 0x79fa2414 0x79fa1138
/usr/local/lib//libstdc++.sl
0x03000301 0xd7700000 0xd7849fac 0x79f65000 0x79f99388 0x79f673a8
/usr/montella/_ZICLIGHT3.4/scripts/./../modules/xnetsnmpENH.so
0x03000301 0xd4640000 0xd473494c 0x79f40000 0x79f5bfe0 0x79f41930
/usr/lib/libnetsnmp.sl.16
0x03000301 0xd7900000 0xd7a1fdb4 0x79ef9000 0x79f2fc10 0x79efa4a4
/usr/montella/_ZICLIGHT3.4/scripts/./../modules/libTL1pluginENH.so
0x03000301 0xd7b00000 0xd7c0b6b4 0x79ed8000 0x79ef6a50 0x79ed8fb0
Total of 17 shared libraries.


>What happens if you run the application in gdb, do you get better info?

I have the same info



>What does file(1) show for each of these shlibs? Did you strip them?

Reading symbols from /usr/lib/dld.sl...(no debugging symbols found)...done.
Reading symbols from /usr/lib/librt.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libnsl.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libxti.2...(no debugging symbols found)...done.
Reading symbols from /usr/local/lib/libxml2.sl...(no debugging symbols found)...done.
Reading symbols from /usr/local/lib/libz.sl...warning: Load module /usr/local/lib/libz.sl has been stripped

(no debugging symbols found)...done.
Reading symbols from /usr/lib/libm.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libpthread.1...(no debugging symbols found)...done.
Reading symbols from /usr/local/lib/libiconv.sl...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libc.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libdld.2...(no debugging symbols found)...done.
Reading symbols from /opt/graphics/OpenGL/lib/libogltls.sl...done.
Reading symbols from /usr/montella/_ZICLIGHT3.4/scripts/./../modules/xnettl1ENH.so...done.
Reading symbols from /usr/local/lib//libstdc++.sl...warning: Load module /usr/local/lib//libstdc++.sl has been stripped

(no debugging symbols found)...done.
Reading symbols from /usr/montella/_ZICLIGHT3.4/scripts/./../modules/xnetsnmpENH.so...done.
Reading symbols from /usr/lib/libnetsnmp.sl.16...(no debugging symbols found)...done.
Reading symbols from /usr/montella/_ZICLIGHT3.4/scripts/./../modules/libTL1pluginENH.so...
(no debugging symbols found)...done.


by the way, I tryed to build an easy executable (cc) with use libstdc++.sl and when I run it I receive the message :

/usr/lib/dld.sl: Unresolved symbol: __register_frame_info_table (code) from /usr/local/lib/libstdc++.sl

could be it important?

thx
Al
Dennis Handly
Acclaimed Contributor

Re: "Program terminated with signal 6, Aborted." to throw and catch exceptions calls

>this is my output: info shared

Were there any missing?

>>What does file(1) show for each of these shlibs? Did you strip them?

It appears you have stripped a bunch of shlibs. You need to get the original non-stripped versions.
/usr/local/lib/libz.sl has been stripped
/usr/local/lib//libstdc++.sl has been stripped

>I tried to build an easy executable (cc) with use libstdc++.sl

You must use g++ with libstdc++.sl.
And you didn't get that message.

You may want to start all over and download a newer g++: 4.4.3 or 4.3.4

[Note: broken link removed by Mod]

albino_1
Occasional Advisor

Re: "Program terminated with signal 6, Aborted." to throw and catch exceptions calls

>Were there any missing?
no one

>It appears you have stripped a bunch of shlibs. You need to get the original non-stripped versions.

I didn't stripped them ...
it was original version in libgcc-4.2.3

http://hpux.connect.org.uk/hppd/hpux/Gnu/libgcc-4.2.3/

>You may want to start all over and download a newer g++: 4.4.3 or 4.3.4
i will try

Thx

Al
Dennis Handly
Acclaimed Contributor
Solution

Re: "Program terminated with signal 6, Aborted." to throw and catch exceptions calls

>I didn't stripped them. it was original version in libgcc-4.2.3

Downloading PA for 11.31 shows:
1548288 Feb 21 23:31 2008 libgcc/libgcc-RUN/usr/local/lib/libstdc++.sl
$ file libstdc++.sl
libstdc++.sl: PA-RISC2.0 shared library

So it is stripped like you said.
Perhaps you should not use g++ from the Porting Center but one from HP?