[omniORB] Object To String (O2S) conversion problem
Gregory Giguashvili
Gregoryg@ParadigmGeo.com
Tue Aug 20 09:36:01 2002
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_000_01C2482C.7D6A6200
Content-Type: text/plain;
charset="iso-8859-1"
Hello,
I've just tested the same code on Sun 64 platform (this time with Rational
Puriry) - the same story...
The output attached.
Thanks a lot.
Giga
>-----Original Message-----
>From: Gregory Giguashvili [mailto:Gregoryg@paradigmgeo.com]
>Sent: Monday, August 19, 2002 11:59 AM
>To: OMNI ORB Mailing List (E-mail)
>Subject: [omniORB] Object To String (O2S) conversion problem
>
>
>Please, forgive me, but our antivirus software chose to remove the
>attachment from my e-mail (because of some problem on our
>server), so I'm
>sending it to you once more (unpacked this time).
>
>Thanks a lot and sorry for the inconvinience.
>Giga
> <<O2S.idl>> <<O2S.pure>> <<O2S_i.cc>> <<O2SSK.cc>> <<O2SH.h>>
>> -----Original Message-----
>> From: Gregory Giguashvili
>> Sent: Monday, August 19, 2002 11:53 AM
>> To: OMNI ORB Mailing List (E-mail)
>> Subject: Object To String (O2S) conversion problem
>>
>> Hello,
>>
>> I'm using omniORB 3.0.4 snapshot dated 25-April-2002.
>Recently, I came
>> across a problem on SGI platform, which generated SIGPIPE in
>my programs.
>> After investigating it a little, I came to the conclusion
>that the problem
>> seems to be in the profile creation in omniORB and this is why...
>>
>> 1) I attach a sample program, which contains interface and its
>> implementation generated by the IDL compiler (no add-ons).
>> 2) I attach a trace generated when running this program
>using Valgrind
>> open-source "Purify" like product for Linux. (Though, I
>mentioned that the
>> problem was on SGI platform, SGI Purify and Valgrind gave
>similar output
>> for this test program. I chose to provide you with Valgrind
>output since I
>> think it's a GREAT product and it really helps to find
>problems). Refer to
>> the following link for further information:
>> http://developer.kde.org/~sewardj/
>> 3) As you can see from the trace, it complains that there is
>uninitialized
>> memory read each time I use IOR returned by object_to_string
>function. In
>> my "real" application, I used to transfer this IOR string as
>an argument
>> to some IDL call. On SGI platforms, calling a send system call with
>> uninitialized string causes SIGPIPE in some cases.
>> 4) After investigating this problem a little, I came to the following
>> conclusions:
>> - The problem doesn't seem to be in IOP::iorToEncapStr
>function, rather
>> it seems to be in the profile buffer provided to this function as the
>> argument.
>> - The problem doesn't occur for all IPs (this almost drove me crazy
>> since it happened on certain machines only). I checked this on a
>> standalone laptop, which was assigned different IPs every time. The
>> following IP: 198.0.0.1 doesn't cause the problem, while
>206.109.128.192
>> does.
>>
>> I sure hope there is a known fix for this problem, though I
>find it hard
>> to beleive that someone noticed it because of its weirdness.
>>
>> Thanks a lot in advance.
>> Giga
>> P.S.
>>
>> O2S.tgz file contains the following:
>> O2S.idl - sample IDL file
>> O2S.pure - the output from Valgrind
>> O2S_i.cc - implementation generated by IDL compiler
>> O2SH.h, O2SSK.cc - IDL generated sources
>>
>>
>>
>
------_=_NextPart_000_01C2482C.7D6A6200
Content-Type: application/octet-stream;
name="O2S.pure.plog"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="O2S.pure.plog"
**** Purify instrumented O2S.pure (pid 20738 at Tue Aug 20 11:29:51 =
2002)=0A=
* Purify 2001a.04.00 Solaris 2 (64-bit) Copyright (C) 1992-2001 =
Rational Software Corp. All rights reserved. =0A=
* For contact information type: "purify -help"=0A=
* For TTY output, use the option "-windows=3Dno"=0A=
* Options settings: -chain-length=3D50 -purify \=0A=
-cache-dir=3D/users/gregoryg/Pure_tmp -always-use-cache-dir =
-best-effort \=0A=
-check-debug-timestamps=3Dno \=0A=
-purify-home=3D/home/purify/solaris/releases/purify.sol.2001a.04.00 =
\=0A=
-threads=3Dyes -use-internal-locks=3Dyes =
-thread_stack_change=3D0x4000 \=0A=
-mt_safe_malloc=3Dyes =0A=
* License successfully checked out.=0A=
=0A=
**** Purify instrumented O2S.pure (pid 20738) ****=0A=
UMR: Uninitialized memory read:=0A=
* This is occurring while in thread 7:=0A=
mutex_unlock [libthread.so.1]=0A=
pthread_cond_wait [libthread.so.1]=0A=
void omni_condition::wait() [libomnithread.so.2.1]=0A=
void*omniORB_Ripper::run_undetached(void*) [strand.cc]=0A=
omni_thread_wrapper [libomnithread.so.2.1]=0A=
_thread_start [libthread.so.1]=0A=
* Reading 4 bytes from 0x1002d71d4 in the heap (2 bytes at =
0x1002d71d5 uninit).=0A=
* Address 0x1002d71d4 is 92 bytes into a malloc'd block at =
0x1002d7178 of 144 bytes.=0A=
* This block was allocated from:=0A=
malloc [rtlib.o]=0A=
c2n6Fl_Pv___1 [libCrun.so.1]=0A=
void*operator new(unsigned long) [rtlib.o]=0A=
void omni_strand_initialiser::attach() [strand.cc]=0A=
CORBA::ORB*CORBA::ORB_init(int&,char**,const char*) =
[libomniORB3.so.0.4]=0A=
main [O2S_i.cc]=0A=
_start [crt1.o]=0A=
=0A=
**** Purify instrumented O2S.pure (pid 20738) ****=0A=
UMR: Uninitialized memory read (11 times):=0A=
* This is occurring while in thread 8:=0A=
mutex_unlock [libthread.so.1]=0A=
pthread_cond_timedwait [libthread.so.1]=0A=
int omni_condition::timedwait(unsigned long,unsigned long) =
[libomnithread.so.2.1]=0A=
void*omniORB_Scavenger::run_undetached(void*) [libomniORB3.so.0.4]=0A=
omni_thread_wrapper [libomnithread.so.2.1]=0A=
_thread_start [libthread.so.1]=0A=
* Reading 4 bytes from 0x1002d7684 in the heap (2 bytes at =
0x1002d7685 uninit).=0A=
* Address 0x1002d7684 is 92 bytes into a malloc'd block at =
0x1002d7628 of 160 bytes.=0A=
* This block was allocated from:=0A=
malloc [rtlib.o]=0A=
c2n6Fl_Pv___1 [libCrun.so.1]=0A=
void*operator new(unsigned long) [rtlib.o]=0A=
void omni_scavenger_initialiser::attach() [scavenger.cc]=0A=
CORBA::ORB*CORBA::ORB_init(int&,char**,const char*) =
[libomniORB3.so.0.4]=0A=
main [O2S_i.cc]=0A=
_start [crt1.o]=0A=
=0A=
**** Purify instrumented O2S.pure (pid 20738) ****=0A=
UMR: Uninitialized memory read (3 times):=0A=
* This is occurring while in:=0A=
unsigned char*IOP::iorToEncapStr(const unsigned char*,const =
_CORBA_Unbounded_Sequence<IOP::TaggedProfile>*) [libomniORB3.so.0.4]=0A=
char*omniURI::objectToString(CORBA::Object*) [libomniORB3.so.0.4]=0A=
main [O2S_i.cc]=0A=
_start [crt1.o]=0A=
* Reading 1 byte from 0x1002e6ef3 in the heap.=0A=
* Address 0x1002e6ef3 is 59 bytes into a malloc'd block at =
0x1002e6eb8 of 128 bytes.=0A=
* This block was allocated from:=0A=
malloc [rtlib.o]=0A=
c2n6Fl_Pv___1 [libCrun.so.1]=0A=
void*operator new(unsigned long) [rtlib.o]=0A=
void*operator new[](unsigned long) [rtlib.o]=0A=
void MemBufferedStream::grow(unsigned long) [libomniORB3.so.0.4]=0A=
void*MemBufferedStream::align_and_put_bytes(omni::alignment_t,unsigned =
long) [ior.cc]=0A=
unsigned char*IOP::iorToEncapStr(const unsigned char*,const =
_CORBA_Unbounded_Sequence<IOP::TaggedProfile>*) [libomniORB3.so.0.4]=0A=
char*omniURI::objectToString(CORBA::Object*) [libomniORB3.so.0.4]=0A=
main [O2S_i.cc]=0A=
_start [crt1.o]=0A=
=0A=
**** Purify instrumented O2S.pure (pid 20738) ****=0A=
UMR: Uninitialized memory read (3 times):=0A=
* This is occurring while in:=0A=
unsigned char*IOP::iorToEncapStr(const unsigned char*,const =
_CORBA_Unbounded_Sequence<IOP::TaggedProfile>*) [libomniORB3.so.0.4]=0A=
char*omniURI::objectToString(CORBA::Object*) [libomniORB3.so.0.4]=0A=
main [O2S_i.cc]=0A=
_start [crt1.o]=0A=
* Reading 1 byte from 0x1002e6ef3 in the heap.=0A=
* Address 0x1002e6ef3 is 59 bytes into a malloc'd block at =
0x1002e6eb8 of 128 bytes.=0A=
* This block was allocated from:=0A=
malloc [rtlib.o]=0A=
c2n6Fl_Pv___1 [libCrun.so.1]=0A=
void*operator new(unsigned long) [rtlib.o]=0A=
void*operator new[](unsigned long) [rtlib.o]=0A=
void MemBufferedStream::grow(unsigned long) [libomniORB3.so.0.4]=0A=
void*MemBufferedStream::align_and_put_bytes(omni::alignment_t,unsigned =
long) [ior.cc]=0A=
unsigned char*IOP::iorToEncapStr(const unsigned char*,const =
_CORBA_Unbounded_Sequence<IOP::TaggedProfile>*) [libomniORB3.so.0.4]=0A=
char*omniURI::objectToString(CORBA::Object*) [libomniORB3.so.0.4]=0A=
main [O2S_i.cc]=0A=
_start [crt1.o]=0A=
=0A=
**** Purify instrumented O2S.pure (pid 20738) ****=0A=
SIG: Signal handled:=0A=
* This is occurring while in thread 10:=0A=
_p1092static [crtn.o]=0A=
void*tcpSocketRendezvouser::run_undetached(void*) =
[libomniORB3.so.0.4]=0A=
omni_thread_wrapper [libomnithread.so.2.1]=0A=
_thread_start [libthread.so.1]=0A=
* Received signal 2 (SIGINT - Interrupt)=0A=
* Signal mask: (SIGINT) =0A=
* Pending signals: =0A=
------_=_NextPart_000_01C2482C.7D6A6200--