Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Exception handling is not working in GCC compile shared object

777730Mar 15 2011 — edited Mar 17 2011
Hello,

I am facing very strange issue on Solaris x86_64 platform with C++ code compiled usging gcc.3.4.3.

I have compiled shared object that load into web server process space while initialization. Whenever any exception generate in code base, it is not being caught by exception handler. Even though exception handlers are there. Same code is working fine since long time but on Solaris x86, Sparc arch, Linux platform

With Dbx, I am getting following stack trace.

Stack trace is
dbx: internal error: reference through NULL pointer at line 973 in file symbol.cc
[1] 0x11335(0x1, 0x1, 0x474e5543432b2b00, 0x59cb60, 0xfffffd7fffdff2b0, 0x11335), at 0x11335
---- hidden frames, use 'where -h' to see them all ----
=>[4] __cxa_throw(obj = (nil), tinfo = (nil), dest = (nil), , line 75 in "eh_throw.cc"
[5] OBWebGate_Authent(r = 0xfffffd7fff3fb300), line 86 in "apache.cpp"
[6] ap_run_post_config(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x444624
[7] main(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x42c39a

I am using following link options.

Compile option is

/usr/sfw/bin/g++ -c -I/scratch/ashishas/view_storage/build/coreid1014/palantir/apache22/solaris-x86_64/include -m64 -fPIC -D_REENTRANT -Wall -g -o apache.o apache.cpp

Link option is
/usr/sfw/bin/g++ -shared -m64 -o apache.so apache.o -lsocket -lnsl -ldl -lpthread -lthread


At line 86, we are just throwing simple exception which have catch handlers in place. Also we do have catch(...) handler as well.

Surpursing things are..same issue didn't observe if we make it as executable.
Issue only comes if this is shared object loaded on webserver. If this is plain shared object, opened by anyother exe, it works fine.


Can someone help me out. This is completly blocking issue for us. Using Solaris Sun Studio compiler is no option as of now.

Comments

LeightonLNelson
Hi,
First I recommend to remove your hostname information from the output of your post.
From the output it seems to indicate that your OMS is down. Could you please verify that the OMS in question is up using emctl status oms.
What command did you use to remove the plug-in? Does emcli list_plugins_on_server show the deployed plug-in?

Thanks,
Leighton
EdSpn
Hi Leighton,

Thanks for the feedback. I just checked status oms and it seems fine:
[oracle@dwbi-durl-oel agent_inst]$ $OMS_HOME/bin/emctl status oms
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Up
Yes, my plugin is still listed. I always use the following commands to undeploy:
emcli delete_target -name="$TARGET_NAME"    -type="$TARGET_TYPE_NAME"
emcli undeploy_plugin_from_agent  -plugin="$PLUGINID" -agent_names="$AGENT_NAME"
emcli undeploy_plugin_from_server -plugin="$PLUGINID" -sys_password="$SYSPWD"
I think the issue may be caused by another plugin. Will dig further.

Thanks,
Ed

PS That hostname slipped through into the post. Just removed it :)
EdSpn
To complete the thread:

I have found the offending plugin, and undeployed it (using the OEM UI in browser).
After this, the issue was resolved, and I could successfully undeploy my own plugin.

Regards,
Ed
Which plugin did you undeployed ?
EdSpn
It was not an Oracle provided plugin, but one of our own.
1 - 5
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 14 2011
Added on Mar 15 2011
13 comments
2,971 views