[omniORB] [4.0.6/Linux/C++] possibly invalid use of memory when UserException is returned

Slawomir Lisznianski slisznianski at asyncnet.com
Tue Sep 6 12:43:25 BST 2005


Hello,

I noticed that when a UserException is returned from a call, valgrind
(v2.4.0) occasionally reports invalid use of memory. When I was testing
a server which repeatedly returned exceptions, I was able to seg. fault
it after a while. I'm not sure if server's crash is related to the
valgrind's report, but so far that's the only hint I've got. 

==22901==
==22901== Thread 6:
==22901== Syscall param socketcall.send(msg) points to uninitialised
byte(s)
==22901==    at 0x2607F20E: send (in /lib/tls/libc-2.3.2.so)
==22901==    by 0x25C4D6DB:
omni::giopStream::sendChunk(omni::giopStream_Buffer*) (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C5A69B:
omni::giopImpl10::outputMessageEnd(omni::giopStream*) (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C5B3D9:
omni::giopImpl10::sendUserException(omni::giopStream*,
OMNIO::UserException const&) (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C55273: omni::GIOP_S::handleRequest() (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C54BC4: omni::GIOP_S::dispatcher() (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C521E7: omni::giopWorker::real_execute() (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C5208A: omni::giopWorkerInfo::run() (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C52178: omni::giopWorker::execute() (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C06C6E: omniAsyncWorker::real_run() (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C05F16: omniAsyncWorkerInfo::run() (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C06BB4: omniAsyncWorker::run(void*) (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==  Address 0x26156549 is 97 bytes inside a block of size 8220
alloc'd
==22901==    at 0x259848F6: operator new[](unsigned)
(vg_replace_malloc.c:138)
==22901==    by 0x25C4CA17: omni::giopStream_Buffer::newBuffer(unsigned
long) (in /auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C5A5D9:
omni::giopImpl10::outputNewMessage(omni::giopStream*) (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C5A648:
omni::giopImpl10::outputMessageBegin(omni::giopStream*, void
(*)(omni::giopStream*)) (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C55A4B: omni::GIOP_S::SendReply() (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C38173: omniCallHandle::upcall(omniServant*,
omniCallDescriptor&) (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C1ED28: omniServant::_dispatch(omniCallHandle&) (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C28C50: omni::omniOrbPOA::dispatch(omniCallHandle&,
omniLocalIdentity*) (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C0E253: omniLocalIdentity::dispatch(omniCallHandle&)
(in /auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C54E9A: omni::GIOP_S::handleRequest() (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C54BC4: omni::GIOP_S::dispatcher() (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==22901==    by 0x25C521E7: omni::giopWorker::real_execute() (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)


There is one more instance when valgrind reports a problem with omniORB,
and that is soon after ORB_init call (every time):

[2005-09-06T11:33:53.279776][WARN] omniORB: Distribution date: Thu Apr
14 17:19:57 BST 2005 dgrisby

==5566== Syscall param socketcall.sendto(msg) points to uninitialised
byte(s)
==5566==    at 0x2607F2EE: sendto (in /lib/tls/libc-2.3.2.so)
==5566==    by 0x2609AFA8: getifaddrs (in /lib/tls/libc-2.3.2.so)
==5566==    by 0x25C838B1: omni::ifaddrs_get_ifinfo(omnivector<char
const*>&) (in /auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==5566==    by 0x25C45FE8: omni::omni_giopEndpoint_initialiser::attach()
(in /auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)
==5566==    by 0x25BEAEFA: OMNIO::ORB_init(int&, char**, char const*,
char const* (*) [2]) (in
/auto/tadev/tp/omniORB/omnio_4.0.6/lib/libomniORB4.so.0.6)


Other than those two instances, omniORB valgrinds cleanly.


Regards,
Slawomir Lisznianski




More information about the omniORB-list mailing list